[ar7] refresh and refine 972-cpmac_multi_probe.patch, patch from sn9
[openwrt.git] / target / linux / ar71xx / files / arch / mips / pci / pci-ar724x.c
index b639806..bf8e369 100644 (file)
@@ -111,10 +111,9 @@ static int ar724x_pci_read_config(struct pci_bus *bus, unsigned int devfn,
         * if we set the BAR with proper base address
         */
        if ((where == 0x10) && (size == 4)) {
-               if (ar71xx_soc == AR71XX_SOC_AR7240)
-                       ar724x_pci_write(ar724x_pci_devcfg_base, where, size, 0xffff);
-               else
-                       ar724x_pci_write(ar724x_pci_devcfg_base, where, size, 0x1000ffff);
+               u32 val;
+               val = (ar71xx_soc == AR71XX_SOC_AR7240) ? 0xffff : 0x1000ffff;
+               ar724x_pci_write(ar724x_pci_devcfg_base, where, size, val);
        }
 
        return PCIBIOS_SUCCESSFUL;
@@ -256,7 +255,8 @@ static int __init ar724x_pci_setup(void)
                return -ENODEV;
        }
 
-       if (ar71xx_soc == AR71XX_SOC_AR7241 || ar71xx_soc == AR71XX_SOC_AR7242) {
+       if (ar71xx_soc == AR71XX_SOC_AR7241 ||
+           ar71xx_soc == AR71XX_SOC_AR7242) {
                t = __raw_readl(base + AR724X_PCI_REG_APP);
                t |= BIT(16);
                __raw_writel(t, base + AR724X_PCI_REG_APP);
@@ -384,12 +384,12 @@ int __init ar724x_pcibios_init(void)
 
        return 0;
 
- err_unmap_ctrl:
+err_unmap_ctrl:
        iounmap(ar724x_pci_ctrl_base);
-  err_unmap_devcfg:
+err_unmap_devcfg:
        iounmap(ar724x_pci_devcfg_base);
- err_unmap_localcfg:
+err_unmap_localcfg:
        iounmap(ar724x_pci_localcfg_base);
- err:
+err:
        return ret;
 }
This page took 0.029545 seconds and 4 git commands to generate.