mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
fsl_ddr: Fix DDR3 calculation of rank density with 8GB or more
The calculate for rank density in compute_ranksize() for DDR3 used all integers for the expression, so the result was also a 32-bit integer, even though the 'bsize' variable is a u64. Fix the expression to calculate a true 64-bit value. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
parent
6af015b86b
commit
e66f38da84
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ compute_ranksize(const ddr3_spd_eeprom_t *spd)
|
|||
if ((spd->organization & 0x7) < 4)
|
||||
nbit_sdram_width = (spd->organization & 0x7) + 2;
|
||||
|
||||
bsize = 1 << (nbit_sdram_cap_bsize - 3
|
||||
bsize = 1ULL << (nbit_sdram_cap_bsize - 3
|
||||
+ nbit_primary_bus_width - nbit_sdram_width);
|
||||
|
||||
debug("DDR: DDR III rank density = 0x%08x\n", bsize);
|
||||
|
|
Loading…
Reference in a new issue