diff options
author | Becky Bruce <becky.bruce@freescale.com> | 2008-10-27 16:09:42 -0500 |
---|---|---|
committer | Andrew Fleming-AFLEMING <afleming@freescale.com> | 2008-10-27 16:27:58 -0500 |
commit | cd4251624205cb97104f6e32679dc7754934f711 (patch) | |
tree | 4135b28561bbedf8bd66615a7fa8c995a519071e /drivers | |
parent | 219542a1a66ca017b12860920714a9859b18a5d7 (diff) |
powerpc: fix pci window initialization to work with > 4GB DRAM
The existing code has a few errors that need to be fixed in
order to support large RAM sizes. Fix those, and add a
comment to make it clearer.
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/fsl_pci_init.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c index 483e06b4be..7625cccec7 100644 --- a/drivers/pci/fsl_pci_init.c +++ b/drivers/pci/fsl_pci_init.c @@ -87,16 +87,20 @@ int fsl_pci_setup_inbound_windows(struct pci_region *r) } #if defined(CONFIG_PHYS_64BIT) && defined(CONFIG_SYS_PCI_64BIT) + /* + * On 64-bit capable systems, set up a mapping for all of DRAM + * in high pci address space. + */ pci_sz = 1ull << __ilog2_u64(gd->ram_size); /* round up to the next largest power of two */ if (gd->ram_size > pci_sz) - sz = 1ull << (__ilog2_u64(gd->ram_size) + 1); + pci_sz = 1ull << (__ilog2_u64(gd->ram_size) + 1); debug ("R64 bus_start: %llx phys_start: %llx size: %llx\n", - (u64)CONFIG_SYS_PCI_MEMORY_BUS, + (u64)CONFIG_SYS_PCI64_MEMORY_BUS, (u64)CONFIG_SYS_PCI_MEMORY_PHYS, (u64)pci_sz); pci_set_region(r++, - CONFIG_SYS_PCI_MEMORY_BUS, + CONFIG_SYS_PCI64_MEMORY_BUS, CONFIG_SYS_PCI_MEMORY_PHYS, pci_sz, PCI_REGION_MEM | PCI_REGION_MEMORY | |