fsl-ddr: Fix handling of >4G of memory when !CONFIG_PHYS_64BIT

The ddr code computes most things as 64-bit quantities and had some places
in the middle that it was using phy_addr_t and phys_size_t.

Instead we use unsigned long long through out and only at the last stage of
setting the LAWs and reporting the amount of memory to the board code do we
truncate down to what we can cover via phys_size_t.

This has the added benefit that the DDR controller itself is always setup
the same way regardless of how much memory we have.  Its only the LAW
setup that limits what is visible to the system.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
Kumar Gala
2009-06-11 23:42:35 -05:00
parent d4b130dc80
commit e7563aff17
7 changed files with 41 additions and 39 deletions

View File

@@ -52,10 +52,10 @@
* 011 32bits
*
*/
static phys_size_t
static unsigned long long
compute_ranksize(const ddr3_spd_eeprom_t *spd)
{
phys_size_t bsize;
unsigned long long bsize;
int nbit_sdram_cap_bsize = 0;
int nbit_primary_bus_width = 0;