bangzheng.liu | 5e69138 | 2023-01-10 16:20:10 +0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 10 | extern void eclic_irq20_handler(void); |
| 11 | extern void eclic_irq21_handler(void); |
| 12 | extern void eclic_irq22_handler(void); |
| 13 | extern void eclic_irq23_handler(void); |
| 14 | extern void eclic_irq24_handler(void); |
| 15 | |
| 16 | extern 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 Dong | 6089f5c | 2023-03-19 14:24:06 +0800 | [diff] [blame] | 39 | #define IRQ_NUM_IRIN 136 |
bangzheng.liu | 5e69138 | 2023-01-10 16:20:10 +0800 | [diff] [blame] | 40 | |
Yu Tu | 4a9c165 | 2023-04-10 15:15:19 +0800 | [diff] [blame] | 41 | /* uart */ |
| 42 | #define IRQ_NUM_AO_UART_C 138 |
| 43 | |
bangzheng.liu | 5e69138 | 2023-01-10 16:20:10 +0800 | [diff] [blame] | 44 | /* 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 |