diff options
Diffstat (limited to 'arch/powerpc/platforms/powermac/pci.c')
-rw-r--r-- | arch/powerpc/platforms/powermac/pci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index abe8d7e2ebeb..41a80a4fb97e 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -839,8 +839,7 @@ static void __init setup_u3_ht(struct pci_controller* hose) | |||
839 | * into cfg_addr | 839 | * into cfg_addr |
840 | */ | 840 | */ |
841 | hose->cfg_data = ioremap(cfg_res.start, 0x02000000); | 841 | hose->cfg_data = ioremap(cfg_res.start, 0x02000000); |
842 | hose->cfg_addr = ioremap(self_res.start, | 842 | hose->cfg_addr = ioremap(self_res.start, resource_size(&self_res)); |
843 | self_res.end - self_res.start + 1); | ||
844 | 843 | ||
845 | /* | 844 | /* |
846 | * /ht node doesn't expose a "ranges" property, we read the register | 845 | * /ht node doesn't expose a "ranges" property, we read the register |
@@ -1324,8 +1323,7 @@ static void fixup_u4_pcie(struct pci_dev* dev) | |||
1324 | */ | 1323 | */ |
1325 | if (r->start >= 0xf0000000 && r->start < 0xf3000000) | 1324 | if (r->start >= 0xf0000000 && r->start < 0xf3000000) |
1326 | continue; | 1325 | continue; |
1327 | if (!region || (r->end - r->start) > | 1326 | if (!region || resource_size(r) > resource_size(region)) |
1328 | (region->end - region->start)) | ||
1329 | region = r; | 1327 | region = r; |
1330 | } | 1328 | } |
1331 | /* Nothing found, bail */ | 1329 | /* Nothing found, bail */ |