mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-16 17:58:23 +00:00
- Clearfog: Fix SD card booting (Baruch) - Fix potential dereference NULL pointer in dram_init() (Chris)
This commit is contained in:
commit
cffda7ddb8
2 changed files with 4 additions and 10 deletions
|
@ -12,6 +12,10 @@
|
|||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
||||
&ahci0 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
|
|
@ -281,16 +281,6 @@ int dram_init(void)
|
|||
size = MVEBU_SDRAM_SIZE_MAX;
|
||||
}
|
||||
|
||||
for (; i < CONFIG_NR_DRAM_BANKS; i++) {
|
||||
/* If above loop terminated prematurely, we need to set
|
||||
* remaining banks' start address & size as 0. Otherwise other
|
||||
* u-boot functions and Linux kernel gets wrong values which
|
||||
* could result in crash */
|
||||
gd->bd->bi_dram[i].start = 0;
|
||||
gd->bd->bi_dram[i].size = 0;
|
||||
}
|
||||
|
||||
|
||||
if (ecc_enabled())
|
||||
dram_ecc_scrubbing();
|
||||
|
||||
|
|
Loading…
Reference in a new issue