mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 12:30:53 +07:00
ARM: orion: use SPARSE_IRQ everywhere
As a preparation for multiplatform support, this moves all the code using plat-orion over to use sparse irq support, which is enabled implicitly for multiplatform. In particular, the hardcoded NR_IRQS macro gets replaced with a machine specific one that is set in the machine descriptor in order to set up a static mapping for all legacy interrupts. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
This commit is contained in:
parent
b8cd337c8e
commit
5cdbe5d23a
@ -515,6 +515,7 @@ config ARCH_DOVE
|
||||
select PINCTRL
|
||||
select PINCTRL_DOVE
|
||||
select PLAT_ORION_LEGACY
|
||||
select SPARSE_IRQ
|
||||
help
|
||||
Support for the Marvell Dove SoC 88AP510
|
||||
|
||||
@ -527,6 +528,7 @@ config ARCH_MV78XX0
|
||||
select MULTI_IRQ_HANDLER
|
||||
select PCI
|
||||
select PLAT_ORION_LEGACY
|
||||
select SPARSE_IRQ
|
||||
help
|
||||
Support for the following Marvell MV78xx0 series SoCs:
|
||||
MV781x0, MV782x0.
|
||||
@ -542,6 +544,7 @@ config ARCH_ORION5X
|
||||
select PCI
|
||||
select PLAT_ORION_LEGACY
|
||||
select MULTI_IRQ_HANDLER
|
||||
select SPARSE_IRQ
|
||||
help
|
||||
Support for the following Marvell Orion 5x series SoCs:
|
||||
Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
|
||||
|
@ -88,6 +88,7 @@ static void __init cm_a510_init(void)
|
||||
|
||||
MACHINE_START(CM_A510, "Compulab CM-A510 Board")
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = DOVE_NR_IRQS,
|
||||
.init_machine = cm_a510_init,
|
||||
.map_io = dove_map_io,
|
||||
.init_early = dove_init_early,
|
||||
|
@ -94,6 +94,7 @@ static void __init dove_db_init(void)
|
||||
|
||||
MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board")
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = DOVE_NR_IRQS,
|
||||
.init_machine = dove_db_init,
|
||||
.map_io = dove_map_io,
|
||||
.init_early = dove_init_early,
|
||||
|
@ -11,6 +11,8 @@
|
||||
#ifndef __ASM_ARCH_DOVE_H
|
||||
#define __ASM_ARCH_DOVE_H
|
||||
|
||||
#include <mach/irqs.h>
|
||||
|
||||
/*
|
||||
* Marvell Dove address maps.
|
||||
*
|
||||
|
@ -90,7 +90,7 @@
|
||||
#define NR_PMU_IRQS 7
|
||||
#define IRQ_DOVE_RTC (IRQ_DOVE_PMU_START + 5)
|
||||
|
||||
#define NR_IRQS (IRQ_DOVE_PMU_START + NR_PMU_IRQS)
|
||||
#define DOVE_NR_IRQS (IRQ_DOVE_PMU_START + NR_PMU_IRQS)
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -63,7 +63,7 @@ static inline int pmu_to_irq(int pin)
|
||||
|
||||
static inline int irq_to_pmu(int irq)
|
||||
{
|
||||
if (IRQ_DOVE_PMU_START <= irq && irq < NR_IRQS)
|
||||
if (IRQ_DOVE_PMU_START <= irq && irq < DOVE_NR_IRQS)
|
||||
return irq - IRQ_DOVE_PMU_START;
|
||||
|
||||
return -EINVAL;
|
||||
|
@ -160,7 +160,7 @@ void __init dove_init_irq(void)
|
||||
writel(0, PMU_INTERRUPT_MASK);
|
||||
writel(0, PMU_INTERRUPT_CAUSE);
|
||||
|
||||
for (i = IRQ_DOVE_PMU_START; i < NR_IRQS; i++) {
|
||||
for (i = IRQ_DOVE_PMU_START; i < DOVE_NR_IRQS; i++) {
|
||||
irq_set_chip_and_handler(i, &pmu_irq_chip, handle_level_irq);
|
||||
irq_set_status_flags(i, IRQ_LEVEL);
|
||||
irq_clear_status_flags(i, IRQ_NOREQUEST);
|
||||
|
@ -146,6 +146,7 @@ subsys_initcall(wxl_pci_init);
|
||||
MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL")
|
||||
/* Maintainer: Sebastien Requiem <sebastien@requiem.fr> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = MV78XX0_NR_IRQS,
|
||||
.init_machine = wxl_init,
|
||||
.map_io = mv78xx0_map_io,
|
||||
.init_early = mv78xx0_init_early,
|
||||
|
@ -94,6 +94,7 @@ subsys_initcall(db78x00_pci_init);
|
||||
MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
|
||||
/* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = MV78XX0_NR_IRQS,
|
||||
.init_machine = db78x00_init,
|
||||
.map_io = mv78xx0_map_io,
|
||||
.init_early = mv78xx0_init_early,
|
||||
|
@ -88,7 +88,7 @@
|
||||
#define IRQ_MV78XX0_GPIO_START 96
|
||||
#define NR_GPIO_IRQS 32
|
||||
|
||||
#define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS)
|
||||
#define MV78XX0_NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS)
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -12,6 +12,8 @@
|
||||
#ifndef __ASM_ARCH_MV78XX0_H
|
||||
#define __ASM_ARCH_MV78XX0_H
|
||||
|
||||
#include "irqs.h"
|
||||
|
||||
/*
|
||||
* Marvell MV78xx0 address maps.
|
||||
*
|
||||
|
@ -79,6 +79,7 @@ subsys_initcall(rd78x00_pci_init);
|
||||
MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board")
|
||||
/* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = MV78XX0_NR_IRQS,
|
||||
.init_machine = rd78x00_masa_init,
|
||||
.map_io = mv78xx0_map_io,
|
||||
.init_early = mv78xx0_init_early,
|
||||
|
@ -369,6 +369,7 @@ static void __init db88f5281_init(void)
|
||||
MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
|
||||
/* Maintainer: Tzachi Perelstein <tzachi@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = db88f5281_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -666,6 +666,7 @@ static void __init dns323_init(void)
|
||||
MACHINE_START(DNS323, "D-Link DNS-323")
|
||||
/* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = dns323_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -54,7 +54,7 @@
|
||||
#define IRQ_ORION5X_GPIO_START 33
|
||||
#define NR_GPIO_IRQS 32
|
||||
|
||||
#define NR_IRQS (IRQ_ORION5X_GPIO_START + NR_GPIO_IRQS)
|
||||
#define ORION5X_NR_IRQS (IRQ_ORION5X_GPIO_START + NR_GPIO_IRQS)
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@
|
||||
#ifndef __ASM_ARCH_ORION5X_H
|
||||
#define __ASM_ARCH_ORION5X_H
|
||||
|
||||
#include <mach/irqs.h>
|
||||
|
||||
/*****************************************************************************
|
||||
* Orion Address Maps
|
||||
*
|
||||
|
@ -383,6 +383,7 @@ static void __init kurobox_pro_init(void)
|
||||
MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro")
|
||||
/* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = kurobox_pro_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
@ -397,6 +398,7 @@ MACHINE_END
|
||||
MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live")
|
||||
/* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = kurobox_pro_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -320,6 +320,7 @@ static void __init lschl_init(void)
|
||||
MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)")
|
||||
/* Maintainer: Ash Hughes <ashley.hughes@blueyonder.co.uk> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = lschl_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -267,6 +267,7 @@ static void __init ls_hgl_init(void)
|
||||
MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL")
|
||||
/* Maintainer: Zhu Qingsen <zhuqs@cn.fujistu.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = ls_hgl_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -232,6 +232,7 @@ static void __init mv2120_init(void)
|
||||
MACHINE_START(MV2120, "HP Media Vault mv2120")
|
||||
/* Maintainer: Martin Michlmayr <tbm@cyrius.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = mv2120_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -423,6 +423,7 @@ static void __init net2big_init(void)
|
||||
/* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */
|
||||
MACHINE_START(NET2BIG, "LaCie 2Big Network")
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = net2big_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -169,6 +169,7 @@ subsys_initcall(rd88f5181l_fxo_pci_init);
|
||||
MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design")
|
||||
/* Maintainer: Nicolas Pitre <nico@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = rd88f5181l_fxo_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -181,6 +181,7 @@ subsys_initcall(rd88f5181l_ge_pci_init);
|
||||
MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design")
|
||||
/* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = rd88f5181l_ge_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -281,6 +281,7 @@ static void __init rd88f5182_init(void)
|
||||
MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
|
||||
/* Maintainer: Ronen Shitrit <rshitrit@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = rd88f5182_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -119,6 +119,7 @@ subsys_initcall(rd88f6183ap_ge_pci_init);
|
||||
MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design")
|
||||
/* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = rd88f6183ap_ge_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -359,6 +359,7 @@ static void __init tsp2_init(void)
|
||||
MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
|
||||
/* Maintainer: Sylver Bruneau <sylver.bruneau@googlemail.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = tsp2_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -324,6 +324,7 @@ static void __init qnap_ts209_init(void)
|
||||
MACHINE_START(TS209, "QNAP TS-109/TS-209")
|
||||
/* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = qnap_ts209_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -313,6 +313,7 @@ static void __init qnap_ts409_init(void)
|
||||
MACHINE_START(TS409, "QNAP TS-409")
|
||||
/* Maintainer: Sylver Bruneau <sylver.bruneau@gmail.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = qnap_ts409_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -615,6 +615,7 @@ static void __init ts78xx_init(void)
|
||||
MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC")
|
||||
/* Maintainer: Alexander Clouter <alex@digriz.org.uk> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = ts78xx_init,
|
||||
.map_io = ts78xx_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -174,6 +174,7 @@ subsys_initcall(wnr854t_pci_init);
|
||||
MACHINE_START(WNR854T, "Netgear WNR854T")
|
||||
/* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = wnr854t_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
@ -262,6 +262,7 @@ subsys_initcall(wrt350n_v2_pci_init);
|
||||
MACHINE_START(WRT350N_V2, "Linksys WRT350N v2")
|
||||
/* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
|
||||
.atag_offset = 0x100,
|
||||
.nr_irqs = ORION5X_NR_IRQS,
|
||||
.init_machine = wrt350n_v2_init,
|
||||
.map_io = orion5x_map_io,
|
||||
.init_early = orion5x_init_early,
|
||||
|
Loading…
Reference in New Issue
Block a user