Commit d5341942 authored by Ralf Baechle's avatar Ralf Baechle Committed by Jesse Barnes

PCI: Make the struct pci_dev * argument of pci_fixup_irqs const.

Aside of the usual motivation for constification,  this function has a
history of being abused a hook for interrupt and other fixups so I turned
this function const ages ago in the MIPS code but it should be done
treewide.

Due to function pointer passing in varous places a few other functions
had to be constified as well.
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
To: Anton Vorontsov <avorontsov@mvista.com>
To: Chris Metcalf <cmetcalf@tilera.com>
To: Colin Cross <ccross@android.com>
Acked-by: default avatar"David S. Miller" <davem@davemloft.net>
To: Eric Miao <eric.y.miao@gmail.com>
To: Erik Gilling <konkers@android.com>
Acked-by: default avatarGuan Xuetao <gxt@mprc.pku.edu.cn>
To: "H. Peter Anvin" <hpa@zytor.com>
To: Imre Kaloz <kaloz@openwrt.org>
To: Ingo Molnar <mingo@redhat.com>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Krzysztof Halasa <khc@pm.waw.pl>
To: Lennert Buytenhek <kernel@wantstofly.org>
To: Matt Turner <mattst88@gmail.com>
To: Nicolas Pitre <nico@fluxnic.net>
To: Olof Johansson <olof@lixom.net>
Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
To: Richard Henderson <rth@twiddle.net>
To: Russell King <linux@arm.linux.org.uk>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-alpha@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-pci@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: linux-tegra@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: x86@kernel.org
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 05d3ac26
...@@ -183,7 +183,7 @@ alcor_init_irq(void) ...@@ -183,7 +183,7 @@ alcor_init_irq(void)
*/ */
static int __init static int __init
alcor_map_irq(struct pci_dev *dev, u8 slot, u8 pin) alcor_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[7][5] __initdata = { static char irq_tab[7][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -175,7 +175,7 @@ pc164_init_irq(void) ...@@ -175,7 +175,7 @@ pc164_init_irq(void)
*/ */
static inline int __init static inline int __init
eb66p_map_irq(struct pci_dev *dev, u8 slot, u8 pin) eb66p_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[5][5] __initdata = { static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
...@@ -205,7 +205,7 @@ eb66p_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -205,7 +205,7 @@ eb66p_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
*/ */
static inline int __init static inline int __init
cabriolet_map_irq(struct pci_dev *dev, u8 slot, u8 pin) cabriolet_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[5][5] __initdata = { static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
...@@ -289,7 +289,7 @@ cia_cab_init_pci(void) ...@@ -289,7 +289,7 @@ cia_cab_init_pci(void)
*/ */
static inline int __init static inline int __init
alphapc164_map_irq(struct pci_dev *dev, u8 slot, u8 pin) alphapc164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[7][5] __initdata = { static char irq_tab[7][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -382,7 +382,7 @@ isa_irq_fixup(struct pci_dev *dev, int irq) ...@@ -382,7 +382,7 @@ isa_irq_fixup(struct pci_dev *dev, int irq)
} }
static int __init static int __init
dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) dp264_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[6][5] __initdata = { static char irq_tab[6][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
...@@ -404,7 +404,7 @@ dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -404,7 +404,7 @@ dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
} }
static int __init static int __init
monet_map_irq(struct pci_dev *dev, u8 slot, u8 pin) monet_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[13][5] __initdata = { static char irq_tab[13][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
...@@ -466,7 +466,7 @@ monet_swizzle(struct pci_dev *dev, u8 *pinp) ...@@ -466,7 +466,7 @@ monet_swizzle(struct pci_dev *dev, u8 *pinp)
} }
static int __init static int __init
webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin) webbrick_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[13][5] __initdata = { static char irq_tab[13][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
...@@ -488,7 +488,7 @@ webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -488,7 +488,7 @@ webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
} }
static int __init static int __init
clipper_map_irq(struct pci_dev *dev, u8 slot, u8 pin) clipper_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[7][5] __initdata = { static char irq_tab[7][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -169,7 +169,7 @@ eb64p_init_irq(void) ...@@ -169,7 +169,7 @@ eb64p_init_irq(void)
*/ */
static int __init static int __init
eb64p_map_irq(struct pci_dev *dev, u8 slot, u8 pin) eb64p_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[5][5] __initdata = { static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -144,7 +144,7 @@ eiger_init_irq(void) ...@@ -144,7 +144,7 @@ eiger_init_irq(void)
} }
static int __init static int __init
eiger_map_irq(struct pci_dev *dev, u8 slot, u8 pin) eiger_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
u8 irq_orig; u8 irq_orig;
......
...@@ -318,7 +318,7 @@ marvel_init_irq(void) ...@@ -318,7 +318,7 @@ marvel_init_irq(void)
} }
static int static int
marvel_map_irq(struct pci_dev *dev, u8 slot, u8 pin) marvel_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
struct pci_controller *hose = dev->sysdata; struct pci_controller *hose = dev->sysdata;
struct io7_port *io7_port = hose->sysdata; struct io7_port *io7_port = hose->sysdata;
......
...@@ -151,7 +151,7 @@ miata_init_irq(void) ...@@ -151,7 +151,7 @@ miata_init_irq(void)
*/ */
static int __init static int __init
miata_map_irq(struct pci_dev *dev, u8 slot, u8 pin) miata_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[18][5] __initdata = { static char irq_tab[18][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -146,7 +146,7 @@ mikasa_init_irq(void) ...@@ -146,7 +146,7 @@ mikasa_init_irq(void)
*/ */
static int __init static int __init
mikasa_map_irq(struct pci_dev *dev, u8 slot, u8 pin) mikasa_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[8][5] __initdata = { static char irq_tab[8][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -65,7 +65,7 @@ nautilus_init_irq(void) ...@@ -65,7 +65,7 @@ nautilus_init_irq(void)
} }
static int __init static int __init
nautilus_map_irq(struct pci_dev *dev, u8 slot, u8 pin) nautilus_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
/* Preserve the IRQ set up by the console. */ /* Preserve the IRQ set up by the console. */
......
...@@ -194,7 +194,7 @@ noritake_init_irq(void) ...@@ -194,7 +194,7 @@ noritake_init_irq(void)
*/ */
static int __init static int __init
noritake_map_irq(struct pci_dev *dev, u8 slot, u8 pin) noritake_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[15][5] __initdata = { static char irq_tab[15][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -223,7 +223,7 @@ rawhide_init_irq(void) ...@@ -223,7 +223,7 @@ rawhide_init_irq(void)
*/ */
static int __init static int __init
rawhide_map_irq(struct pci_dev *dev, u8 slot, u8 pin) rawhide_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[5][5] __initdata = { static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -120,7 +120,7 @@ ruffian_kill_arch (int mode) ...@@ -120,7 +120,7 @@ ruffian_kill_arch (int mode)
*/ */
static int __init static int __init
ruffian_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ruffian_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[11][5] __initdata = { static char irq_tab[11][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -144,7 +144,7 @@ rx164_init_irq(void) ...@@ -144,7 +144,7 @@ rx164_init_irq(void)
*/ */
static int __init static int __init
rx164_map_irq(struct pci_dev *dev, u8 slot, u8 pin) rx164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
#if 0 #if 0
static char irq_tab_pass1[6][5] __initdata = { static char irq_tab_pass1[6][5] __initdata = {
......
...@@ -194,7 +194,7 @@ sable_init_irq(void) ...@@ -194,7 +194,7 @@ sable_init_irq(void)
*/ */
static int __init static int __init
sable_map_irq(struct pci_dev *dev, u8 slot, u8 pin) sable_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[9][5] __initdata = { static char irq_tab[9][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
...@@ -376,7 +376,7 @@ lynx_init_irq(void) ...@@ -376,7 +376,7 @@ lynx_init_irq(void)
*/ */
static int __init static int __init
lynx_map_irq(struct pci_dev *dev, u8 slot, u8 pin) lynx_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[19][5] __initdata = { static char irq_tab[19][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -146,7 +146,7 @@ sio_fixup_irq_levels(unsigned int level_bits) ...@@ -146,7 +146,7 @@ sio_fixup_irq_levels(unsigned int level_bits)
} }
static inline int __init static inline int __init
noname_map_irq(struct pci_dev *dev, u8 slot, u8 pin) noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
/* /*
* The Noname board has 5 PCI slots with each of the 4 * The Noname board has 5 PCI slots with each of the 4
...@@ -185,7 +185,7 @@ noname_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -185,7 +185,7 @@ noname_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
} }
static inline int __init static inline int __init
p2k_map_irq(struct pci_dev *dev, u8 slot, u8 pin) p2k_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[][5] __initdata = { static char irq_tab[][5] __initdata = {
/*INT A B C D */ /*INT A B C D */
......
...@@ -95,7 +95,7 @@ sx164_init_irq(void) ...@@ -95,7 +95,7 @@ sx164_init_irq(void)
*/ */
static int __init static int __init
sx164_map_irq(struct pci_dev *dev, u8 slot, u8 pin) sx164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[5][5] __initdata = { static char irq_tab[5][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -157,7 +157,7 @@ takara_init_irq(void) ...@@ -157,7 +157,7 @@ takara_init_irq(void)
*/ */
static int __init static int __init
takara_map_irq_srm(struct pci_dev *dev, u8 slot, u8 pin) takara_map_irq_srm(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[15][5] __initdata = { static char irq_tab[15][5] __initdata = {
{ 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */ { 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */
...@@ -188,7 +188,7 @@ takara_map_irq_srm(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -188,7 +188,7 @@ takara_map_irq_srm(struct pci_dev *dev, u8 slot, u8 pin)
} }
static int __init static int __init
takara_map_irq(struct pci_dev *dev, u8 slot, u8 pin) takara_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[15][5] __initdata = { static char irq_tab[15][5] __initdata = {
{ 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */ { 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */
......
...@@ -305,7 +305,7 @@ titan_late_init(void) ...@@ -305,7 +305,7 @@ titan_late_init(void)
} }
static int __devinit static int __devinit
titan_map_irq(struct pci_dev *dev, u8 slot, u8 pin) titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
u8 intline; u8 intline;
int irq; int irq;
......
...@@ -290,7 +290,7 @@ wildfire_device_interrupt(unsigned long vector) ...@@ -290,7 +290,7 @@ wildfire_device_interrupt(unsigned long vector)
*/ */
static int __init static int __init
wildfire_map_irq(struct pci_dev *dev, u8 slot, u8 pin) wildfire_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static char irq_tab[8][5] __initdata = { static char irq_tab[8][5] __initdata = {
/*INT INTA INTB INTC INTD */ /*INT INTA INTB INTC INTD */
......
...@@ -144,7 +144,7 @@ void it8152_irq_demux(unsigned int irq, struct irq_desc *desc) ...@@ -144,7 +144,7 @@ void it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
} }
/* mapping for on-chip devices */ /* mapping for on-chip devices */
int __init it8152_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) int __init it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
if ((dev->vendor == PCI_VENDOR_ID_ITE) && if ((dev->vendor == PCI_VENDOR_ID_ITE) &&
(dev->device == PCI_DEVICE_ID_ITE_8152)) { (dev->device == PCI_DEVICE_ID_ITE_8152)) {
......
...@@ -105,7 +105,7 @@ struct pci_sys_data; ...@@ -105,7 +105,7 @@ struct pci_sys_data;
extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc); extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc);
extern void it8152_init_irq(void); extern void it8152_init_irq(void);
extern int it8152_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin); extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); extern int it8152_pci_setup(int nr, struct pci_sys_data *sys);
extern struct pci_bus *it8152_pci_scan_bus(int nr, struct pci_sys_data *sys); extern struct pci_bus *it8152_pci_scan_bus(int nr, struct pci_sys_data *sys);
......
...@@ -25,7 +25,7 @@ struct hw_pci { ...@@ -25,7 +25,7 @@ struct hw_pci {
void (*preinit)(void); void (*preinit)(void);
void (*postinit)(void); void (*postinit)(void);
u8 (*swizzle)(struct pci_dev *dev, u8 *pin); u8 (*swizzle)(struct pci_dev *dev, u8 *pin);
int (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin); int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
}; };
/* /*
...@@ -44,7 +44,7 @@ struct pci_sys_data { ...@@ -44,7 +44,7 @@ struct pci_sys_data {
/* Bridge swizzling */ /* Bridge swizzling */
u8 (*swizzle)(struct pci_dev *, u8 *); u8 (*swizzle)(struct pci_dev *, u8 *);
/* IRQ mapping */ /* IRQ mapping */
int (*map_irq)(struct pci_dev *, u8, u8); int (*map_irq)(const struct pci_dev *, u8, u8);
struct hw_pci *hw; struct hw_pci *hw;
void *private_data; /* platform controller private data */ void *private_data; /* platform controller private data */
}; };
......
...@@ -476,7 +476,7 @@ static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) ...@@ -476,7 +476,7 @@ static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin)
/* /*
* Map a slot/pin to an IRQ. * Map a slot/pin to an IRQ.
*/ */
static int pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
struct pci_sys_data *sys = dev->sysdata; struct pci_sys_data *sys = dev->sysdata;
int irq = -1; int irq = -1;
......
...@@ -172,7 +172,7 @@ static struct pci_bus *cns3xxx_pci_scan_bus(int nr, struct pci_sys_data *sys) ...@@ -172,7 +172,7 @@ static struct pci_bus *cns3xxx_pci_scan_bus(int nr, struct pci_sys_data *sys)
return pci_scan_bus(sys->busnr, &cns3xxx_pcie_ops, sys); return pci_scan_bus(sys->busnr, &cns3xxx_pcie_ops, sys);
} }
static int cns3xxx_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev);
int irq = cnspci->irqs[slot]; int irq = cnspci->irqs[slot];
......
...@@ -192,7 +192,7 @@ dove_pcie_scan_bus(int nr, struct pci_sys_data *sys) ...@@ -192,7 +192,7 @@ dove_pcie_scan_bus(int nr, struct pci_sys_data *sys)
return bus; return bus;
} }
static int __init dove_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init dove_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
struct pcie_port *pp = bus_to_port(dev->bus->number); struct pcie_port *pp = bus_to_port(dev->bus->number);
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* cats host-specific stuff */ /* cats host-specific stuff */
static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
if (dev->irq >= 255) if (dev->irq >= 255)
return -1; /* not a valid interrupt. */ return -1; /* not a valid interrupt. */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI }; static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
static int __init ebsa285_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
if (dev->vendor == PCI_VENDOR_ID_CONTAQ && if (dev->vendor == PCI_VENDOR_ID_CONTAQ &&
dev->device == PCI_DEVICE_ID_CONTAQ_82C693) dev->device == PCI_DEVICE_ID_CONTAQ_82C693)
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* We now use the slot ID instead of the device identifiers to select * We now use the slot ID instead of the device identifiers to select
* which interrupt is routed where. * which interrupt is routed where.
*/ */
static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
switch (slot) { switch (slot) {
case 0: /* host bridge */ case 0: /* host bridge */
......
...@@ -18,7 +18,8 @@ static int irqmap_personal_server[] __initdata = { ...@@ -18,7 +18,8 @@ static int irqmap_personal_server[] __initdata = {
IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI
}; };
static int __init personal_server_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
unsigned char line; unsigned char line;
......
...@@ -95,7 +95,7 @@ static int irq_tab[4] __initdata = { ...@@ -95,7 +95,7 @@ static int irq_tab[4] __initdata = {
* map the specified device/slot/pin to an IRQ. This works out such * map the specified device/slot/pin to an IRQ. This works out such
* that slot 9 pin 1 is INT0, pin 2 is INT1, and slot 10 pin 1 is INT1. * that slot 9 pin 1 is INT0, pin 2 is INT1, and slot 10 pin 1 is INT1.
*/ */
static int __init integrator_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init integrator_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int intnr = ((slot - 9) + (pin - 1)) & 3; int intnr = ((slot - 9) + (pin - 1)) & 3;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
extern int init_atu; /* Flag to select which ATU(s) to initialize / disable */ extern int init_atu; /* Flag to select which ATU(s) to initialize / disable */
static int __init static int __init
iq81340mc_pcix_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) iq81340mc_pcix_map_irq(const struct pci_dev *dev, u8 idsel, u8 pin)
{ {
switch (idsel) { switch (idsel) {
case 1: case 1:
......
...@@ -390,7 +390,7 @@ static int iop13xx_atue_pci_status(int clear) ...@@ -390,7 +390,7 @@ static int iop13xx_atue_pci_status(int clear)
} }
static int static int
iop13xx_pcie_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) iop13xx_pcie_map_irq(const struct pci_dev *dev, u8 idsel, u8 pin)
{ {
WARN_ON(idsel != 0); WARN_ON(idsel != 0);
......
...@@ -81,7 +81,7 @@ void __init em7210_map_io(void) ...@@ -81,7 +81,7 @@ void __init em7210_map_io(void)
#define INTD IRQ_IOP32X_XINT3 #define INTD IRQ_IOP32X_XINT3
static int __init static int __init
em7210_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) em7210_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static int pci_irq_table[][4] = { static int pci_irq_table[][4] = {
/* /*
......
...@@ -77,7 +77,7 @@ void __init glantank_map_io(void) ...@@ -77,7 +77,7 @@ void __init glantank_map_io(void)
#define INTD IRQ_IOP32X_XINT3 #define INTD IRQ_IOP32X_XINT3
static int __init static int __init
glantank_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) glantank_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static int pci_irq_table[][4] = { static int pci_irq_table[][4] = {
/* /*
......
...@@ -103,7 +103,7 @@ void __init iq31244_map_io(void) ...@@ -103,7 +103,7 @@ void __init iq31244_map_io(void)
* EP80219/IQ31244 PCI. * EP80219/IQ31244 PCI.
*/ */
static int __init static int __init
ep80219_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ep80219_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
...@@ -139,7 +139,7 @@ static struct hw_pci ep80219_pci __initdata = { ...@@ -139,7 +139,7 @@ static struct hw_pci ep80219_pci __initdata = {
}; };
static int __init static int __init
iq31244_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) iq31244_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -71,7 +71,7 @@ void __init iq80321_map_io(void) ...@@ -71,7 +71,7 @@ void __init iq80321_map_io(void)
* IQ80321 PCI. * IQ80321 PCI.
*/ */
static int __init static int __init
iq80321_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) iq80321_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -78,7 +78,7 @@ void __init n2100_map_io(void) ...@@ -78,7 +78,7 @@ void __init n2100_map_io(void)
* N2100 PCI. * N2100 PCI.
*/ */
static int __init static int __init
n2100_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -54,7 +54,7 @@ static struct sys_timer iq80331_timer = { ...@@ -54,7 +54,7 @@ static struct sys_timer iq80331_timer = {
* IQ80331 PCI. * IQ80331 PCI.
*/ */
static int __init static int __init
iq80331_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) iq80331_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -54,7 +54,7 @@ static struct sys_timer iq80332_timer = { ...@@ -54,7 +54,7 @@ static struct sys_timer iq80332_timer = {
* IQ80332 PCI. * IQ80332 PCI.
*/ */
static int __init static int __init
iq80332_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) iq80332_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -148,7 +148,8 @@ static struct pci_bus * __init enp2611_pci_scan_bus(int nr, ...@@ -148,7 +148,8 @@ static struct pci_bus * __init enp2611_pci_scan_bus(int nr,
return pci_scan_bus(sys->busnr, &enp2611_pci_ops, sys); return pci_scan_bus(sys->busnr, &enp2611_pci_ops, sys);
} }
static int __init enp2611_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
int irq; int irq;
......
...@@ -78,7 +78,8 @@ int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys) ...@@ -78,7 +78,8 @@ int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys)
return 1; return 1;
} }
static int __init ixdp2400_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init ixdp2400_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
if (ixdp2x00_master_npu()) { if (ixdp2x00_master_npu()) {
......
...@@ -161,7 +161,8 @@ static int __init ixdp2800_pci_setup(int nr, struct pci_sys_data *sys) ...@@ -161,7 +161,8 @@ static int __init ixdp2800_pci_setup(int nr, struct pci_sys_data *sys)
return 1; return 1;
} }
static int __init ixdp2800_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init ixdp2800_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
if (ixdp2x00_master_npu()) { if (ixdp2x00_master_npu()) {
......
...@@ -252,7 +252,8 @@ void __init ixdp2x01_pci_preinit(void) ...@@ -252,7 +252,8 @@ void __init ixdp2x01_pci_preinit(void)
#define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) #define DEVPIN(dev, pin) ((pin) | ((dev) << 3))
static int __init ixdp2x01_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init ixdp2x01_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
u8 bus = dev->bus->number; u8 bus = dev->bus->number;
u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin);
......
...@@ -168,7 +168,7 @@ void __init ixdp2351_init_irq(void) ...@@ -168,7 +168,7 @@ void __init ixdp2351_init_irq(void)
*/ */
#define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) #define DEVPIN(dev, pin) ((pin) | ((dev) << 3))
static int __init ixdp2351_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init ixdp2351_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
u8 bus = dev->bus->number; u8 bus = dev->bus->number;
u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin);
......
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
#define INTC_PIN IXP23XX_GPIO_PIN_11 #define INTC_PIN IXP23XX_GPIO_PIN_11
#define INTD_PIN IXP23XX_GPIO_PIN_12 #define INTD_PIN IXP23XX_GPIO_PIN_12
static int __init roadrunner_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) static int __init roadrunner_map_irq(const struct pci_dev *dev, u8 idsel,
u8 pin)
{ {
static int pci_card_slot_irq[] = {INTB, INTC, INTD, INTA}; static int pci_card_slot_irq[] = {INTB, INTC, INTD, INTA};
static int pmc_card_slot_irq[] = {INTA, INTB, INTC, INTD}; static int pmc_card_slot_irq[] = {INTA, INTB, INTC, INTD};
......
...@@ -46,7 +46,7 @@ void __init avila_pci_preinit(void) ...@@ -46,7 +46,7 @@ void __init avila_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init avila_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static int pci_irq_table[IRQ_LINES] = { static int pci_irq_table[IRQ_LINES] = {
IXP4XX_GPIO_IRQ(INTA), IXP4XX_GPIO_IRQ(INTA),
......
...@@ -37,7 +37,7 @@ void __init coyote_pci_preinit(void) ...@@ -37,7 +37,7 @@ void __init coyote_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init coyote_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init coyote_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
if (slot == SLOT0_DEVID) if (slot == SLOT0_DEVID)
return IXP4XX_GPIO_IRQ(SLOT0_INTA); return IXP4XX_GPIO_IRQ(SLOT0_INTA);
......
...@@ -44,7 +44,7 @@ void __init dsmg600_pci_preinit(void) ...@@ -44,7 +44,7 @@ void __init dsmg600_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init dsmg600_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init dsmg600_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static int pci_irq_table[MAX_DEV][IRQ_LINES] = { static int pci_irq_table[MAX_DEV][IRQ_LINES] = {
{ IXP4XX_GPIO_IRQ(INTE), -1, -1 }, { IXP4XX_GPIO_IRQ(INTE), -1, -1 },
......
...@@ -38,7 +38,7 @@ void __init fsg_pci_preinit(void) ...@@ -38,7 +38,7 @@ void __init fsg_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init fsg_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static int pci_irq_table[IRQ_LINES] = { static int pci_irq_table[IRQ_LINES] = {
IXP4XX_GPIO_IRQ(INTC), IXP4XX_GPIO_IRQ(INTC),
......
...@@ -35,7 +35,8 @@ void __init gateway7001_pci_preinit(void) ...@@ -35,7 +35,8 @@ void __init gateway7001_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init gateway7001_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
if (slot == 1) if (slot == 1)
return IRQ_IXP4XX_GPIO11; return IRQ_IXP4XX_GPIO11;
......
...@@ -462,7 +462,7 @@ static void __init gmlr_pci_postinit(void) ...@@ -462,7 +462,7 @@ static void __init gmlr_pci_postinit(void)
} }
} }
static int __init gmlr_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init gmlr_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
switch(slot) { switch(slot) {
case SLOT_ETHA: return IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA); case SLOT_ETHA: return IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA);
......
...@@ -49,7 +49,7 @@ void __init gtwx5715_pci_preinit(void) ...@@ -49,7 +49,7 @@ void __init gtwx5715_pci_preinit(void)
} }
static int __init gtwx5715_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init gtwx5715_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int rc = -1; int rc = -1;
......
...@@ -43,7 +43,7 @@ void __init ixdp425_pci_preinit(void) ...@@ -43,7 +43,7 @@ void __init ixdp425_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init ixdp425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init ixdp425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static int pci_irq_table[IRQ_LINES] = { static int pci_irq_table[IRQ_LINES] = {
IXP4XX_GPIO_IRQ(INTA), IXP4XX_GPIO_IRQ(INTA),
......
...@@ -31,7 +31,7 @@ void __init ixdpg425_pci_preinit(void) ...@@ -31,7 +31,7 @@ void __init ixdpg425_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init ixdpg425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init ixdpg425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
if (slot == 12 || slot == 13) if (slot == 12 || slot == 13)
return IRQ_IXP4XX_GPIO7; return IRQ_IXP4XX_GPIO7;
......
...@@ -41,7 +41,7 @@ void __init nas100d_pci_preinit(void) ...@@ -41,7 +41,7 @@ void __init nas100d_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init nas100d_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init nas100d_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static int pci_irq_table[MAX_DEV][IRQ_LINES] = { static int pci_irq_table[MAX_DEV][IRQ_LINES] = {
{ IXP4XX_GPIO_IRQ(INTA), -1, -1 }, { IXP4XX_GPIO_IRQ(INTA), -1, -1 },
......
...@@ -38,7 +38,7 @@ void __init nslu2_pci_preinit(void) ...@@ -38,7 +38,7 @@ void __init nslu2_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init nslu2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init nslu2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
static int pci_irq_table[IRQ_LINES] = { static int pci_irq_table[IRQ_LINES] = {
IXP4XX_GPIO_IRQ(INTA), IXP4XX_GPIO_IRQ(INTA),
......
...@@ -43,7 +43,7 @@ void __init vulcan_pci_preinit(void) ...@@ -43,7 +43,7 @@ void __init vulcan_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init vulcan_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init vulcan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
if (slot == 1) if (slot == 1)
return IXP4XX_GPIO_IRQ(INTA); return IXP4XX_GPIO_IRQ(INTA);
......
...@@ -35,7 +35,7 @@ void __init wg302v2_pci_preinit(void) ...@@ -35,7 +35,7 @@ void __init wg302v2_pci_preinit(void)
ixp4xx_pci_preinit(); ixp4xx_pci_preinit();
} }
static int __init wg302v2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init wg302v2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
if (slot == 1) if (slot == 1)
return IRQ_IXP4XX_GPIO8; return IRQ_IXP4XX_GPIO8;
......
...@@ -244,7 +244,8 @@ kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys) ...@@ -244,7 +244,8 @@ kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys)
return bus; return bus;
} }
static int __init kirkwood_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
struct pcie_port *pp = bus_to_port(dev->bus); struct pcie_port *pp = bus_to_port(dev->bus);
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "generic.h" #include "generic.h"
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
static int dsm320_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int dsm320_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
switch (slot) { switch (slot) {
case 0: case 0:
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "generic.h" #include "generic.h"
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
static int micrel_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int micrel_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
return KS8695_IRQ_EXTERN0; return KS8695_IRQ_EXTERN0;
} }
......
...@@ -30,7 +30,7 @@ extern void __init ks8695_init_leds(u8 cpu_led, u8 timer_led); ...@@ -30,7 +30,7 @@ extern void __init ks8695_init_leds(u8 cpu_led, u8 timer_led);
struct ks8695_pci_cfg { struct ks8695_pci_cfg {
short mode; short mode;
int (*map_irq)(struct pci_dev *, u8, u8); int (*map_irq)(const struct pci_dev *, u8, u8);
}; };
extern __init void ks8695_init_pci(struct ks8695_pci_cfg *); extern __init void ks8695_init_pci(struct ks8695_pci_cfg *);
......
...@@ -259,7 +259,8 @@ mv78xx0_pcie_scan_bus(int nr, struct pci_sys_data *sys) ...@@ -259,7 +259,8 @@ mv78xx0_pcie_scan_bus(int nr, struct pci_sys_data *sys)
return bus; return bus;
} }
static int __init mv78xx0_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
struct pcie_port *pp = bus_to_port(dev->bus->number); struct pcie_port *pp = bus_to_port(dev->bus->number);
......
...@@ -51,7 +51,7 @@ void orion5x_pci_disable(void); ...@@ -51,7 +51,7 @@ void orion5x_pci_disable(void);
void orion5x_pci_set_cardbus_mode(void); void orion5x_pci_set_cardbus_mode(void);
int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys);
struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys);
int orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin); int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
struct machine_desc; struct machine_desc;
struct meminfo; struct meminfo;
......
...@@ -237,7 +237,8 @@ void __init db88f5281_pci_preinit(void) ...@@ -237,7 +237,8 @@ void __init db88f5281_pci_preinit(void)
} }
} }
static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init db88f5281_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
int irq; int irq;
......
...@@ -70,14 +70,14 @@ enum { ...@@ -70,14 +70,14 @@ enum {
* PCI setup * PCI setup
*/ */
static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
/* /*
* Check for devices with hard-wired IRQs. * Check for devices with hard-wired IRQs.
*/ */
irq = orion5x_pci_map_irq(dev, slot, pin); irq = orion5x_pci_map_irq(const dev, slot, pin);
if (irq != -1) if (irq != -1)
return irq; return irq;
......
...@@ -119,7 +119,8 @@ static struct platform_device kurobox_pro_nor_flash = { ...@@ -119,7 +119,8 @@ static struct platform_device kurobox_pro_nor_flash = {
* PCI * PCI
****************************************************************************/ ****************************************************************************/
static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init kurobox_pro_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
int irq; int irq;
......
...@@ -73,7 +73,7 @@ static struct platform_device mss2_nor_flash = { ...@@ -73,7 +73,7 @@ static struct platform_device mss2_nor_flash = {
/**************************************************************************** /****************************************************************************
* PCI setup * PCI setup
****************************************************************************/ ****************************************************************************/
static int __init mss2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init mss2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -587,7 +587,7 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys ...@@ -587,7 +587,7 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys
return bus; return bus;
} }
int __init orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) int __init orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int bus = dev->bus->number; int bus = dev->bus->number;
......
...@@ -131,7 +131,7 @@ static void __init rd88f5181l_fxo_init(void) ...@@ -131,7 +131,7 @@ static void __init rd88f5181l_fxo_init(void)
} }
static int __init static int __init
rd88f5181l_fxo_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) rd88f5181l_fxo_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -140,7 +140,7 @@ static void __init rd88f5181l_ge_init(void) ...@@ -140,7 +140,7 @@ static void __init rd88f5181l_ge_init(void)
} }
static int __init static int __init
rd88f5181l_ge_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) rd88f5181l_ge_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -172,7 +172,8 @@ void __init rd88f5182_pci_preinit(void) ...@@ -172,7 +172,8 @@ void __init rd88f5182_pci_preinit(void)
} }
} }
static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init rd88f5182_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
int irq; int irq;
......
...@@ -100,7 +100,7 @@ void __init tsp2_pci_preinit(void) ...@@ -100,7 +100,7 @@ void __init tsp2_pci_preinit(void)
} }
} }
static int __init tsp2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init tsp2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -143,7 +143,8 @@ void __init qnap_ts209_pci_preinit(void) ...@@ -143,7 +143,8 @@ void __init qnap_ts209_pci_preinit(void)
} }
} }
static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init qnap_ts209_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
int irq; int irq;
......
...@@ -121,7 +121,8 @@ static struct platform_device qnap_ts409_nor_flash = { ...@@ -121,7 +121,8 @@ static struct platform_device qnap_ts409_nor_flash = {
* PCI * PCI
****************************************************************************/ ****************************************************************************/
static int __init qnap_ts409_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init qnap_ts409_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
int irq; int irq;
......
...@@ -133,7 +133,8 @@ static void __init wnr854t_init(void) ...@@ -133,7 +133,8 @@ static void __init wnr854t_init(void)
platform_device_register(&wnr854t_nor_flash); platform_device_register(&wnr854t_nor_flash);
} }
static int __init wnr854t_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init wnr854t_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
int irq; int irq;
......
...@@ -221,7 +221,8 @@ static void __init wrt350n_v2_init(void) ...@@ -221,7 +221,8 @@ static void __init wrt350n_v2_init(void)
platform_device_register(&wrt350n_v2_button_device); platform_device_register(&wrt350n_v2_button_device);
} }
static int __init wrt350n_v2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init wrt350n_v2_pci_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
int irq; int irq;
......
...@@ -77,7 +77,7 @@ void cmx2xx_pci_resume(void) {} ...@@ -77,7 +77,7 @@ void cmx2xx_pci_resume(void) {}
#endif #endif
/* PCI IRQ mapping*/ /* PCI IRQ mapping*/
static int __init cmx2xx_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init cmx2xx_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -122,7 +122,8 @@ static struct pci_ops pci_nano_ops = { ...@@ -122,7 +122,8 @@ static struct pci_ops pci_nano_ops = {
.write = nanoengine_write_config, .write = nanoengine_write_config,
}; };
static int __init pci_nanoengine_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init pci_nanoengine_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{ {
return NANOENGINE_IRQ_GPIO_PCI; return NANOENGINE_IRQ_GPIO_PCI;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <asm/mach/pci.h> #include <asm/mach/pci.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
static int __init shark_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
if (dev->bus->number == 0) if (dev->bus->number == 0)
if (dev->devfn == 0) if (dev->devfn == 0)
......
...@@ -449,7 +449,7 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) ...@@ -449,7 +449,7 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys)
return 1; return 1;
} }
static int tegra_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int tegra_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
return INT_PCIE_INTR; return INT_PCIE_INTR;
} }
......
...@@ -325,7 +325,7 @@ void __init pci_versatile_preinit(void) ...@@ -325,7 +325,7 @@ void __init pci_versatile_preinit(void)
/* /*
* map the specified device/slot/pin to an IRQ. Different backplanes may need to modify this. * map the specified device/slot/pin to an IRQ. Different backplanes may need to modify this.
*/ */
static int __init versatile_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
int devslot = PCI_SLOT(dev->devfn); int devslot = PCI_SLOT(dev->devfn);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <cpu/irq.h> #include <cpu/irq.h>
#include "pci-sh5.h" #include "pci-sh5.h"
int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int result = -1; int result = -1;
......
...@@ -64,7 +64,7 @@ static void __init gapspci_fixup_resources(struct pci_dev *dev) ...@@ -64,7 +64,7 @@ static void __init gapspci_fixup_resources(struct pci_dev *dev)
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, gapspci_fixup_resources); DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, gapspci_fixup_resources);
int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
/* /*
* The interrupt routing semantics here are quite trivial. * The interrupt routing semantics here are quite trivial.
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#define PCIMCR_MRSET_OFF 0xBFFFFFFF #define PCIMCR_MRSET_OFF 0xBFFFFFFF
#define PCIMCR_RFSH_OFF 0xFFFFFFFB #define PCIMCR_RFSH_OFF 0xFFFFFFFB
int pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
{ {
/* /*
* slot0: pin1-4 = irq5,6,7,8 * slot0: pin1-4 = irq5,6,7,8
......
...@@ -18,7 +18,7 @@ static char irq_tab[] __initdata = { ...@@ -18,7 +18,7 @@ static char irq_tab[] __initdata = {
65, 66, 67, 68, 65, 66, 67, 68,
}; };
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
{ {
return irq_tab[slot]; return irq_tab[slot];
} }
...@@ -31,7 +31,7 @@ static char lboxre2_irq_tab[] __initdata = { ...@@ -31,7 +31,7 @@ static char lboxre2_irq_tab[] __initdata = {
IRQ_ETH0, IRQ_ETH1, IRQ_INTA, IRQ_INTD, IRQ_ETH0, IRQ_ETH1, IRQ_INTA, IRQ_INTD,
}; };
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
{ {
if (mach_is_lboxre2()) if (mach_is_lboxre2())
return lboxre2_irq_tab[slot]; return lboxre2_irq_tab[slot];
......
...@@ -27,7 +27,7 @@ static char sdk7780_irq_tab[4][16] __initdata = { ...@@ -27,7 +27,7 @@ static char sdk7780_irq_tab[4][16] __initdata = {
{ 68, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, { 68, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
}; };
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
{ {
return sdk7780_irq_tab[pin-1][slot]; return sdk7780_irq_tab[pin-1][slot];
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <linux/io.h> #include <linux/io.h>
#include "pci-sh4.h" #include "pci-sh4.h"
int __init pcibios_map_platform_irq(struct pci_dev *, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *, u8 slot, u8 pin)
{ {
switch (slot) { switch (slot) {
case 0: return 13; case 0: return 13;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/pci.h> #include <linux/pci.h>
int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq; int irq;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#include "pci-sh4.h" #include "pci-sh4.h"
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
{ {
int irq = -1; int irq = -1;
......
...@@ -27,7 +27,7 @@ static char titan_irq_tab[] __initdata = { ...@@ -27,7 +27,7 @@ static char titan_irq_tab[] __initdata = {
TITAN_IRQ_USB, TITAN_IRQ_USB,
}; };
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
{ {
int irq = titan_irq_tab[slot]; int irq = titan_irq_tab[slot];
......
...@@ -466,7 +466,7 @@ static int __init pcie_init(struct sh7786_pcie_port *port) ...@@ -466,7 +466,7 @@ static int __init pcie_init(struct sh7786_pcie_port *port)
return 0; return 0;
} }
int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
{ {
return 71; return 71;
} }
......
...@@ -112,7 +112,7 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, ...@@ -112,7 +112,7 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev,
#endif #endif
/* Board-specific fixup routines. */ /* Board-specific fixup routines. */
int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin); int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin);
extern void pcibios_resource_to_bus(struct pci_dev *dev, extern void pcibios_resource_to_bus(struct pci_dev *dev,
struct pci_bus_region *region, struct resource *res); struct pci_bus_region *region, struct resource *res);
......
...@@ -12,7 +12,7 @@ struct leon_pci_info { ...@@ -12,7 +12,7 @@ struct leon_pci_info {
struct pci_ops *ops; struct pci_ops *ops;
struct resource io_space; struct resource io_space;
struct resource mem_space; struct resource mem_space;
int (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin); int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
}; };
extern void leon_pci_init(struct platform_device *ofdev, extern void leon_pci_init(struct platform_device *ofdev,
......
...@@ -215,7 +215,7 @@ struct grpci2_priv { ...@@ -215,7 +215,7 @@ struct grpci2_priv {
DEFINE_SPINLOCK(grpci2_dev_lock); DEFINE_SPINLOCK(grpci2_dev_lock);
struct grpci2_priv *grpci2priv; struct grpci2_priv *grpci2priv;
int grpci2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) int grpci2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
struct grpci2_priv *priv = dev->bus->sysdata; struct grpci2_priv *priv = dev->bus->sysdata;
int irq_group; int irq_group;
......
...@@ -228,7 +228,7 @@ int __devinit tile_pci_init(void) ...@@ -228,7 +228,7 @@ int __devinit tile_pci_init(void)
* (pin - 1) converts from the PCI standard's [1:4] convention to * (pin - 1) converts from the PCI standard's [1:4] convention to
* a normal [0:3] range. * a normal [0:3] range.
*/ */
static int tile_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int tile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
struct pci_controller *controller = struct pci_controller *controller =
(struct pci_controller *)dev->sysdata; (struct pci_controller *)dev->sysdata;
......
...@@ -102,7 +102,7 @@ void pci_puv3_preinit(void) ...@@ -102,7 +102,7 @@ void pci_puv3_preinit(void)
writel(readl(PCIBRI_CMD) | PCIBRI_CMD_IO | PCIBRI_CMD_MEM, PCIBRI_CMD); writel(readl(PCIBRI_CMD) | PCIBRI_CMD_IO | PCIBRI_CMD_MEM, PCIBRI_CMD);
} }
static int __init pci_puv3_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init pci_puv3_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
if (dev->bus->number == 0) { if (dev->bus->number == 0) {
#ifdef CONFIG_ARCH_FPGA /* 4 pci slots */ #ifdef CONFIG_ARCH_FPGA /* 4 pci slots */
......
...@@ -24,7 +24,7 @@ static void pci_visws_disable_irq(struct pci_dev *dev) { } ...@@ -24,7 +24,7 @@ static void pci_visws_disable_irq(struct pci_dev *dev) { }
unsigned int pci_bus0, pci_bus1; unsigned int pci_bus0, pci_bus1;
static int __init visws_map_irq(struct pci_dev *dev, u8 slot, u8 pin) static int __init visws_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
int irq, bus = dev->bus->number; int irq, bus = dev->bus->number;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
static void __init static void __init
pdev_fixup_irq(struct pci_dev *dev, pdev_fixup_irq(struct pci_dev *dev,
u8 (*swizzle)(struct pci_dev *, u8 *), u8 (*swizzle)(struct pci_dev *, u8 *),
int (*map_irq)(struct pci_dev *, u8, u8)) int (*map_irq)(const struct pci_dev *, u8, u8))
{ {
u8 pin, slot; u8 pin, slot;
int irq = 0; int irq = 0;
...@@ -56,7 +56,7 @@ pdev_fixup_irq(struct pci_dev *dev, ...@@ -56,7 +56,7 @@ pdev_fixup_irq(struct pci_dev *dev,
void __init void __init
pci_fixup_irqs(u8 (*swizzle)(struct pci_dev *, u8 *), pci_fixup_irqs(u8 (*swizzle)(struct pci_dev *, u8 *),
int (*map_irq)(struct pci_dev *, u8, u8)) int (*map_irq)(const struct pci_dev *, u8, u8))
{ {
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
for_each_pci_dev(dev) for_each_pci_dev(dev)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment