ramips: rt288x: don't register the PCI controller on each board
authorGabor Juhos <juhosg@openwrt.org>
Thu, 16 Feb 2012 08:17:52 +0000 (08:17 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Thu, 16 Feb 2012 08:17:52 +0000 (08:17 +0000)
SVN-Revision: 30574

target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt288x.h
target/linux/ramips/files/arch/mips/pci/pci-rt288x.c
target/linux/ramips/files/arch/mips/ralink/rt288x/mach-v11st-fe.c

index 3eb036fbb891c6672974cac88ed1bb5f499ff2fc..29c7a72050ecd19da1ce1de7077b02e0b0134baa 100644 (file)
@@ -66,4 +66,10 @@ static inline u32 rt288x_memc_rr(unsigned reg)
 
 void rt288x_gpio_init(u32 mode);
 
+#ifdef CONFIG_PCI
+int rt288x_register_pci(void);
+#else
+static inline int rt288x_register_pci(void) { return 0; }
+#endif /* CONFIG_PCI */
+
 #endif /* _RT228X_H_ */
index 16f3bf7717a33a28031a80e8f9786481748aba75..f67902272c013aeb49db52dfbcdf70ea0e03e562 100644 (file)
@@ -210,7 +210,7 @@ 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;
@@ -248,5 +248,3 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
 {
        return 0;
 }
-
-arch_initcall(rt2880_pci_init);
index 631468086445cb739ef3b67c8aaeab265d594ed4..e2511d4df74cf3d79bcd9461e0ec7cff13417722 100644 (file)
@@ -101,6 +101,7 @@ static void __init rt_v11st_fe_init(void)
        rt288x_register_ethernet();
 
        rt288x_register_wdt();
+       rt288x_register_pci();
 }
 
 MIPS_MACHINE(RAMIPS_MACH_V11ST_FE, "V11ST-FE", "Ralink V11ST-FE", rt_v11st_fe_init);