blob: f4069afa2ebe01edb1d99802ac539bf21ce96d43 [file] [log] [blame]
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +08001/*
2 * Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#ifndef __IRQ_H_
8#define __IRQ_H_
9
10extern void eclic_irq20_handler(void);
11extern void eclic_irq21_handler(void);
12extern void eclic_irq22_handler(void);
13extern void eclic_irq23_handler(void);
14extern void eclic_irq24_handler(void);
15
16extern void eclic_irq50_handler(void);
17
xiaohu.huang38262102022-05-06 22:21:48 +080018#define CONCAT_STAGE_1(w, x, y, z) w##x##y##z
19#define CONCAT2(w, x) w##x
20#define CONCAT3(w, x, y) w##x##y
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +080021#define CONCAT4(w, x, y, z) CONCAT_STAGE_1(w, x, y, z)
22
23/* Helper macros to build the IRQ handler and priority struct names */
24#define IRQ_HANDLER(irqname) CONCAT3(eclic_irq, irqname, _handler)
xiaohu.huang38262102022-05-06 22:21:48 +080025
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +080026#define DECLARE_IRQ(irq, routine)
27
28/*IRQ_NUM define list*/
bangzheng.liu4d71f922022-09-29 16:12:20 +080029#define IRQ_NUM_MAX 255
xiaohu.huang38262102022-05-06 22:21:48 +080030#define IRQ_NUM_MB_0 50
31#define IRQ_NUM_MB_1 49
32#define IRQ_NUM_MB_2 48
33#define IRQ_NUM_MB_3 47
34#define IRQ_NUM_MB_4 46
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +080035
36/*You can add other interrupts num here 46~19*/
37
38/* use for ir */
xiaohu.huang38262102022-05-06 22:21:48 +080039#define IRQ_NUM_IRIN 22
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +080040
41/* cec */
xiaohu.huang38262102022-05-06 22:21:48 +080042#define IRQ_NUM_CECA 40
43#define IRQ_NUM_CECB 41
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +080044
45/*wol*/
46#define IRQ_ETH_PMT_NUM 76
47
48/* timerA~timerJ */
xiaohu.huang38262102022-05-06 22:21:48 +080049#define IRQ_NUM_TIMERA 0
50#define IRQ_NUM_TIMERB 1
51#define IRQ_NUM_TIMERC 2
52#define IRQ_NUM_TIMERD 3
53#define IRQ_NUM_TIMERG 4
54#define IRQ_NUM_TIMERH 5
55#define IRQ_NUM_TIMERI 6
56#define IRQ_NUM_TIMERJ 7
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +080057
xiaohu.huang38262102022-05-06 22:21:48 +080058#define IRQ_NUM_TIMER IRQ_NUM_TIMERJ
59#define IRQ_TIMER_PROI 8
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +080060
61#endif