mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-13 20:36:02 +01:00
ram: sun20i_d1: Fix automatic bank detection
The check is expected to pass on D1s, where the DRAM die has only one bank, as signified by bit 12 being unset in the stock dram_para1 value. Changing the offset matches the algorithm from dram_sunxi_dw.c (which uses 2 bank bits + 9 page bits), and works on D1, D1s, and T113-S3. Link: https://github.com/smaeul/sun20i_d1_spl/issues/14 Link: https://github.com/YuzukiHD/TinyKasKit/commit/1bc76937dcf3 Reported-by: YuzukiTsuru <gloomyghost@gloomyghost.com> Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
parent
0ed210b265
commit
6b5d53a885
@ -1100,7 +1100,7 @@ static int auto_scan_dram_size(const dram_para_t *para, dram_config_t *config)
|
||||
udelay(1);
|
||||
|
||||
// Test if bit A23 is BA2 or mirror XXX A22?
|
||||
chk = CFG_SYS_SDRAM_BASE + (1U << 22);
|
||||
chk = CFG_SYS_SDRAM_BASE + (1U << 11);
|
||||
ptr = CFG_SYS_SDRAM_BASE;
|
||||
for (i = 0, j = 0; i < 64; i++) {
|
||||
if (readl(chk) != get_payload(i & 1, ptr)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user