]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: ep93xx: enable SPARSE_IRQ
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Sep 2019 08:10:03 +0000 (10:10 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 4 Apr 2022 08:22:37 +0000 (10:22 +0200)
Without CONFIG_SPARSE_IRQ, we rely on mach/irqs.h to define NR_IRQS
globally. Do the minimal conversion by setting .nr_irqs in each
machine descriptor.

Only the vision_ep9307 machine has extra IRQs for GPIOs, so make
.nr_irqs the original value there, while using the plain NR_EP93XX_IRQS
everywhere else.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Hubert Feurstein <hubert.feurstein@contec.at>
Cc: Lukasz Majewski <lukma@denx.de>
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 files changed:
arch/arm/Kconfig
arch/arm/mach-ep93xx/adssphere.c
arch/arm/mach-ep93xx/core.c
arch/arm/mach-ep93xx/edb93xx.c
arch/arm/mach-ep93xx/gesbc9312.c
arch/arm/mach-ep93xx/irqs.h [moved from arch/arm/mach-ep93xx/include/mach/irqs.h with 96% similarity]
arch/arm/mach-ep93xx/micro9.c
arch/arm/mach-ep93xx/simone.c
arch/arm/mach-ep93xx/snappercl15.c
arch/arm/mach-ep93xx/soc.h
arch/arm/mach-ep93xx/ts72xx.c
arch/arm/mach-ep93xx/vision_ep9307.c

index 31f024e6e92535bb46faf0cade8d730b66c7eb83..5177e54cc14c06cc51a9ae8b4689561d4bd38b80 100644 (file)
@@ -358,6 +358,8 @@ config ARCH_EP93XX
        select CPU_ARM920T
        select GPIOLIB
        select COMMON_CLK
+       select IRQ_DOMAIN
+       select SPARSE_IRQ
        help
          This enables support for the Cirrus EP93xx series of CPUs.
 
index 8d5e349a7a6d44c048eed02c52972652ec327a6d..0c48d3c5b8e7c0553f9abb858c8634158c39475c 100644 (file)
@@ -32,6 +32,7 @@ static void __init adssphere_init_machine(void)
 MACHINE_START(ADSSPHERE, "ADS Sphere board")
        /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
index e4569a5acc3f4c1841b8b3c455265b3b2ffdeab4..2d58e273c96dd9e874f15b38b129a959e4caafb7 100644 (file)
@@ -47,6 +47,7 @@
 #include <asm/mach/map.h>
 
 #include "soc.h"
+#include "irqs.h"
 
 /*************************************************************************
  * Static I/O mappings that are needed for all EP93xx platforms
index af0e22471ebd397f4d54f2da983eb526c323a773..4b90899a66e92f1ccd465006a5a1039cce39c6ca 100644 (file)
@@ -243,6 +243,7 @@ static void __init edb93xx_init_machine(void)
 MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
        /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -255,6 +256,7 @@ MACHINE_END
 MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
        /* Maintainer: George Kashperko <george@chas.com.ua> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -267,6 +269,7 @@ MACHINE_END
 MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
        /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -279,6 +282,7 @@ MACHINE_END
 MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
        /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -291,6 +295,7 @@ MACHINE_END
 MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
        /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -303,6 +308,7 @@ MACHINE_END
 MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
        /* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -315,6 +321,7 @@ MACHINE_END
 MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
        /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -327,6 +334,7 @@ MACHINE_END
 MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
        /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
index d7f9890321eb7c3eca398e3379dee94951b7447c..0b7043e3e17857f35cd2f1fad25b6a553ec7762b 100644 (file)
@@ -32,6 +32,7 @@ static void __init gesbc9312_init_machine(void)
 MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
        /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
similarity index 96%
rename from arch/arm/mach-ep93xx/include/mach/irqs.h
rename to arch/arm/mach-ep93xx/irqs.h
index 60c69c4ed7e1d336c59eb1e829b0073a7da55f91..353201b90c665885e2db0d39d70c45ca891e9760 100644 (file)
@@ -1,8 +1,4 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/*
- * arch/arm/mach-ep93xx/include/mach/irqs.h
- */
-
 #ifndef __ASM_ARCH_IRQS_H
 #define __ASM_ARCH_IRQS_H
 
@@ -77,7 +73,4 @@
 #define EP93XX_BOARD_IRQ(x)            (NR_EP93XX_IRQS + (x))
 #define EP93XX_BOARD_IRQS              32
 
-#define NR_IRQS                                (NR_EP93XX_IRQS + EP93XX_BOARD_IRQS)
-
-
 #endif
index e6ead8ded6ee7b5c053b1690c7080f79849d5a3f..c121c459aa17352128ca0812a21d291de5948486 100644 (file)
@@ -76,6 +76,7 @@ static void __init micro9_init_machine(void)
 MACHINE_START(MICRO9, "Contec Micro9-High")
        /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -88,6 +89,7 @@ MACHINE_END
 MACHINE_START(MICRO9M, "Contec Micro9-Mid")
        /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -100,6 +102,7 @@ MACHINE_END
 MACHINE_START(MICRO9L, "Contec Micro9-Lite")
        /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -112,6 +115,7 @@ MACHINE_END
 MACHINE_START(MICRO9S, "Contec Micro9-Slim")
        /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
index 5291053023b2350976117a3c410d5c17681e56cd..569e72413561665dee015fd81c156b4ab5ae9529 100644 (file)
@@ -119,6 +119,7 @@ static void __init simone_init_machine(void)
 MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
        /* Maintainer: Ryan Mallon */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
index e200d69471e90149d70666dd2d0cf6bca51177d5..1dfb725671b144d7ba65c8b3c4200f6f768d31fc 100644 (file)
@@ -153,6 +153,7 @@ static void __init snappercl15_init_machine(void)
 MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
        /* Maintainer: Ryan Mallon */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ep93xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
index 94ef7f275f94bcbb8630040a46268b412daac220..f0986e288d19bc1274282c4a967865f23524e854 100644 (file)
@@ -10,6 +10,7 @@
 #define _EP93XX_SOC_H
 
 #include <mach/ep93xx-regs.h>
+#include "irqs.h"
 
 /*
  * EP93xx Physical Memory Map:
index 12eff8c8074df7e218ce53e5d06a080339110061..e70bac011407a7f18131a4cf87050efe78e3de87 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "gpio-ep93xx.h"
 #include "hardware.h"
-#include <mach/irqs.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
@@ -350,6 +349,7 @@ static void __init ts72xx_init_machine(void)
 MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
        /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ts72xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
@@ -413,6 +413,7 @@ static void __init bk3_init_machine(void)
 MACHINE_START(BK3, "Liebherr controller BK3.1")
        /* Maintainer: Lukasz Majewski <lukma@denx.de> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS,
        .map_io         = ts72xx_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,
index e46281e60bf763486ef71317b9d53713bb6ad8ce..30d9cf3791ebb39e04631d55ef6bd71e72087d87 100644 (file)
@@ -302,6 +302,7 @@ static void __init vision_init_machine(void)
 MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
        /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
        .atag_offset    = 0x100,
+       .nr_irqs        = NR_EP93XX_IRQS + EP93XX_BOARD_IRQS,
        .map_io         = vision_map_io,
        .init_irq       = ep93xx_init_irq,
        .init_time      = ep93xx_timer_init,