aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/ath79/mach-ubnt-xm.c1
-rw-r--r--arch/mips/ath79/pci.c10
-rw-r--r--arch/mips/ath79/pci.h6
-rw-r--r--arch/mips/pci/pci-ath724x.c2
4 files changed, 17 insertions, 2 deletions
diff --git a/arch/mips/ath79/mach-ubnt-xm.c b/arch/mips/ath79/mach-ubnt-xm.c
index a0435003b2e7..edbc093bf665 100644
--- a/arch/mips/ath79/mach-ubnt-xm.c
+++ b/arch/mips/ath79/mach-ubnt-xm.c
@@ -111,6 +111,7 @@ static void __init ubnt_xm_init(void)
111 ath724x_pci_add_data(ubnt_xm_pci_data, ARRAY_SIZE(ubnt_xm_pci_data)); 111 ath724x_pci_add_data(ubnt_xm_pci_data, ARRAY_SIZE(ubnt_xm_pci_data));
112#endif /* CONFIG_PCI */ 112#endif /* CONFIG_PCI */
113 113
114 ath79_register_pci();
114} 115}
115 116
116MIPS_MACHINE(ATH79_MACH_UBNT_XM, 117MIPS_MACHINE(ATH79_MACH_UBNT_XM,
diff --git a/arch/mips/ath79/pci.c b/arch/mips/ath79/pci.c
index 49574284b755..855a69dcc86e 100644
--- a/arch/mips/ath79/pci.c
+++ b/arch/mips/ath79/pci.c
@@ -9,6 +9,8 @@
9 */ 9 */
10 10
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <asm/mach-ath79/ath79.h>
13#include <asm/mach-ath79/pci.h>
12#include "pci.h" 14#include "pci.h"
13 15
14static struct ath724x_pci_data *pci_data; 16static struct ath724x_pci_data *pci_data;
@@ -44,3 +46,11 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
44 46
45 return PCIBIOS_SUCCESSFUL; 47 return PCIBIOS_SUCCESSFUL;
46} 48}
49
50int __init ath79_register_pci(void)
51{
52 if (soc_is_ar724x())
53 return ath724x_pcibios_init();
54
55 return -ENODEV;
56}
diff --git a/arch/mips/ath79/pci.h b/arch/mips/ath79/pci.h
index 454885fa30c3..787fac2c08f0 100644
--- a/arch/mips/ath79/pci.h
+++ b/arch/mips/ath79/pci.h
@@ -18,4 +18,10 @@ struct ath724x_pci_data {
18 18
19void ath724x_pci_add_data(struct ath724x_pci_data *data, int size); 19void ath724x_pci_add_data(struct ath724x_pci_data *data, int size);
20 20
21#ifdef CONFIG_PCI
22int ath79_register_pci(void);
23#else
24static inline int ath79_register_pci(void) { return 0; }
25#endif
26
21#endif /* __ASM_MACH_ATH79_PCI_ATH724X_H */ 27#endif /* __ASM_MACH_ATH79_PCI_ATH724X_H */
diff --git a/arch/mips/pci/pci-ath724x.c b/arch/mips/pci/pci-ath724x.c
index be01b7f8d840..ebefc165fae6 100644
--- a/arch/mips/pci/pci-ath724x.c
+++ b/arch/mips/pci/pci-ath724x.c
@@ -137,5 +137,3 @@ int __init ath724x_pcibios_init(void)
137 137
138 return PCIBIOS_SUCCESSFUL; 138 return PCIBIOS_SUCCESSFUL;
139} 139}
140
141arch_initcall(ath724x_pcibios_init);