mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
driver/ddr/freescale: Fix DDR3 driver for ARM
Reading DDR register should use ddr_in32() for proper endianess. This patch fixes incorrect waiting time for ARM platforms. Signed-off-by: York Sun <yorksun@freescale.com>
This commit is contained in:
parent
d28cb67142
commit
5cb27c5d44
1 changed files with 1 additions and 1 deletions
|
@ -194,7 +194,7 @@ step2:
|
||||||
* For example, 2GB on 666MT/s 64-bit bus takes about 402ms
|
* For example, 2GB on 666MT/s 64-bit bus takes about 402ms
|
||||||
* Let's wait for 800ms
|
* Let's wait for 800ms
|
||||||
*/
|
*/
|
||||||
bus_width = 3 - ((ddr->sdram_cfg & SDRAM_CFG_DBW_MASK)
|
bus_width = 3 - ((ddr_in32(&ddr->sdram_cfg) & SDRAM_CFG_DBW_MASK)
|
||||||
>> SDRAM_CFG_DBW_SHIFT);
|
>> SDRAM_CFG_DBW_SHIFT);
|
||||||
timeout = ((total_gb_size_per_controller << (6 - bus_width)) * 100 /
|
timeout = ((total_gb_size_per_controller << (6 - bus_width)) * 100 /
|
||||||
(get_ddr_freq(0) >> 20)) << 1;
|
(get_ddr_freq(0) >> 20)) << 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue