X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/5ad3941a703f9b864c479525ef4621310c463ab0..6eda38a432f1149a8f9db2a12411cc955a6da881:/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c diff --git a/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c b/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c index 557b1eb49..f67902272 100644 --- a/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c +++ b/target/linux/ramips/files/arch/mips/pci/pci-rt288x.c @@ -210,12 +210,20 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) return irq; } -static int __init rt2880_pci_init(void) +int __init rt288x_register_pci(void) { + void __iomem *io_map_base; int i; rt2880_pci_base = ioremap_nocache(RT2880_PCI_BASE, PAGE_SIZE); + io_map_base = ioremap(RT2880_PCI_IO_BASE, RT2880_PCI_IO_SIZE); + rt2880_pci_controller.io_map_base = (unsigned long) io_map_base; + set_io_port_base((unsigned long) io_map_base); + + ioport_resource.start = RT2880_PCI_IO_BASE; + ioport_resource.end = RT2880_PCI_IO_BASE + RT2880_PCI_IO_SIZE - 1; + rt2880_pci_reg_write(0, RT2880_PCI_REG_PCICFG_ADDR); for(i = 0; i < 0xfffff; i++) {} @@ -240,5 +248,3 @@ int pcibios_plat_dev_init(struct pci_dev *dev) { return 0; } - -arch_initcall(rt2880_pci_init);