blob: cb1f2195bc8e8fd81e62c66701e1a556cd8d0253 [file] [log] [blame]
Bo Lv092e8de2022-04-24 21:40: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);
benlong.zhoub408b352022-06-20 19:54:36 +080017
18#define CONCAT_STAGE_1(w, x, y, z) w##x##y##z
xiaohu.huang38262102022-05-06 22:21:48 +080019#define CONCAT2(w, x) w##x
20#define CONCAT3(w, x, y) w##x##y
benlong.zhoub408b352022-06-20 19:54:36 +080021#define CONCAT4(w, x, y, z) CONCAT_STAGE_1(w, x, y, z)
Bo Lv092e8de2022-04-24 21:40:10 +080022
23/* Helper macros to build the IRQ handler and priority struct names */
24#define IRQ_HANDLER(irqname) CONCAT3(eclic_irq, irqname, _handler)
benlong.zhoub408b352022-06-20 19:54:36 +080025
26#define DECLARE_IRQ(irq, routine)
Bo Lv092e8de2022-04-24 21:40:10 +080027
28/*IRQ_NUM define list*/
xiaohu.huang38262102022-05-06 22:21:48 +080029#define IRQ_NUM_MB_0 50
30#define IRQ_NUM_MB_1 49
31#define IRQ_NUM_MB_2 48
32#define IRQ_NUM_MB_3 47
33#define IRQ_NUM_MB_4 46
Bo Lv092e8de2022-04-24 21:40:10 +080034
35/*You can add other interrupts num here 46~19*/
36
37/* use for ir */
benlong.zhoub408b352022-06-20 19:54:36 +080038#define IRQ_NUM_IRIN 22
Bo Lv092e8de2022-04-24 21:40:10 +080039
40/* cec */
xiaohu.huang38262102022-05-06 22:21:48 +080041#define IRQ_NUM_CECA 40
42#define IRQ_NUM_CECB 41
Bo Lv092e8de2022-04-24 21:40:10 +080043
Bo Lv092e8de2022-04-24 21:40:10 +080044/*wol*/
benlong.zhoub408b352022-06-20 19:54:36 +080045#define IRQ_ETH_PMT_NUM 76
46
47/* timerA~timerJ */
48#define IRQ_NUM_TIMERA 0
49#define IRQ_NUM_TIMERB 1
50#define IRQ_NUM_TIMERC 2
51#define IRQ_NUM_TIMERD 3
52#define IRQ_NUM_TIMERG 4
53#define IRQ_NUM_TIMERH 5
54#define IRQ_NUM_TIMERI 6
55#define IRQ_NUM_TIMERJ 7
56
57#define IRQ_NUM_TIMER IRQ_NUM_TIMERJ
58#define IRQ_TIMER_PROI 8
Bo Lv092e8de2022-04-24 21:40:10 +080059
60#endif