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

ARM: dove: fix legacy dove IRQ numbers

v3.18 changed handle_IRQ() to call __handle_domain_irq(), which now
rejects attempts to deliver IRQ0. Since IRQ 0 is used as the timer
interrupt (just like the PIT on x86), this causes boot to fail as the
bogomips calibration never completes.

Fix this by shuffling all interrupts up by one.

Fixes: a71b092a9c68 ("ARM: Convert handle_IRQ to use __handle_domain_irq")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

authored by

Russell King and committed by
Gregory CLEMENT
5d6bed2a 2f5bc307

+63 -63
+59 -59
arch/arm/mach-dove/include/mach/irqs.h
··· 14 14 /* 15 15 * Dove Low Interrupt Controller 16 16 */ 17 - #define IRQ_DOVE_BRIDGE 0 18 - #define IRQ_DOVE_H2C 1 19 - #define IRQ_DOVE_C2H 2 20 - #define IRQ_DOVE_NAND 3 21 - #define IRQ_DOVE_PDMA 4 22 - #define IRQ_DOVE_SPI1 5 23 - #define IRQ_DOVE_SPI0 6 24 - #define IRQ_DOVE_UART_0 7 25 - #define IRQ_DOVE_UART_1 8 26 - #define IRQ_DOVE_UART_2 9 27 - #define IRQ_DOVE_UART_3 10 28 - #define IRQ_DOVE_I2C 11 29 - #define IRQ_DOVE_GPIO_0_7 12 30 - #define IRQ_DOVE_GPIO_8_15 13 31 - #define IRQ_DOVE_GPIO_16_23 14 32 - #define IRQ_DOVE_PCIE0_ERR 15 33 - #define IRQ_DOVE_PCIE0 16 34 - #define IRQ_DOVE_PCIE1_ERR 17 35 - #define IRQ_DOVE_PCIE1 18 36 - #define IRQ_DOVE_I2S0 19 37 - #define IRQ_DOVE_I2S0_ERR 20 38 - #define IRQ_DOVE_I2S1 21 39 - #define IRQ_DOVE_I2S1_ERR 22 40 - #define IRQ_DOVE_USB_ERR 23 41 - #define IRQ_DOVE_USB0 24 42 - #define IRQ_DOVE_USB1 25 43 - #define IRQ_DOVE_GE00_RX 26 44 - #define IRQ_DOVE_GE00_TX 27 45 - #define IRQ_DOVE_GE00_MISC 28 46 - #define IRQ_DOVE_GE00_SUM 29 47 - #define IRQ_DOVE_GE00_ERR 30 48 - #define IRQ_DOVE_CRYPTO 31 17 + #define IRQ_DOVE_BRIDGE (1 + 0) 18 + #define IRQ_DOVE_H2C (1 + 1) 19 + #define IRQ_DOVE_C2H (1 + 2) 20 + #define IRQ_DOVE_NAND (1 + 3) 21 + #define IRQ_DOVE_PDMA (1 + 4) 22 + #define IRQ_DOVE_SPI1 (1 + 5) 23 + #define IRQ_DOVE_SPI0 (1 + 6) 24 + #define IRQ_DOVE_UART_0 (1 + 7) 25 + #define IRQ_DOVE_UART_1 (1 + 8) 26 + #define IRQ_DOVE_UART_2 (1 + 9) 27 + #define IRQ_DOVE_UART_3 (1 + 10) 28 + #define IRQ_DOVE_I2C (1 + 11) 29 + #define IRQ_DOVE_GPIO_0_7 (1 + 12) 30 + #define IRQ_DOVE_GPIO_8_15 (1 + 13) 31 + #define IRQ_DOVE_GPIO_16_23 (1 + 14) 32 + #define IRQ_DOVE_PCIE0_ERR (1 + 15) 33 + #define IRQ_DOVE_PCIE0 (1 + 16) 34 + #define IRQ_DOVE_PCIE1_ERR (1 + 17) 35 + #define IRQ_DOVE_PCIE1 (1 + 18) 36 + #define IRQ_DOVE_I2S0 (1 + 19) 37 + #define IRQ_DOVE_I2S0_ERR (1 + 20) 38 + #define IRQ_DOVE_I2S1 (1 + 21) 39 + #define IRQ_DOVE_I2S1_ERR (1 + 22) 40 + #define IRQ_DOVE_USB_ERR (1 + 23) 41 + #define IRQ_DOVE_USB0 (1 + 24) 42 + #define IRQ_DOVE_USB1 (1 + 25) 43 + #define IRQ_DOVE_GE00_RX (1 + 26) 44 + #define IRQ_DOVE_GE00_TX (1 + 27) 45 + #define IRQ_DOVE_GE00_MISC (1 + 28) 46 + #define IRQ_DOVE_GE00_SUM (1 + 29) 47 + #define IRQ_DOVE_GE00_ERR (1 + 30) 48 + #define IRQ_DOVE_CRYPTO (1 + 31) 49 49 50 50 /* 51 51 * Dove High Interrupt Controller 52 52 */ 53 - #define IRQ_DOVE_AC97 32 54 - #define IRQ_DOVE_PMU 33 55 - #define IRQ_DOVE_CAM 34 56 - #define IRQ_DOVE_SDIO0 35 57 - #define IRQ_DOVE_SDIO1 36 58 - #define IRQ_DOVE_SDIO0_WAKEUP 37 59 - #define IRQ_DOVE_SDIO1_WAKEUP 38 60 - #define IRQ_DOVE_XOR_00 39 61 - #define IRQ_DOVE_XOR_01 40 62 - #define IRQ_DOVE_XOR0_ERR 41 63 - #define IRQ_DOVE_XOR_10 42 64 - #define IRQ_DOVE_XOR_11 43 65 - #define IRQ_DOVE_XOR1_ERR 44 66 - #define IRQ_DOVE_LCD_DCON 45 67 - #define IRQ_DOVE_LCD1 46 68 - #define IRQ_DOVE_LCD0 47 69 - #define IRQ_DOVE_GPU 48 70 - #define IRQ_DOVE_PERFORM_MNTR 49 71 - #define IRQ_DOVE_VPRO_DMA1 51 72 - #define IRQ_DOVE_SSP_TIMER 54 73 - #define IRQ_DOVE_SSP 55 74 - #define IRQ_DOVE_MC_L2_ERR 56 75 - #define IRQ_DOVE_CRYPTO_ERR 59 76 - #define IRQ_DOVE_GPIO_24_31 60 77 - #define IRQ_DOVE_HIGH_GPIO 61 78 - #define IRQ_DOVE_SATA 62 53 + #define IRQ_DOVE_AC97 (1 + 32) 54 + #define IRQ_DOVE_PMU (1 + 33) 55 + #define IRQ_DOVE_CAM (1 + 34) 56 + #define IRQ_DOVE_SDIO0 (1 + 35) 57 + #define IRQ_DOVE_SDIO1 (1 + 36) 58 + #define IRQ_DOVE_SDIO0_WAKEUP (1 + 37) 59 + #define IRQ_DOVE_SDIO1_WAKEUP (1 + 38) 60 + #define IRQ_DOVE_XOR_00 (1 + 39) 61 + #define IRQ_DOVE_XOR_01 (1 + 40) 62 + #define IRQ_DOVE_XOR0_ERR (1 + 41) 63 + #define IRQ_DOVE_XOR_10 (1 + 42) 64 + #define IRQ_DOVE_XOR_11 (1 + 43) 65 + #define IRQ_DOVE_XOR1_ERR (1 + 44) 66 + #define IRQ_DOVE_LCD_DCON (1 + 45) 67 + #define IRQ_DOVE_LCD1 (1 + 46) 68 + #define IRQ_DOVE_LCD0 (1 + 47) 69 + #define IRQ_DOVE_GPU (1 + 48) 70 + #define IRQ_DOVE_PERFORM_MNTR (1 + 49) 71 + #define IRQ_DOVE_VPRO_DMA1 (1 + 51) 72 + #define IRQ_DOVE_SSP_TIMER (1 + 54) 73 + #define IRQ_DOVE_SSP (1 + 55) 74 + #define IRQ_DOVE_MC_L2_ERR (1 + 56) 75 + #define IRQ_DOVE_CRYPTO_ERR (1 + 59) 76 + #define IRQ_DOVE_GPIO_24_31 (1 + 60) 77 + #define IRQ_DOVE_HIGH_GPIO (1 + 61) 78 + #define IRQ_DOVE_SATA (1 + 62) 79 79 80 80 /* 81 81 * DOVE General Purpose Pins 82 82 */ 83 - #define IRQ_DOVE_GPIO_START 64 83 + #define IRQ_DOVE_GPIO_START 65 84 84 #define NR_GPIO_IRQS 64 85 85 86 86 /*
+4 -4
arch/arm/mach-dove/irq.c
··· 126 126 stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_LOW_OFF); 127 127 stat &= readl_relaxed(dove_irq_base + IRQ_MASK_LOW_OFF); 128 128 if (stat) { 129 - unsigned int hwirq = __fls(stat); 129 + unsigned int hwirq = 1 + __fls(stat); 130 130 handle_IRQ(hwirq, regs); 131 131 return; 132 132 } 133 133 stat = readl_relaxed(dove_irq_base + IRQ_CAUSE_HIGH_OFF); 134 134 stat &= readl_relaxed(dove_irq_base + IRQ_MASK_HIGH_OFF); 135 135 if (stat) { 136 - unsigned int hwirq = 32 + __fls(stat); 136 + unsigned int hwirq = 33 + __fls(stat); 137 137 handle_IRQ(hwirq, regs); 138 138 return; 139 139 } ··· 144 144 { 145 145 int i; 146 146 147 - orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); 148 - orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); 147 + orion_irq_init(1, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); 148 + orion_irq_init(33, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); 149 149 150 150 #ifdef CONFIG_MULTI_IRQ_HANDLER 151 151 set_handle_irq(dove_legacy_handle_irq);