1 /* 2 * arch/arm/mach-spear3xx/include/mach/irqs.h 3 * 4 * IRQ helper macros for SPEAr3xx machine family 5 * 6 * Copyright (C) 2009 ST Microelectronics 7 * Viresh Kumar<viresh.kumar@st.com> 8 * 9 * This file is licensed under the terms of the GNU General Public 10 * License version 2. This program is licensed "as is" without any 11 * warranty of any kind, whether express or implied. 12 */ 13 14 #ifndef __MACH_IRQS_H 15 #define __MACH_IRQS_H 16 17 /* SPEAr3xx IRQ definitions */ 18 #define SPEAR3XX_IRQ_HW_ACCEL_MOD_0 0 19 #define SPEAR3XX_IRQ_INTRCOMM_RAS_ARM 1 20 #define SPEAR3XX_IRQ_CPU_GPT1_1 2 21 #define SPEAR3XX_IRQ_CPU_GPT1_2 3 22 #define SPEAR3XX_IRQ_BASIC_GPT1_1 4 23 #define SPEAR3XX_IRQ_BASIC_GPT1_2 5 24 #define SPEAR3XX_IRQ_BASIC_GPT2_1 6 25 #define SPEAR3XX_IRQ_BASIC_GPT2_2 7 26 #define SPEAR3XX_IRQ_BASIC_DMA 8 27 #define SPEAR3XX_IRQ_BASIC_SMI 9 28 #define SPEAR3XX_IRQ_BASIC_RTC 10 29 #define SPEAR3XX_IRQ_BASIC_GPIO 11 30 #define SPEAR3XX_IRQ_BASIC_WDT 12 31 #define SPEAR3XX_IRQ_DDR_CONTROLLER 13 32 #define SPEAR3XX_IRQ_SYS_ERROR 14 33 #define SPEAR3XX_IRQ_WAKEUP_RCV 15 34 #define SPEAR3XX_IRQ_JPEG 16 35 #define SPEAR3XX_IRQ_IRDA 17 36 #define SPEAR3XX_IRQ_ADC 18 37 #define SPEAR3XX_IRQ_UART 19 38 #define SPEAR3XX_IRQ_SSP 20 39 #define SPEAR3XX_IRQ_I2C 21 40 #define SPEAR3XX_IRQ_MAC_1 22 41 #define SPEAR3XX_IRQ_MAC_2 23 42 #define SPEAR3XX_IRQ_USB_DEV 24 43 #define SPEAR3XX_IRQ_USB_H_OHCI_0 25 44 #define SPEAR3XX_IRQ_USB_H_EHCI_0 26 45 #define SPEAR3XX_IRQ_USB_H_EHCI_1 SPEAR3XX_IRQ_USB_H_EHCI_0 46 #define SPEAR3XX_IRQ_USB_H_OHCI_1 27 47 #define SPEAR3XX_IRQ_GEN_RAS_1 28 48 #define SPEAR3XX_IRQ_GEN_RAS_2 29 49 #define SPEAR3XX_IRQ_GEN_RAS_3 30 50 #define SPEAR3XX_IRQ_HW_ACCEL_MOD_1 31 51 #define SPEAR3XX_IRQ_VIC_END 32 52 53 #define SPEAR3XX_VIRQ_START SPEAR3XX_IRQ_VIC_END 54 55 /* SPEAr300 Virtual irq definitions */ 56 /* IRQs sharing IRQ_GEN_RAS_1 */ 57 #define SPEAR300_VIRQ_IT_PERS_S (SPEAR3XX_VIRQ_START + 0) 58 #define SPEAR300_VIRQ_IT_CHANGE_S (SPEAR3XX_VIRQ_START + 1) 59 #define SPEAR300_VIRQ_I2S (SPEAR3XX_VIRQ_START + 2) 60 #define SPEAR300_VIRQ_TDM (SPEAR3XX_VIRQ_START + 3) 61 #define SPEAR300_VIRQ_CAMERA_L (SPEAR3XX_VIRQ_START + 4) 62 #define SPEAR300_VIRQ_CAMERA_F (SPEAR3XX_VIRQ_START + 5) 63 #define SPEAR300_VIRQ_CAMERA_V (SPEAR3XX_VIRQ_START + 6) 64 #define SPEAR300_VIRQ_KEYBOARD (SPEAR3XX_VIRQ_START + 7) 65 #define SPEAR300_VIRQ_GPIO1 (SPEAR3XX_VIRQ_START + 8) 66 67 /* IRQs sharing IRQ_GEN_RAS_3 */ 68 #define SPEAR300_IRQ_CLCD SPEAR3XX_IRQ_GEN_RAS_3 69 70 /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ 71 #define SPEAR300_IRQ_SDHCI SPEAR3XX_IRQ_INTRCOMM_RAS_ARM 72 73 /* SPEAr310 Virtual irq definitions */ 74 /* IRQs sharing IRQ_GEN_RAS_1 */ 75 #define SPEAR310_VIRQ_SMII0 (SPEAR3XX_VIRQ_START + 0) 76 #define SPEAR310_VIRQ_SMII1 (SPEAR3XX_VIRQ_START + 1) 77 #define SPEAR310_VIRQ_SMII2 (SPEAR3XX_VIRQ_START + 2) 78 #define SPEAR310_VIRQ_SMII3 (SPEAR3XX_VIRQ_START + 3) 79 #define SPEAR310_VIRQ_WAKEUP_SMII0 (SPEAR3XX_VIRQ_START + 4) 80 #define SPEAR310_VIRQ_WAKEUP_SMII1 (SPEAR3XX_VIRQ_START + 5) 81 #define SPEAR310_VIRQ_WAKEUP_SMII2 (SPEAR3XX_VIRQ_START + 6) 82 #define SPEAR310_VIRQ_WAKEUP_SMII3 (SPEAR3XX_VIRQ_START + 7) 83 84 /* IRQs sharing IRQ_GEN_RAS_2 */ 85 #define SPEAR310_VIRQ_UART1 (SPEAR3XX_VIRQ_START + 8) 86 #define SPEAR310_VIRQ_UART2 (SPEAR3XX_VIRQ_START + 9) 87 #define SPEAR310_VIRQ_UART3 (SPEAR3XX_VIRQ_START + 10) 88 #define SPEAR310_VIRQ_UART4 (SPEAR3XX_VIRQ_START + 11) 89 #define SPEAR310_VIRQ_UART5 (SPEAR3XX_VIRQ_START + 12) 90 91 /* IRQs sharing IRQ_GEN_RAS_3 */ 92 #define SPEAR310_VIRQ_EMI (SPEAR3XX_VIRQ_START + 13) 93 #define SPEAR310_VIRQ_PLGPIO (SPEAR3XX_VIRQ_START + 14) 94 95 /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ 96 #define SPEAR310_VIRQ_TDM_HDLC (SPEAR3XX_VIRQ_START + 15) 97 #define SPEAR310_VIRQ_RS485_0 (SPEAR3XX_VIRQ_START + 16) 98 #define SPEAR310_VIRQ_RS485_1 (SPEAR3XX_VIRQ_START + 17) 99 100 /* SPEAr320 Virtual irq definitions */ 101 /* IRQs sharing IRQ_GEN_RAS_1 */ 102 #define SPEAR320_VIRQ_EMI (SPEAR3XX_VIRQ_START + 0) 103 #define SPEAR320_VIRQ_CLCD (SPEAR3XX_VIRQ_START + 1) 104 #define SPEAR320_VIRQ_SPP (SPEAR3XX_VIRQ_START + 2) 105 106 /* IRQs sharing IRQ_GEN_RAS_2 */ 107 #define SPEAR320_IRQ_SDHCI SPEAR3XX_IRQ_GEN_RAS_2 108 109 /* IRQs sharing IRQ_GEN_RAS_3 */ 110 #define SPEAR320_VIRQ_PLGPIO (SPEAR3XX_VIRQ_START + 3) 111 #define SPEAR320_VIRQ_I2S_PLAY (SPEAR3XX_VIRQ_START + 4) 112 #define SPEAR320_VIRQ_I2S_REC (SPEAR3XX_VIRQ_START + 5) 113 114 /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ 115 #define SPEAR320_VIRQ_CANU (SPEAR3XX_VIRQ_START + 6) 116 #define SPEAR320_VIRQ_CANL (SPEAR3XX_VIRQ_START + 7) 117 #define SPEAR320_VIRQ_UART1 (SPEAR3XX_VIRQ_START + 8) 118 #define SPEAR320_VIRQ_UART2 (SPEAR3XX_VIRQ_START + 9) 119 #define SPEAR320_VIRQ_SSP1 (SPEAR3XX_VIRQ_START + 10) 120 #define SPEAR320_VIRQ_SSP2 (SPEAR3XX_VIRQ_START + 11) 121 #define SPEAR320_VIRQ_SMII0 (SPEAR3XX_VIRQ_START + 12) 122 #define SPEAR320_VIRQ_MII1_SMII1 (SPEAR3XX_VIRQ_START + 13) 123 #define SPEAR320_VIRQ_WAKEUP_SMII0 (SPEAR3XX_VIRQ_START + 14) 124 #define SPEAR320_VIRQ_WAKEUP_MII1_SMII1 (SPEAR3XX_VIRQ_START + 15) 125 #define SPEAR320_VIRQ_I2C1 (SPEAR3XX_VIRQ_START + 16) 126 127 /* 128 * GPIO pins virtual irqs 129 * Use the lowest number for the GPIO virtual IRQs base on which subarchs 130 * we have compiled in 131 */ 132 #if defined(CONFIG_MACH_SPEAR310) 133 #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 18) 134 #elif defined(CONFIG_MACH_SPEAR320) 135 #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 17) 136 #else 137 #define SPEAR3XX_GPIO_INT_BASE (SPEAR3XX_VIRQ_START + 9) 138 #endif 139 140 #define SPEAR300_GPIO1_INT_BASE (SPEAR3XX_GPIO_INT_BASE + 8) 141 #define SPEAR3XX_PLGPIO_COUNT 102 142 143 #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) 144 #define SPEAR3XX_PLGPIO_INT_BASE (SPEAR3XX_GPIO_INT_BASE + 8) 145 #define SPEAR3XX_GPIO_INT_END (SPEAR3XX_PLGPIO_INT_BASE + \ 146 SPEAR3XX_PLGPIO_COUNT) 147 #else 148 #define SPEAR3XX_GPIO_INT_END (SPEAR300_GPIO1_INT_BASE + 8) 149 #endif 150 151 #define SPEAR3XX_VIRQ_END SPEAR3XX_GPIO_INT_END 152 #define NR_IRQS SPEAR3XX_VIRQ_END 153 154 #endif /* __MACH_IRQS_H */ 155