From: Arnd Bergmann <arnd@kernel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
Hartley Sweeten <hsweeten@visionengravers.com>,
Alexander Sverdlin <alexander.sverdlin@gmail.com>,
Hubert Feurstein <hubert.feurstein@contec.at>,
Lukasz Majewski <lukma@denx.de>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Linus Walleij <linus.walleij@linaro.org>,
Imre Kaloz <kaloz@openwrt.org>,
Krzysztof Halasa <khalasa@piap.pl>, Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Simtec Linux Team <linux@simtec.co.uk>,
Liviu Dudau <liviu.dudau@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Ard Biesheuvel <ardb@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH 03/12] ARM: ep93xx: enable SPARSE_IRQ
Date: Tue, 5 Apr 2022 11:17:41 +0200 [thread overview]
Message-ID: <20220405091750.3076973-4-arnd@kernel.org> (raw)
In-Reply-To: <20220405091750.3076973-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
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>
---
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@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,
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@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,
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@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,
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@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,
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@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,
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@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,
--
2.29.2
next prev parent reply other threads:[~2022-04-05 14:06 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 9:17 [PATCH 00/12] ARM: ARMv5 multiplatform conversions Arnd Bergmann
2022-04-05 9:17 ` [PATCH 01/12] ARM: versatile: move integrator/realview/vexpress to versatile Arnd Bergmann
2022-04-05 14:15 ` Sudeep Holla
2022-04-05 18:33 ` Arnd Bergmann
2022-04-05 16:30 ` Linus Walleij
2022-04-05 9:17 ` [PATCH 02/12] ARM: ep93xx: renumber interrupts Arnd Bergmann
2022-04-05 9:42 ` Lukasz Majewski
2022-04-07 8:29 ` Alexander Sverdlin
2022-04-05 9:17 ` Arnd Bergmann [this message]
2022-04-05 9:42 ` [PATCH 03/12] ARM: ep93xx: enable SPARSE_IRQ Lukasz Majewski
2022-04-07 8:30 ` Alexander Sverdlin
2022-04-05 9:17 ` [PATCH 04/12] ARM: ep93xx: make mach/ep93xx-regs.h local Arnd Bergmann
2022-04-05 9:43 ` Lukasz Majewski
2022-04-07 8:31 ` Alexander Sverdlin
2022-04-05 9:17 ` [PATCH 05/12] ARM: ep93xx: multiplatform support Arnd Bergmann
2022-04-05 9:44 ` Lukasz Majewski
2022-04-07 8:32 ` Alexander Sverdlin
2022-04-05 9:17 ` [PATCH 06/12] ARM: dove: " Arnd Bergmann
2022-04-05 9:17 ` [PATCH 07/12] ARM: s3c24xx: remove support for ISA drivers on BAST PC/104 Arnd Bergmann
2022-04-07 7:27 ` Krzysztof Kozlowski
2022-04-05 9:17 ` [PATCH 08/12] ARM: s3c24xx: convert to sparse-irq Arnd Bergmann
2022-04-07 7:29 ` Krzysztof Kozlowski
2022-04-05 9:17 ` [PATCH 09/12] ARM: s3c: enable s3c24xx multiplatform support Arnd Bergmann
2022-04-07 7:30 ` Krzysztof Kozlowski
2022-04-05 9:17 ` [PATCH 10/12] ARM: iop32x: enable " Arnd Bergmann
2022-04-05 9:17 ` [PATCH 11/12] ARM: rework endianess selection Arnd Bergmann
2022-04-05 9:17 ` [PATCH 12/12] ARM: ixp4xx: enable multiplatform support Arnd Bergmann
2022-04-07 7:07 ` [PATCH 00/12] ARM: ARMv5 multiplatform conversions Krzysztof Kozlowski
2022-04-07 7:31 ` Arnd Bergmann
2022-04-07 9:23 ` Alexander Sverdlin
2022-04-07 10:08 ` Arnd Bergmann
2022-04-07 10:37 ` Alexander Sverdlin
2022-04-07 20:42 ` Linus Walleij
2022-04-08 15:12 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220405091750.3076973-4-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=alexander.sverdlin@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=andrew@lunn.ch \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=geert+renesas@glider.be \
--cc=gregory.clement@bootlin.com \
--cc=hsweeten@visionengravers.com \
--cc=hubert.feurstein@contec.at \
--cc=kaloz@openwrt.org \
--cc=khalasa@piap.pl \
--cc=krzk@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@simtec.co.uk \
--cc=liviu.dudau@arm.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=lukma@denx.de \
--cc=patches@opensource.cirrus.com \
--cc=sboyd@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox