On Tue, 5 Apr 2022 11:17:41 +0200 Arnd Bergmann <arnd@xxxxxxxxxx> wrote: > From: Arnd Bergmann <arnd@xxxxxxxx> > > 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@xxxxxxxxxxxxxxxxxxx> > Cc: Hubert Feurstein <hubert.feurstein@xxxxxxxxx> > Cc: Lukasz Majewski <lukma@xxxxxxx> > Tested-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxx> > Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx> > --- > arch/arm/Kconfig | 2 ++ > arch/arm/mach-ep93xx/adssphere.c | 1 + > arch/arm/mach-ep93xx/core.c | 1 + > arch/arm/mach-ep93xx/edb93xx.c | 8 ++++++++ > arch/arm/mach-ep93xx/gesbc9312.c | 1 + > arch/arm/mach-ep93xx/{include/mach => }/irqs.h | 7 ------- > arch/arm/mach-ep93xx/micro9.c | 4 ++++ > arch/arm/mach-ep93xx/simone.c | 1 + > arch/arm/mach-ep93xx/snappercl15.c | 1 + > arch/arm/mach-ep93xx/soc.h | 1 + > arch/arm/mach-ep93xx/ts72xx.c | 3 ++- > arch/arm/mach-ep93xx/vision_ep9307.c | 1 + > 12 files changed, 23 insertions(+), 8 deletions(-) > rename arch/arm/mach-ep93xx/{include/mach => }/irqs.h (96%) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 31f024e6e925..5177e54cc14c 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -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. > > diff --git a/arch/arm/mach-ep93xx/adssphere.c > b/arch/arm/mach-ep93xx/adssphere.c index 8d5e349a7a6d..0c48d3c5b8e7 > 100644 --- a/arch/arm/mach-ep93xx/adssphere.c > +++ b/arch/arm/mach-ep93xx/adssphere.c > @@ -32,6 +32,7 @@ static void __init adssphere_init_machine(void) > MACHINE_START(ADSSPHERE, "ADS Sphere board") > /* Maintainer: Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx> */ > .atag_offset = 0x100, > + .nr_irqs = NR_EP93XX_IRQS, > .map_io = ep93xx_map_io, > .init_irq = ep93xx_init_irq, > .init_time = ep93xx_timer_init, > diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c > index e4569a5acc3f..2d58e273c96d 100644 > --- a/arch/arm/mach-ep93xx/core.c > +++ b/arch/arm/mach-ep93xx/core.c > @@ -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 > diff --git a/arch/arm/mach-ep93xx/edb93xx.c > b/arch/arm/mach-ep93xx/edb93xx.c index af0e22471ebd..4b90899a66e9 > 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c > +++ b/arch/arm/mach-ep93xx/edb93xx.c > @@ -243,6 +243,7 @@ static void __init edb93xx_init_machine(void) > MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board") > /* Maintainer: H Hartley Sweeten > <hsweeten@xxxxxxxxxxxxxxxxxxx> */ .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@xxxxxxxxxxx> */ > .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@xxxxxxxxxxxxxx> */ > .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@xxxxxxx> */ > .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@xxxxxxxxxxxxxxxxxxx> */ .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@xxxxxxxxxxx> > */ .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@xxxxxxxxxxxxxx> */ > .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@xxxxxxxxxxxxxx> */ > .atag_offset = 0x100, > + .nr_irqs = NR_EP93XX_IRQS, > .map_io = ep93xx_map_io, > .init_irq = ep93xx_init_irq, > .init_time = ep93xx_timer_init, > diff --git a/arch/arm/mach-ep93xx/gesbc9312.c > b/arch/arm/mach-ep93xx/gesbc9312.c index d7f9890321eb..0b7043e3e178 > 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c > +++ b/arch/arm/mach-ep93xx/gesbc9312.c > @@ -32,6 +32,7 @@ static void __init gesbc9312_init_machine(void) > MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") > /* Maintainer: Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx> */ > .atag_offset = 0x100, > + .nr_irqs = NR_EP93XX_IRQS, > .map_io = ep93xx_map_io, > .init_irq = ep93xx_init_irq, > .init_time = ep93xx_timer_init, > diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h > b/arch/arm/mach-ep93xx/irqs.h similarity index 96% > rename from arch/arm/mach-ep93xx/include/mach/irqs.h > rename to arch/arm/mach-ep93xx/irqs.h > index 60c69c4ed7e1..353201b90c66 100644 > --- a/arch/arm/mach-ep93xx/include/mach/irqs.h > +++ b/arch/arm/mach-ep93xx/irqs.h > @@ -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 > diff --git a/arch/arm/mach-ep93xx/micro9.c > b/arch/arm/mach-ep93xx/micro9.c index e6ead8ded6ee..c121c459aa17 > 100644 --- a/arch/arm/mach-ep93xx/micro9.c > +++ b/arch/arm/mach-ep93xx/micro9.c > @@ -76,6 +76,7 @@ static void __init micro9_init_machine(void) > MACHINE_START(MICRO9, "Contec Micro9-High") > /* Maintainer: Hubert Feurstein <hubert.feurstein@xxxxxxxxx> > */ .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@xxxxxxxxx> > */ .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@xxxxxxxxx> > */ .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@xxxxxxxxx> > */ .atag_offset = 0x100, > + .nr_irqs = NR_EP93XX_IRQS, > .map_io = ep93xx_map_io, > .init_irq = ep93xx_init_irq, > .init_time = ep93xx_timer_init, > diff --git a/arch/arm/mach-ep93xx/simone.c > b/arch/arm/mach-ep93xx/simone.c index 5291053023b2..569e72413561 > 100644 --- a/arch/arm/mach-ep93xx/simone.c > +++ b/arch/arm/mach-ep93xx/simone.c > @@ -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, > diff --git a/arch/arm/mach-ep93xx/snappercl15.c > b/arch/arm/mach-ep93xx/snappercl15.c index e200d69471e9..1dfb725671b1 > 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c > +++ b/arch/arm/mach-ep93xx/snappercl15.c > @@ -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, > diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h > index 94ef7f275f94..f0986e288d19 100644 > --- a/arch/arm/mach-ep93xx/soc.h > +++ b/arch/arm/mach-ep93xx/soc.h > @@ -10,6 +10,7 @@ > #define _EP93XX_SOC_H > > #include <mach/ep93xx-regs.h> > +#include "irqs.h" > > /* > * EP93xx Physical Memory Map: > diff --git a/arch/arm/mach-ep93xx/ts72xx.c > b/arch/arm/mach-ep93xx/ts72xx.c index 12eff8c8074d..e70bac011407 > 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c > +++ b/arch/arm/mach-ep93xx/ts72xx.c > @@ -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@xxxxxxxxxxxxxx> */ > .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@xxxxxxx> */ > .atag_offset = 0x100, > + .nr_irqs = NR_EP93XX_IRQS, > .map_io = ts72xx_map_io, > .init_irq = ep93xx_init_irq, > .init_time = ep93xx_timer_init, > diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c > b/arch/arm/mach-ep93xx/vision_ep9307.c index > e46281e60bf7..30d9cf3791eb 100644 --- > a/arch/arm/mach-ep93xx/vision_ep9307.c +++ > b/arch/arm/mach-ep93xx/vision_ep9307.c @@ -302,6 +302,7 @@ static > void __init vision_init_machine(void) MACHINE_START(VISION_EP9307, > "Vision Engraving Systems EP9307") /* Maintainer: H Hartley Sweeten > <hsweeten@xxxxxxxxxxxxxxxxxxx> */ .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, Reviewed-by: Lukasz Majewski <lukma@xxxxxxx> Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@xxxxxxx
Attachment:
pgpcLREOoIL__.pgp
Description: OpenPGP digital signature