ARM: s3c24xx: convert to sparse-irq

As a final bit of preparation for converting to ARCH_MULTIPLATFORM,
change the interrupt handling for s3c24xx to use sparse IRQs.

Since the number of possible interrupts is already fixed and relatively
small per chip, just make it use all legacy interrupts preallocated
using the .nr_irqs field in the machine descriptor, rather than actually
allocating domains on the fly.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2022-04-02 15:28:18 +02:00
parent 91276c0fa4
commit c78a41fc04
54 changed files with 69 additions and 36 deletions

View File

@ -444,8 +444,10 @@ config ARCH_S3C24XX
select CLKSRC_SAMSUNG_PWM
select GPIO_SAMSUNG
select GPIOLIB
select IRQ_DOMAIN
select S3C2410_WATCHDOG
select SAMSUNG_ATAGS
select SPARSE_IRQ
select USE_OF
select WATCHDOG
help

View File

@ -20,7 +20,7 @@
#include <asm/mach/irq.h>
#include "map.h"
#include <mach/irqs.h>
#include "irqs.h"
#include "bast.h"

View File

@ -16,7 +16,7 @@
#include <asm/mach/irq.h>
#include "regs-irq.h"
#include <mach/irqs.h>
#include "irqs.h"
#include "bast.h"

View File

@ -10,7 +10,7 @@
#include <linux/gpio.h>
#include <linux/export.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "map.h"
#include "devs.h"

View File

@ -16,7 +16,7 @@
#include <asm/mach/arch.h>
#include <asm/mach/irq.h>
#include "map.h"
#include <mach/irqs.h>
#include "irqs.h"
#include "devs.h"

View File

@ -38,7 +38,7 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "map.h"
#include "gpio-samsung.h"
#include "gpio-cfg.h"

View File

@ -26,7 +26,7 @@
#include <asm/irq.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"

View File

@ -26,7 +26,7 @@
#include <asm/exception.h>
#include <asm/mach/irq.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "regs-irq.h"
#include "regs-gpio.h"

View File

@ -108,6 +108,8 @@
#define IRQ_TC S3C2410_IRQSUB(9)
#define IRQ_ADC S3C2410_IRQSUB(10)
#define NR_IRQS_S3C2410 (S3C2410_IRQSUB(10) + 1)
/* extra irqs for s3c2412 */
#define IRQ_S3C2412_CFSDI S3C2410_IRQ(21)
@ -115,6 +117,7 @@
#define IRQ_S3C2412_SDI S3C2410_IRQSUB(13)
#define IRQ_S3C2412_CF S3C2410_IRQSUB(14)
#define NR_IRQS_S3C2412 (S3C2410_IRQSUB(14) + 1)
#define IRQ_S3C2416_EINT8t15 S3C2410_IRQ(5)
#define IRQ_S3C2416_DMA S3C2410_IRQ(17)
@ -146,13 +149,20 @@
#define IRQ_S3C2416_I2S0 S3C2416_IRQ(6)
#define IRQ_S3C2416_I2S1 S3C2416_IRQ(7)
/* extra irqs for s3c2440 */
#define NR_IRQS_S3C2416 (S3C2416_IRQ(7) + 1)
/* extra irqs for s3c2440/s3c2442 */
#define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */
#define IRQ_S3C2440_CAM_P S3C2410_IRQSUB(12) /* S3C2443 too */
#define NR_IRQS_S3C2442 (S3C2410_IRQSUB(12) + 1)
#define IRQ_S3C2440_WDT S3C2410_IRQSUB(13)
#define IRQ_S3C2440_AC97 S3C2410_IRQSUB(14)
#define NR_IRQS_S3C2440 (S3C2410_IRQSUB(14) + 1)
/* irqs for s3c2443 */
#define IRQ_S3C2443_DMA S3C2410_IRQ(17) /* IRQ_DMA1 */
@ -186,11 +196,7 @@
#define IRQ_S3C2443_WDT S3C2410_IRQSUB(27)
#define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28)
#if defined(CONFIG_CPU_S3C2416)
#define NR_IRQS (IRQ_S3C2416_I2S1 + 1)
#else
#define NR_IRQS (IRQ_S3C2443_AC97 + 1)
#endif
#define NR_IRQS_S3C2443 (S3C2410_IRQSUB(28) + 1)
/* compatibility define. */
#define IRQ_UART3 IRQ_S3C2443_UART3

View File

@ -239,7 +239,9 @@ static void __init amlm5900_init(void)
MACHINE_START(AML_M5900, "AML_M5900")
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.map_io = amlm5900_map_io,
.nr_irqs = NR_IRQS_S3C2410,
.init_irq = s3c2410_init_irq,
.init_machine = amlm5900_init,
.init_time = amlm5900_init_time,

View File

@ -414,6 +414,7 @@ static void __init anubis_init(void)
MACHINE_START(ANUBIS, "Simtec-Anubis")
/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2440,
.map_io = anubis_map_io,
.init_machine = anubis_init,
.init_irq = s3c2440_init_irq,

View File

@ -40,7 +40,7 @@
#include "devs.h"
#include "cpu.h"
#include <mach/irqs.h>
#include "irqs.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"

View File

@ -225,6 +225,7 @@ static void __init at2440evb_init(void)
MACHINE_START(AT2440EVB, "AT2440EVB")
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2440,
.map_io = at2440evb_map_io,
.init_machine = at2440evb_init,
.init_irq = s3c2440_init_irq,

View File

@ -575,6 +575,7 @@ static void __init bast_init(void)
MACHINE_START(BAST, "Simtec-BAST")
/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.map_io = bast_map_io,
.init_irq = s3c2410_init_irq,
.init_machine = bast_init,

View File

@ -28,7 +28,7 @@
#include <linux/platform_data/spi-s3c64xx.h>
#include "cpu.h"
#include <mach/irqs.h>
#include "irqs.h"
#include "crag6410.h"

View File

@ -47,7 +47,7 @@
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <mach/irqs.h>
#include "irqs.h"
#include "fb.h"
#include "sdhci.h"

View File

@ -572,6 +572,7 @@ static void __init gta02_init_time(void)
MACHINE_START(NEO1973_GTA02, "GTA02")
/* Maintainer: Nelson Castillo <arhuaco@freaks-unidos.net> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2442,
.map_io = gta02_map_io,
.init_irq = s3c2442_init_irq,
.init_machine = gta02_machine_init,

View File

@ -793,6 +793,7 @@ static void __init h1940_init(void)
MACHINE_START(H1940, "IPAQ-H1940")
/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.map_io = h1940_map_io,
.reserve = h1940_reserve,
.init_irq = s3c2410_init_irq,

View File

@ -26,7 +26,7 @@
#include <video/samsung_fimd.h>
#include "map.h"
#include <mach/irqs.h>
#include "irqs.h"
#include <asm/irq.h>
#include <asm/mach-types.h>

View File

@ -677,7 +677,7 @@ static void __init jive_machine_init(void)
MACHINE_START(JIVE, "JIVE")
/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2412,
.init_irq = s3c2412_init_irq,
.map_io = jive_map_io,
.init_machine = jive_machine_init,

View File

@ -35,7 +35,7 @@
#include "regs-gpio.h"
#include <linux/platform_data/leds-s3c24xx.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "gpio-samsung.h"
#include <linux/platform_data/mtd-nand-s3c2410.h>
#include <linux/platform_data/i2c-s3c2410.h>
@ -789,6 +789,7 @@ static void __init mini2440_init(void)
MACHINE_START(MINI2440, "MINI2440")
/* Maintainer: Michel Pollet <buserror@gmail.com> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2440,
.map_io = mini2440_map_io,
.init_machine = mini2440_init,
.init_irq = s3c2440_init_irq,

View File

@ -35,7 +35,7 @@
#include <linux/platform_data/mmc-sdhci-s3c.h>
#include "sdhci.h"
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <mach/irqs.h>
#include "irqs.h"
#include <video/platform_lcd.h>
#include <video/samsung_fimd.h>

View File

@ -656,6 +656,7 @@ MACHINE_START(N30, "Acer-N30")
Ben Dooks <ben-linux@fluff.org>
*/
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.init_time = n30_init_time,
.init_machine = n30_init,
.init_irq = s3c2410_init_irq,
@ -666,6 +667,7 @@ MACHINE_START(N35, "Acer-N35")
/* Maintainer: Christer Weinigel <christer@weinigel.se>
*/
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.init_time = n30_init_time,
.init_machine = n30_init,
.init_irq = s3c2410_init_irq,

View File

@ -24,7 +24,7 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "map.h"
#include <asm/irq.h>

View File

@ -154,6 +154,7 @@ static void __init nexcoder_init(void)
MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
/* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2440,
.map_io = nexcoder_map_io,
.init_machine = nexcoder_init,
.init_irq = s3c2440_init_irq,

View File

@ -397,6 +397,7 @@ static void __init osiris_init(void)
MACHINE_START(OSIRIS, "Simtec-OSIRIS")
/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2440,
.map_io = osiris_map_io,
.init_irq = s3c2440_init_irq,
.init_machine = osiris_init,

View File

@ -116,6 +116,7 @@ static void __init otom11_init(void)
MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
/* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.map_io = otom11_map_io,
.init_machine = otom11_init,
.init_irq = s3c2410_init_irq,

View File

@ -367,6 +367,7 @@ static void __init qt2410_machine_init(void)
MACHINE_START(QT2410, "QT2410")
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.map_io = qt2410_map_io,
.init_irq = s3c2410_init_irq,
.init_machine = qt2410_machine_init,

View File

@ -27,7 +27,7 @@
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"
#include <mach/irqs.h>
#include "irqs.h"
#include <linux/soc/samsung/s3c-adc.h>
#include "cpu.h"

View File

@ -868,6 +868,7 @@ static void __init rx1950_reserve(void)
MACHINE_START(RX1950, "HP iPAQ RX1950")
/* Maintainers: Vasily Khoruzhick */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2442,
.map_io = rx1950_map_io,
.reserve = rx1950_reserve,
.init_irq = s3c2442_init_irq,

View File

@ -204,6 +204,7 @@ static void __init rx3715_init_machine(void)
MACHINE_START(RX3715, "IPAQ-RX3715")
/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2440,
.map_io = rx3715_map_io,
.reserve = rx3715_reserve,
.init_irq = s3c2440_init_irq,

View File

@ -14,7 +14,7 @@
#include <asm/mach/arch.h>
#include <video/samsung_fimd.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"

View File

@ -14,7 +14,7 @@
#include <asm/mach/arch.h>
#include <video/samsung_fimd.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "map.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"

View File

@ -104,6 +104,7 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
* to SMDK2410 */
/* Maintainer: Jonas Dietsche */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.map_io = smdk2410_map_io,
.init_irq = s3c2410_init_irq,
.init_machine = smdk2410_init,

View File

@ -129,6 +129,7 @@ static void __init smdk2413_machine_init(void)
MACHINE_START(S3C2413, "S3C2413")
/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2412,
.fixup = smdk2413_fixup,
.init_irq = s3c2412_init_irq,
@ -140,6 +141,7 @@ MACHINE_END
MACHINE_START(SMDK2412, "SMDK2412")
/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2412,
.fixup = smdk2413_fixup,
.init_irq = s3c2412_init_irq,
@ -151,6 +153,7 @@ MACHINE_END
MACHINE_START(SMDK2413, "SMDK2413")
/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2412,
.fixup = smdk2413_fixup,
.init_irq = s3c2412_init_irq,

View File

@ -239,6 +239,7 @@ static void __init smdk2416_machine_init(void)
MACHINE_START(SMDK2416, "SMDK2416")
/* Maintainer: Yauhen Kharuzhy <jekhor@gmail.com> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2416,
.init_irq = s3c2416_init_irq,
.map_io = smdk2416_map_io,

View File

@ -171,6 +171,7 @@ static void __init smdk2440_machine_init(void)
MACHINE_START(S3C2440, "SMDK2440")
/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2440,
.init_irq = s3c2440_init_irq,
.map_io = smdk2440_map_io,

View File

@ -118,7 +118,7 @@ static void __init smdk2443_machine_init(void)
MACHINE_START(SMDK2443, "SMDK2443")
/* Maintainer: Ben Dooks <ben-linux@fluff.org> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2443,
.init_irq = s3c2443_init_irq,
.map_io = smdk2443_map_io,
.init_machine = smdk2443_machine_init,

View File

@ -22,7 +22,7 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "map.h"
#include "devs.h"

View File

@ -45,7 +45,7 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "map.h"
#include <asm/irq.h>

View File

@ -149,6 +149,7 @@ static void __init tct_hammer_init(void)
MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.map_io = tct_hammer_map_io,
.init_irq = s3c2410_init_irq,
.init_machine = tct_hammer_init,

View File

@ -356,6 +356,7 @@ static void __init vr1000_init(void)
MACHINE_START(VR1000, "Thorcom-VR1000")
/* Maintainer: Ben Dooks <ben@simtec.co.uk> */
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2410,
.map_io = vr1000_map_io,
.init_machine = vr1000_init,
.init_irq = s3c2410_init_irq,

View File

@ -156,6 +156,7 @@ static void __init vstms_init(void)
MACHINE_START(VSTMS, "VSTMS")
.atag_offset = 0x100,
.nr_irqs = NR_IRQS_S3C2412,
.fixup = vstms_fixup,
.init_irq = s3c2412_init_irq,

View File

@ -11,7 +11,7 @@
#include <linux/of.h>
#include "cpu.h"
#include <mach/irqs.h>
#include "irqs.h"
#include "map.h"
#include "regs-sys-s3c64xx.h"

View File

@ -12,7 +12,7 @@
#include "regs-clock.h"
#include "regs-irq-s3c24xx.h"
#include <mach/irqs.h>
#include "irqs.h"
static inline void s3c_pm_debug_init_uart(void)
{

View File

@ -19,7 +19,7 @@
#include <asm/cacheflush.h>
#include <asm/irq.h>
#include <mach/irqs.h>
#include "irqs.h"
#include "regs-gpio.h"
#include "cpu.h"

View File

@ -15,7 +15,7 @@
#include <linux/pm_domain.h>
#include "map.h"
#include <mach/irqs.h>
#include "irqs.h"
#include "cpu.h"
#include "devs.h"

View File

@ -21,7 +21,7 @@
#include "map.h"
#include "regs-clock.h"
#include "regs-irq.h"
#include <mach/irqs.h>
#include "irqs.h"
#include <asm/irq.h>

View File

@ -25,7 +25,7 @@
#include "map.h"
#include "gpio-samsung.h"
#include <mach/irqs.h>
#include "irqs.h"
#include <asm/irq.h>
#include <asm/system_misc.h>

View File

@ -10,7 +10,7 @@
#define __ARCH_ARM_MACH_S3C24XX_COMMON_H __FILE__
#include <linux/reboot.h>
#include <mach/irqs.h>
#include "irqs.h"
struct s3c2410_uartcfg;

View File

@ -36,7 +36,7 @@
#include <asm/system_misc.h>
#include "map.h"
#include <mach/irqs.h>
#include "irqs.h"
#include "regs-gpio.h"
#include "gpio-samsung.h"

View File

@ -24,7 +24,7 @@
#include <asm/mach/irq.h>
#include "gpio-samsung.h"
#include <mach/irqs.h>
#include "irqs.h"
#include <asm/irq.h>
#include <linux/platform_data/usb-ohci-s3c2410.h>