From c35998aae7dbe60aaecdeb19c90a411210602f5a Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Wed, 14 Mar 2012 10:29:24 +0100 Subject: [PATCH] --- yaml --- r: 309035 b: refs/heads/master c: 6335aef59c55f50e6d8017a28c0ee985b533ea29 h: refs/heads/master i: 309033: 52fdaddbdb65d0b1c5e3522555d79cbc4b18a18f 309031: 9f8541c51151c8eae456e2ddf954d7147ebfaf44 v: v3 --- [refs] | 2 +- trunk/arch/mips/ath79/mach-ubnt-xm.c | 1 + trunk/arch/mips/ath79/pci.c | 10 ++++++++++ trunk/arch/mips/ath79/pci.h | 6 ++++++ trunk/arch/mips/pci/pci-ath724x.c | 2 -- 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index e9503530b831..c81a1166e071 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 659243ccaf296ae122c159d4c573f93561e1b8d6 +refs/heads/master: 6335aef59c55f50e6d8017a28c0ee985b533ea29 diff --git a/trunk/arch/mips/ath79/mach-ubnt-xm.c b/trunk/arch/mips/ath79/mach-ubnt-xm.c index a0435003b2e7..edbc093bf665 100644 --- a/trunk/arch/mips/ath79/mach-ubnt-xm.c +++ b/trunk/arch/mips/ath79/mach-ubnt-xm.c @@ -111,6 +111,7 @@ static void __init ubnt_xm_init(void) ath724x_pci_add_data(ubnt_xm_pci_data, ARRAY_SIZE(ubnt_xm_pci_data)); #endif /* CONFIG_PCI */ + ath79_register_pci(); } MIPS_MACHINE(ATH79_MACH_UBNT_XM, diff --git a/trunk/arch/mips/ath79/pci.c b/trunk/arch/mips/ath79/pci.c index 49574284b755..855a69dcc86e 100644 --- a/trunk/arch/mips/ath79/pci.c +++ b/trunk/arch/mips/ath79/pci.c @@ -9,6 +9,8 @@ */ #include +#include +#include #include "pci.h" static struct ath724x_pci_data *pci_data; @@ -44,3 +46,11 @@ int pcibios_plat_dev_init(struct pci_dev *dev) return PCIBIOS_SUCCESSFUL; } + +int __init ath79_register_pci(void) +{ + if (soc_is_ar724x()) + return ath724x_pcibios_init(); + + return -ENODEV; +} diff --git a/trunk/arch/mips/ath79/pci.h b/trunk/arch/mips/ath79/pci.h index 454885fa30c3..787fac2c08f0 100644 --- a/trunk/arch/mips/ath79/pci.h +++ b/trunk/arch/mips/ath79/pci.h @@ -18,4 +18,10 @@ struct ath724x_pci_data { void ath724x_pci_add_data(struct ath724x_pci_data *data, int size); +#ifdef CONFIG_PCI +int ath79_register_pci(void); +#else +static inline int ath79_register_pci(void) { return 0; } +#endif + #endif /* __ASM_MACH_ATH79_PCI_ATH724X_H */ diff --git a/trunk/arch/mips/pci/pci-ath724x.c b/trunk/arch/mips/pci/pci-ath724x.c index be01b7f8d840..ebefc165fae6 100644 --- a/trunk/arch/mips/pci/pci-ath724x.c +++ b/trunk/arch/mips/pci/pci-ath724x.c @@ -137,5 +137,3 @@ int __init ath724x_pcibios_init(void) return PCIBIOS_SUCCESSFUL; } - -arch_initcall(ath724x_pcibios_init);