1 From e30d942814a606c5258c7adafc6bbb49836573e9 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Sat, 17 Dec 2011 10:13:08 +0100
4 Subject: [PATCH 33/35] MIPS: ath79: add PCI registration code for AR934X
6 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
7 Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
9 arch/mips/ath79/Kconfig | 2 ++
10 arch/mips/ath79/pci.c | 13 ++++++++++++-
11 2 files changed, 14 insertions(+), 1 deletions(-)
13 --- a/arch/mips/ath79/Kconfig
14 +++ b/arch/mips/ath79/Kconfig
15 @@ -72,6 +72,8 @@ config SOC_AR933X
18 select USB_ARCH_HAS_EHCI
20 + select PCI_AR724X if PCI
24 --- a/arch/mips/ath79/pci.c
25 +++ b/arch/mips/ath79/pci.c
28 #include <linux/init.h>
29 #include <linux/pci.h>
30 +#include <asm/mach-ath79/ar71xx_regs.h>
31 #include <asm/mach-ath79/ath79.h>
32 #include <asm/mach-ath79/irq.h>
33 #include <asm/mach-ath79/pci.h>
34 @@ -57,7 +58,9 @@ int __init pcibios_map_irq(const struct
35 if (soc_is_ar71xx()) {
36 ath79_pci_irq_map = ar71xx_pci_irq_map;
37 ath79_pci_nr_irqs = ARRAY_SIZE(ar71xx_pci_irq_map);
38 - } else if (soc_is_ar724x()) {
39 + } else if (soc_is_ar724x() ||
42 ath79_pci_irq_map = ar724x_pci_irq_map;
43 ath79_pci_nr_irqs = ARRAY_SIZE(ar724x_pci_irq_map);
45 @@ -115,5 +118,13 @@ int __init ath79_register_pci(void)
47 return ar724x_pcibios_init(ATH79_CPU_IRQ_IP2);
49 + if (soc_is_ar9342() || soc_is_ar9344()) {
52 + bootstrap = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
53 + if (bootstrap & AR934X_BOOTSTRAP_PCIE_RC)
54 + return ar724x_pcibios_init(ATH79_IP2_IRQ(0));