| 1 | /* |
| 2 | * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de> |
| 3 | * JZ7420/JZ4740 IRQ definitions |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License as published by the |
| 7 | * Free Software Foundation; either version 2 of the License, or (at your |
| 8 | * option) any later version. |
| 9 | * |
| 10 | * You should have received a copy of the GNU General Public License along |
| 11 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 12 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
| 13 | * |
| 14 | */ |
| 15 | |
| 16 | #ifndef __ASM_MACH_JZ4740_IRQ_H__ |
| 17 | #define __ASM_MACH_JZ4740_IRQ_H__ |
| 18 | |
| 19 | #define MIPS_CPU_IRQ_BASE 0 |
| 20 | #define JZ_IRQ_BASE 8 |
| 21 | |
| 22 | /* 1st-level interrupts */ |
| 23 | #define JZ_IRQ(x) (JZ_IRQ_BASE + (x)) |
| 24 | #define JZ_IRQ_I2C JZ_IRQ(1) |
| 25 | #define JZ_IRQ_UHC JZ_IRQ(3) |
| 26 | #define JZ_IRQ_UART1 JZ_IRQ(8) |
| 27 | #define JZ_IRQ_UART0 JZ_IRQ(9) |
| 28 | #define JZ_IRQ_SADC JZ_IRQ(12) |
| 29 | #define JZ_IRQ_MSC JZ_IRQ(14) |
| 30 | #define JZ_IRQ_RTC JZ_IRQ(15) |
| 31 | #define JZ_IRQ_SSI JZ_IRQ(16) |
| 32 | #define JZ_IRQ_CIM JZ_IRQ(17) |
| 33 | #define JZ_IRQ_AIC JZ_IRQ(18) |
| 34 | #define JZ_IRQ_ETH JZ_IRQ(19) |
| 35 | #define JZ_IRQ_DMAC JZ_IRQ(20) |
| 36 | #define JZ_IRQ_TCU2 JZ_IRQ(21) |
| 37 | #define JZ_IRQ_TCU1 JZ_IRQ(22) |
| 38 | #define JZ_IRQ_TCU0 JZ_IRQ(23) |
| 39 | #define JZ_IRQ_UDC JZ_IRQ(24) |
| 40 | #define JZ_IRQ_GPIO3 JZ_IRQ(25) |
| 41 | #define JZ_IRQ_GPIO2 JZ_IRQ(26) |
| 42 | #define JZ_IRQ_GPIO1 JZ_IRQ(27) |
| 43 | #define JZ_IRQ_GPIO0 JZ_IRQ(28) |
| 44 | #define JZ_IRQ_IPU JZ_IRQ(29) |
| 45 | #define JZ_IRQ_LCD JZ_IRQ(30) |
| 46 | |
| 47 | /* 2nd-level interrupts */ |
| 48 | #define JZ_IRQ_DMA(x) ((x) + JZ_IRQ(32)) /* 32 to 37 for DMAC channel 0 to 5 */ |
| 49 | |
| 50 | #define JZ_IRQ_INTC_GPIO(x) (JZ_IRQ_GPIO0 - (x)) |
| 51 | #define JZ_IRQ_GPIO(x) (JZ_IRQ(48) + (x)) |
| 52 | |
| 53 | #define NR_IRQS (JZ_IRQ_GPIO(127) + 1) |
| 54 | |
| 55 | #endif |
| 56 | |