ar71xx: build ALFA AP96 images with default profile as well
[oweals/openwrt.git] / target / linux / ar71xx / files / arch / mips / ar71xx / pci.c
index 3e1e8dbdef2b450535727c91a052ace997ed48f3..f3c64524185c8666b38e55dfd1ababfaa9d51be2 100644 (file)
@@ -54,6 +54,8 @@ int __init pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin)
        case AR71XX_SOC_AR7240:
        case AR71XX_SOC_AR7241:
        case AR71XX_SOC_AR7242:
+       case AR71XX_SOC_AR9342:
+       case AR71XX_SOC_AR9344:
                ret = ar724x_pcibios_map_irq(dev, slot, pin);
                break;
 
@@ -66,6 +68,7 @@ int __init pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin)
 
 int __init ar71xx_pci_init(unsigned nr_irqs, struct ar71xx_pci_irq *map)
 {
+       u32 t;
        int ret = 0;
 
        switch (ar71xx_soc) {
@@ -79,9 +82,18 @@ int __init ar71xx_pci_init(unsigned nr_irqs, struct ar71xx_pci_irq *map)
        case AR71XX_SOC_AR7240:
        case AR71XX_SOC_AR7241:
        case AR71XX_SOC_AR7242:
-               ret = ar724x_pcibios_init();
+               ret = ar724x_pcibios_init(AR71XX_CPU_IRQ_IP2);
                break;
 
+       case AR71XX_SOC_AR9342:
+       case AR71XX_SOC_AR9344:
+               t = ar71xx_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
+               if (t & AR934X_BOOTSTRAP_PCIE_RC) {
+                       ret = ar724x_pcibios_init(AR934X_IP2_IRQ_PCIE);
+                       break;
+               }
+
+               /* fall through */
        default:
                return 0;
        }