10 #include <linux/types.h>
11 #include <linux/kernel.h>
13 #include <linux/pci.h>
17 #include <linux/errno.h>
22 #include <asm/sizes.h>
24 #if defined(CONFIG_CPU_BIG_ENDIAN)
25 # define PCICR_ENDIANNESS SH4_PCICR_BSWP
27 # define PCICR_ENDIANNESS 0
31 static struct resource sh7785_pci_resources[] = {
40 .end = 0xfd000000 +
SZ_16M - 1,
45 .end = 0x10000000 +
SZ_64M - 1,
53 .end = 0xc0000000 +
SZ_512M - 1,
58 static struct pci_channel sh7780_pci_controller = {
60 .resources = sh7785_pci_resources,
61 .nr_resources =
ARRAY_SIZE(sh7785_pci_resources),
64 .io_map_base = 0xfe200000,
97 struct pci_channel *hose =
dev_id;
148 static irqreturn_t sh7780_pci_serr_irq(
int irq,
void *dev_id)
150 struct pci_channel *hose =
dev_id;
167 static int __init sh7780_pci_setup_irqs(
struct pci_channel *hose)
182 ret =
request_irq(hose->serr_irq, sh7780_pci_serr_irq, 0,
183 "PCI SERR interrupt", hose);
196 "PCI ERR interrupt", hose);
218 static inline void __init sh7780_pci_teardown_irqs(
struct pci_channel *hose)
224 static void __init sh7780_pci66_init(
struct pci_channel *hose)
247 static int __init sh7780_pci_init(
void)
249 struct pci_channel *
chan = &sh7780_pci_controller;
258 chan->reg_base = 0xfe040000;
288 "controller, device id 0x%04x.\n",
id);
293 "controller, revision %d.\n", type,
334 ret = sh7780_pci_setup_irqs(chan);
349 for (i = 1; i < chan->nr_resources; i++) {
361 chan->nr_resources--;
365 size = resource_size(res);
399 sh7780_pci66_init(chan);
408 sh7780_pci_teardown_irqs(chan);