blob: 8b7af1d77699ff32fd602652a0d702542c664862 [file] [log] [blame]
bangzheng.liu5e691382023-01-10 16:20:10 +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 Dong6089f5c2023-03-19 14:24:06 +080039#define IRQ_NUM_IRIN 136
bangzheng.liu5e691382023-01-10 16:20:10 +080040
Yu Tu4a9c1652023-04-10 15:15:19 +080041/* uart */
42#define IRQ_NUM_AO_UART_C 138
43
bangzheng.liu5e691382023-01-10 16:20:10 +080044/* cec */
45#define IRQ_NUM_CECA 40
46#define IRQ_NUM_CECB 41
47
48/*wol*/
49#define IRQ_ETH_PMT_NUM 76
50
51/* timerA~timerJ */
52#define IRQ_NUM_TIMERA 0
53#define IRQ_NUM_TIMERB 1
54#define IRQ_NUM_TIMERC 2
55#define IRQ_NUM_TIMERD 3
56#define IRQ_NUM_TIMERG 4
57#define IRQ_NUM_TIMERH 5
58#define IRQ_NUM_TIMERI 6
59#define IRQ_NUM_TIMERJ 7
60
61#define IRQ_NUM_TIMER IRQ_NUM_TIMERJ
62#define IRQ_TIMER_PROI 8
63
64#endif