Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: OMAP1: Change interrupt numbering for sparse IRQ

Change interrupt numbering for sparse IRQ. We do this using
a fixed offset until we can drop irqs.h once all it's users
have been updated.

Note that this depends on the GPIO fix for the MPUIO IRQs
"gpio: omap: Fix regression for MPUIO interrupts".

Also note that this patch adds some extra irq alloc warnings
that will go away when we stop calling irq_alloc_descs
in gpio-omap.c with a follow-up patch.

Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>

+75 -71
+1
arch/arm/Kconfig
··· 755 755 select MULTI_IRQ_HANDLER 756 756 select NEED_MACH_IO_H if PCCARD 757 757 select NEED_MACH_MEMORY_H 758 + select SPARSE_IRQ 758 759 help 759 760 Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx) 760 761
+1 -2
arch/arm/mach-omap1/ams-delta-fiq-handler.S
··· 17 17 #include <asm/assembler.h> 18 18 19 19 #include <mach/board-ams-delta.h> 20 - 21 - #include <mach/irqs.h> 22 20 #include <mach/ams-delta-fiq.h> 23 21 24 22 #include "iomap.h" 23 + #include "soc.h" 25 24 26 25 /* 27 26 * GPIO related definitions, copied from arch/arm/plat-omap/gpio.c.
+1 -1
arch/arm/mach-omap1/dma.c
··· 28 28 #include <linux/omap-dma.h> 29 29 #include <mach/tc.h> 30 30 31 - #include <mach/irqs.h> 31 + #include "soc.h" 32 32 33 33 #define OMAP1_DMA_BASE (0xfffed800) 34 34 #define OMAP1_LOGICAL_DMA_CH_COUNT 17
+1 -2
arch/arm/mach-omap1/i2c.c
··· 27 27 28 28 #define OMAP_I2C_SIZE 0x3f 29 29 #define OMAP1_I2C_BASE 0xfffb3800 30 - #define OMAP1_INT_I2C (32 + 4) 31 30 32 31 static const char name[] = "omap_i2c"; 33 32 ··· 66 67 res[0].start = OMAP1_I2C_BASE; 67 68 res[0].end = res[0].start + OMAP_I2C_SIZE; 68 69 res[0].flags = IORESOURCE_MEM; 69 - res[1].start = OMAP1_INT_I2C; 70 + res[1].start = INT_I2C; 70 71 res[1].flags = IORESOURCE_IRQ; 71 72 pdev->resource = res; 72 73
+60 -64
arch/arm/mach-omap1/include/mach/irqs.h
··· 34 34 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below 35 35 * 36 36 */ 37 - #define INT_CAMERA 1 38 - #define INT_FIQ 3 39 - #define INT_RTDX 6 40 - #define INT_DSP_MMU_ABORT 7 41 - #define INT_HOST 8 42 - #define INT_ABORT 9 43 - #define INT_BRIDGE_PRIV 13 44 - #define INT_GPIO_BANK1 14 45 - #define INT_UART3 15 46 - #define INT_TIMER3 16 47 - #define INT_DMA_CH0_6 19 48 - #define INT_DMA_CH1_7 20 49 - #define INT_DMA_CH2_8 21 50 - #define INT_DMA_CH3 22 51 - #define INT_DMA_CH4 23 52 - #define INT_DMA_CH5 24 53 - #define INT_TIMER1 26 54 - #define INT_WD_TIMER 27 55 - #define INT_BRIDGE_PUB 28 56 - #define INT_TIMER2 30 57 - #define INT_LCD_CTRL 31 37 + #define INT_CAMERA (NR_IRQS_LEGACY + 1) 38 + #define INT_FIQ (NR_IRQS_LEGACY + 3) 39 + #define INT_RTDX (NR_IRQS_LEGACY + 6) 40 + #define INT_DSP_MMU_ABORT (NR_IRQS_LEGACY + 7) 41 + #define INT_HOST (NR_IRQS_LEGACY + 8) 42 + #define INT_ABORT (NR_IRQS_LEGACY + 9) 43 + #define INT_BRIDGE_PRIV (NR_IRQS_LEGACY + 13) 44 + #define INT_GPIO_BANK1 (NR_IRQS_LEGACY + 14) 45 + #define INT_UART3 (NR_IRQS_LEGACY + 15) 46 + #define INT_TIMER3 (NR_IRQS_LEGACY + 16) 47 + #define INT_DMA_CH0_6 (NR_IRQS_LEGACY + 19) 48 + #define INT_DMA_CH1_7 (NR_IRQS_LEGACY + 20) 49 + #define INT_DMA_CH2_8 (NR_IRQS_LEGACY + 21) 50 + #define INT_DMA_CH3 (NR_IRQS_LEGACY + 22) 51 + #define INT_DMA_CH4 (NR_IRQS_LEGACY + 23) 52 + #define INT_DMA_CH5 (NR_IRQS_LEGACY + 24) 53 + #define INT_TIMER1 (NR_IRQS_LEGACY + 26) 54 + #define INT_WD_TIMER (NR_IRQS_LEGACY + 27) 55 + #define INT_BRIDGE_PUB (NR_IRQS_LEGACY + 28) 56 + #define INT_TIMER2 (NR_IRQS_LEGACY + 30) 57 + #define INT_LCD_CTRL (NR_IRQS_LEGACY + 31) 58 58 59 59 /* 60 60 * OMAP-1510 specific IRQ numbers for interrupt handler 1 61 61 */ 62 - #define INT_1510_IH2_IRQ 0 63 - #define INT_1510_RES2 2 64 - #define INT_1510_SPI_TX 4 65 - #define INT_1510_SPI_RX 5 66 - #define INT_1510_DSP_MAILBOX1 10 67 - #define INT_1510_DSP_MAILBOX2 11 68 - #define INT_1510_RES12 12 69 - #define INT_1510_LB_MMU 17 70 - #define INT_1510_RES18 18 71 - #define INT_1510_LOCAL_BUS 29 62 + #define INT_1510_IH2_IRQ (NR_IRQS_LEGACY + 0) 63 + #define INT_1510_RES2 (NR_IRQS_LEGACY + 2) 64 + #define INT_1510_SPI_TX (NR_IRQS_LEGACY + 4) 65 + #define INT_1510_SPI_RX (NR_IRQS_LEGACY + 5) 66 + #define INT_1510_DSP_MAILBOX1 (NR_IRQS_LEGACY + 10) 67 + #define INT_1510_DSP_MAILBOX2 (NR_IRQS_LEGACY + 11) 68 + #define INT_1510_RES12 (NR_IRQS_LEGACY + 12) 69 + #define INT_1510_LB_MMU (NR_IRQS_LEGACY + 17) 70 + #define INT_1510_RES18 (NR_IRQS_LEGACY + 18) 71 + #define INT_1510_LOCAL_BUS (NR_IRQS_LEGACY + 29) 72 72 73 73 /* 74 74 * OMAP-1610 specific IRQ numbers for interrupt handler 1 75 75 */ 76 76 #define INT_1610_IH2_IRQ INT_1510_IH2_IRQ 77 - #define INT_1610_IH2_FIQ 2 78 - #define INT_1610_McBSP2_TX 4 79 - #define INT_1610_McBSP2_RX 5 80 - #define INT_1610_DSP_MAILBOX1 10 81 - #define INT_1610_DSP_MAILBOX2 11 82 - #define INT_1610_LCD_LINE 12 83 - #define INT_1610_GPTIMER1 17 84 - #define INT_1610_GPTIMER2 18 85 - #define INT_1610_SSR_FIFO_0 29 77 + #define INT_1610_IH2_FIQ (NR_IRQS_LEGACY + 2) 78 + #define INT_1610_McBSP2_TX (NR_IRQS_LEGACY + 4) 79 + #define INT_1610_McBSP2_RX (NR_IRQS_LEGACY + 5) 80 + #define INT_1610_DSP_MAILBOX1 (NR_IRQS_LEGACY + 10) 81 + #define INT_1610_DSP_MAILBOX2 (NR_IRQS_LEGACY + 11) 82 + #define INT_1610_LCD_LINE (NR_IRQS_LEGACY + 12) 83 + #define INT_1610_GPTIMER1 (NR_IRQS_LEGACY + 17) 84 + #define INT_1610_GPTIMER2 (NR_IRQS_LEGACY + 18) 85 + #define INT_1610_SSR_FIFO_0 (NR_IRQS_LEGACY + 29) 86 86 87 87 /* 88 88 * OMAP-7xx specific IRQ numbers for interrupt handler 1 89 89 */ 90 - #define INT_7XX_IH2_FIQ 0 91 - #define INT_7XX_IH2_IRQ 1 92 - #define INT_7XX_USB_NON_ISO 2 93 - #define INT_7XX_USB_ISO 3 94 - #define INT_7XX_ICR 4 95 - #define INT_7XX_EAC 5 96 - #define INT_7XX_GPIO_BANK1 6 97 - #define INT_7XX_GPIO_BANK2 7 98 - #define INT_7XX_GPIO_BANK3 8 99 - #define INT_7XX_McBSP2TX 10 100 - #define INT_7XX_McBSP2RX 11 101 - #define INT_7XX_McBSP2RX_OVF 12 102 - #define INT_7XX_LCD_LINE 14 103 - #define INT_7XX_GSM_PROTECT 15 104 - #define INT_7XX_TIMER3 16 105 - #define INT_7XX_GPIO_BANK5 17 106 - #define INT_7XX_GPIO_BANK6 18 107 - #define INT_7XX_SPGIO_WR 29 90 + #define INT_7XX_IH2_FIQ (NR_IRQS_LEGACY + 0) 91 + #define INT_7XX_IH2_IRQ (NR_IRQS_LEGACY + 1) 92 + #define INT_7XX_USB_NON_ISO (NR_IRQS_LEGACY + 2) 93 + #define INT_7XX_USB_ISO (NR_IRQS_LEGACY + 3) 94 + #define INT_7XX_ICR (NR_IRQS_LEGACY + 4) 95 + #define INT_7XX_EAC (NR_IRQS_LEGACY + 5) 96 + #define INT_7XX_GPIO_BANK1 (NR_IRQS_LEGACY + 6) 97 + #define INT_7XX_GPIO_BANK2 (NR_IRQS_LEGACY + 7) 98 + #define INT_7XX_GPIO_BANK3 (NR_IRQS_LEGACY + 8) 99 + #define INT_7XX_McBSP2TX (NR_IRQS_LEGACY + 10) 100 + #define INT_7XX_McBSP2RX (NR_IRQS_LEGACY + 11) 101 + #define INT_7XX_McBSP2RX_OVF (NR_IRQS_LEGACY + 12) 102 + #define INT_7XX_LCD_LINE (NR_IRQS_LEGACY + 14) 103 + #define INT_7XX_GSM_PROTECT (NR_IRQS_LEGACY + 15) 104 + #define INT_7XX_TIMER3 (NR_IRQS_LEGACY + 16) 105 + #define INT_7XX_GPIO_BANK5 (NR_IRQS_LEGACY + 17) 106 + #define INT_7XX_GPIO_BANK6 (NR_IRQS_LEGACY + 18) 107 + #define INT_7XX_SPGIO_WR (NR_IRQS_LEGACY + 29) 108 108 109 109 /* 110 110 * IRQ numbers for interrupt handler 2 111 111 * 112 112 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below 113 113 */ 114 - #define IH2_BASE 32 114 + #define IH2_BASE (NR_IRQS_LEGACY + 32) 115 115 116 116 #define INT_KEYBOARD (1 + IH2_BASE) 117 117 #define INT_uWireTX (2 + IH2_BASE) ··· 255 255 #endif 256 256 #define OMAP_FPGA_IRQ_END (OMAP_FPGA_IRQ_BASE + OMAP_FPGA_NR_IRQS) 257 257 258 - #define NR_IRQS OMAP_FPGA_IRQ_END 259 - 260 - #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) 261 - 262 - #include <mach/hardware.h> 258 + #define OMAP_IRQ_BIT(irq) (1 << ((irq - NR_IRQS_LEGACY) % 32)) 263 259 264 260 #ifdef CONFIG_FIQ 265 261 #define FIQ_START 1024
+4
arch/arm/mach-omap1/include/mach/soc.h
··· 28 28 #ifndef __ASM_ARCH_OMAP_CPU_H 29 29 #define __ASM_ARCH_OMAP_CPU_H 30 30 31 + #include <asm/irq.h> 32 + #include <mach/hardware.h> 33 + #include <mach/irqs.h> 34 + 31 35 #ifndef __ASSEMBLY__ 32 36 33 37 #include <linux/bitops.h>
+1
arch/arm/mach-omap1/irq.c
··· 233 233 irq_base = 0; 234 234 } 235 235 omap_l2_irq = cpu_is_omap7xx() ? irq_base + 1 : irq_base; 236 + omap_l2_irq -= NR_IRQS_LEGACY; 236 237 237 238 domain = irq_domain_add_legacy(NULL, nr_irqs, irq_base, 0, 238 239 &irq_domain_simple_ops, NULL);
+2 -2
arch/arm/mach-omap1/timer.c
··· 27 27 #include <linux/platform_device.h> 28 28 #include <linux/platform_data/dmtimer-omap.h> 29 29 30 - #include <mach/irqs.h> 31 - 32 30 #include <plat/dmtimer.h> 31 + 32 + #include "soc.h" 33 33 34 34 #define OMAP1610_GPTIMER1_BASE 0xfffb1400 35 35 #define OMAP1610_GPTIMER2_BASE 0xfffb1c00
+4
arch/arm/plat-omap/dma.c
··· 38 38 39 39 #include <linux/omap-dma.h> 40 40 41 + #ifdef CONFIG_ARCH_OMAP1 42 + #include <mach/soc.h> 43 + #endif 44 + 41 45 /* 42 46 * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA 43 47 * channels that an instance of the SDMA IP block can support. Used