blob: 17d1d3066fce2c3ac8e49fb97f641c360f2a1936 [file] [log] [blame]
bangzheng.liufe648a92023-10-27 13:18:41 +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
18#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
21#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)
25
26#define DECLARE_IRQ(irq, routine)
27
28/*IRQ_NUM define list*/
29#define IRQ_NUM_MAX 255
30#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
35
36/*You can add other interrupts num here 46~19*/
37
38/* use for ir */
Zelong Dong06a619b2024-04-03 08:46:10 +000039#define IRQ_NUM_IRIN 148
40#define IRQ_NUM_IRIN_EXT 147
bangzheng.liufe648a92023-10-27 13:18:41 +080041
42/* uart */
43#define IRQ_NUM_AO_UART_C 138
44
45/* cec */
46#define IRQ_NUM_CECA 40
47#define IRQ_NUM_CECB 41
48
49/*wol*/
50#define IRQ_ETH_PMT_NUM 76
51
52/* timerA~timerJ */
53#define IRQ_NUM_TIMERA 0
54#define IRQ_NUM_TIMERB 1
55#define IRQ_NUM_TIMERC 2
56#define IRQ_NUM_TIMERD 3
57#define IRQ_NUM_TIMERG 4
58#define IRQ_NUM_TIMERH 5
59#define IRQ_NUM_TIMERI 6
60#define IRQ_NUM_TIMERJ 7
61
62#define IRQ_NUM_TIMER IRQ_NUM_TIMERJ
63#define IRQ_TIMER_PROI 8
64
65#endif