summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pci-enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/pci-enum.c')
-rw-r--r--arch/arm/mach-tegra/pci-enum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/pci-enum.c b/arch/arm/mach-tegra/pci-enum.c
index 4f8c614ff8fc..1bcf659fe696 100644
--- a/arch/arm/mach-tegra/pci-enum.c
+++ b/arch/arm/mach-tegra/pci-enum.c
@@ -494,7 +494,7 @@ static void pci_tegra_setup_pci_device(struct pci_tegra_device *dev)
}
dev->res[bar_index].flags = IORESOURCE_MEM;
- dev->res[bar_index].start = 0;
+ dev->res[bar_index].start = addr;
dev->res[bar_index].end =
dev->res[bar_index].start + size - 1;
@@ -522,7 +522,7 @@ static void pci_tegra_setup_pci_device(struct pci_tegra_device *dev)
/* Handle 64 bit addresses by forcing to 32 bit addresses */
if ((flags == 0x0c) || (flags==0x04)) {
bar_index++;
- BUG_ON(bar_index < 6);
+ BUG_ON(bar_index > PCI_STD_RESOURCE_END);
pci_conf_write32(dev->bus, dev->devfn, bar_index * 4
+ PCI_BASE_ADDRESS_0, 0);
}