From 2ec330fcc2d11f8f420ad835c827c6ad29a44a06 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Tue, 22 Oct 2019 20:05:25 +1300 Subject: [PATCH 1/2] ARM: mvebu: don't dereference null bd pointer As mentioned in doc/README.arm-relocation gd->bd is not available in dram_init() so we shouldn't attempt to access it. Signed-off-by: Chris Packham Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu/dram.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arch/arm/mach-mvebu/dram.c b/arch/arm/mach-mvebu/dram.c index fa8c799a46..ba8ebc6288 100644 --- a/arch/arm/mach-mvebu/dram.c +++ b/arch/arm/mach-mvebu/dram.c @@ -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(); From 70bae02f71d4d4f7bfadd4f68f0823a453bbd7e6 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Sun, 3 Nov 2019 11:52:39 +0200 Subject: [PATCH 2/2] arm: mvebu: clearfog: fix boot from SD card Enable gpio0 in SPL to allow the sdhci driver read the SD card-detect signal. Signed-off-by: Baruch Siach Reviewed-by: Stefan Roese --- arch/arm/dts/armada-388-clearfog-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/armada-388-clearfog-u-boot.dtsi b/arch/arm/dts/armada-388-clearfog-u-boot.dtsi index cf6c08881b..38e4f3d99a 100644 --- a/arch/arm/dts/armada-388-clearfog-u-boot.dtsi +++ b/arch/arm/dts/armada-388-clearfog-u-boot.dtsi @@ -12,6 +12,10 @@ u-boot,dm-spl; }; +&gpio0 { + u-boot,dm-spl; +}; + &ahci0 { u-boot,dm-spl; };