mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-13 23:03:27 +08:00
ram: rk3328: Use correct frequency units in function
Fix a pair of tests in phy_dll_bypass_set() that used incorrect units for the DDR frequency, causing the DRAM controller to be misconfigured in most cases. Signed-off-by: Simon South <simon@simonsouth.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
b5500b2057
commit
18c24c1177
@ -311,12 +311,12 @@ static void phy_dll_bypass_set(struct dram_info *dram, u32 freq)
|
||||
setbits_le32(PHY_REG(phy_base, 0x56), 1 << 4);
|
||||
clrbits_le32(PHY_REG(phy_base, 0x57), 1 << 3);
|
||||
|
||||
if (freq <= (400 * MHz))
|
||||
if (freq <= 400)
|
||||
/* DLL bypass */
|
||||
setbits_le32(PHY_REG(phy_base, 0xa4), 0x1f);
|
||||
else
|
||||
clrbits_le32(PHY_REG(phy_base, 0xa4), 0x1f);
|
||||
if (freq <= (680 * MHz))
|
||||
if (freq <= 680)
|
||||
tmp = 2;
|
||||
else
|
||||
tmp = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user