mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-17 15:27:00 +00:00
arm: mxs: Wait for DRAM to start
Instead of waiting for a fixed period of time and hoping for the best that the DRAM will start, read back an EMI status register which tells us exactly when the DRAM started. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
be0ecdbed5
commit
7c604e98c2
1 changed files with 7 additions and 1 deletions
|
@ -274,7 +274,13 @@ static void mx23_mem_init(void)
|
|||
setbits_le32(MXS_DRAM_BASE + 0x20, 1 << 16);
|
||||
|
||||
clrbits_le32(MXS_DRAM_BASE + 0x40, 1 << 17);
|
||||
early_delay(20000);
|
||||
|
||||
/* Wait for EMI_STAT bit DRAM_HALTED */
|
||||
for (;;) {
|
||||
if (!(readl(MXS_EMI_BASE + 0x10) & (1 << 1)))
|
||||
break;
|
||||
early_delay(1000);
|
||||
}
|
||||
|
||||
/* Adjust EMI port priority. */
|
||||
clrsetbits_le32(0x80020000, 0x1f << 16, 0x2);
|
||||
|
|
Loading…
Add table
Reference in a new issue