X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Ffiles%2Farch%2Fmips%2Fpci%2Fpci-ar724x.c;fp=target%2Flinux%2Far71xx%2Ffiles%2Farch%2Fmips%2Fpci%2Fpci-ar724x.c;h=bf8e369521e3066181f2623de1b33eebdfd72962;hp=4ef50145e2ce02b58f25c59ff9dd3fd24fc7c1f9;hb=a769ca08b56ac7a9a066240a78c1e5ac8df48966;hpb=7fddf0195e51e8bc5263bdd8e1c5abc9727f9895 diff --git a/target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c b/target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c index 4ef50145e2..bf8e369521 100644 --- a/target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c +++ b/target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c @@ -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);