mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-15 07:43:33 +08:00
5665f50e81
The sun8i boot0 code fills the DRAM with a "random" pattern before comparing it at different offsets to do columns, etc. detection. The sun6i boot0 code does not do it, instead relying on the memory contents being random enough to begin with for the memcmp to properly detect the wrap-around address, iow it is working purely by chance. Since our sun6i dram code was modelled after the boot0 code it contained the same issue. This commit fixes this by filling the memory with a unique, distinct pattern. The new mctl_mem_fill function this introduces is added as an inline helper in dram.h, so that it can be shared with the sun8i dram code. While at it move mctl_mem_matches to dram.h for re-use in sun8i too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk> |
||
---|---|---|
.. | ||
board.c | ||
clock_sun4i.c | ||
clock_sun6i.c | ||
clock.c | ||
config.mk | ||
cpu_info.c | ||
dram_sun4i.c | ||
dram_sun6i.c | ||
Makefile | ||
p2wi.c | ||
pinmux.c | ||
prcm.c | ||
psci.S | ||
rsb.c | ||
start.c | ||
timer.c | ||
u-boot-spl-fel.lds | ||
u-boot-spl.lds |