Revert "sunxi: board: Print error after power initialization fails"
Commit a8011eb84dfa("sunxi: board: Print error after power initialization
fails") moved the DRAM init after the increase of the CPU clock
frequency. This lead to various DRAM initialisation failures on some
boards (hangs or wrong size reported, on a NanoPi Duo2 and OrangePi
Zero, for instance). Lowering the CPU frequency significantly (for instance
to 408 MHz) seems to work around the problem, so this points to some timing
issues in the DRAM code.
Debugging this sounds like a larger job, so let's just revert this patch
to bring back those boards.
Beside this probably unintended change the patch just moved the error
message around, so reverting this is not a real loss.
This reverts commit a8011eb84d
.
Tested-By: Priit Laes <plaes@plaes.org>
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
This commit is contained in:
parent
bea3d82620
commit
44c214dc27
@ -637,6 +637,13 @@ void sunxi_board_init(void)
|
||||
power_failed |= axp_set_sw(IS_ENABLED(CONFIG_AXP_SW_ON));
|
||||
#endif
|
||||
#endif
|
||||
printf("DRAM:");
|
||||
gd->ram_size = sunxi_dram_init();
|
||||
printf(" %d MiB\n", (int)(gd->ram_size >> 20));
|
||||
if (!gd->ram_size)
|
||||
hang();
|
||||
|
||||
sunxi_spl_store_dram_size(gd->ram_size);
|
||||
|
||||
/*
|
||||
* Only clock up the CPU to full speed if we are reasonably
|
||||
@ -645,16 +652,7 @@ void sunxi_board_init(void)
|
||||
if (!power_failed)
|
||||
clock_set_pll1(CONFIG_SYS_CLK_FREQ);
|
||||
else
|
||||
printf("Error setting up the power controller.\n"
|
||||
"CPU frequency not set.\n");
|
||||
|
||||
printf("DRAM:");
|
||||
gd->ram_size = sunxi_dram_init();
|
||||
printf(" %d MiB\n", (int)(gd->ram_size >> 20));
|
||||
if (!gd->ram_size)
|
||||
hang();
|
||||
|
||||
sunxi_spl_store_dram_size(gd->ram_size);
|
||||
printf("Failed to set core voltage! Can't set CPU frequency\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user