u-boot/arch/arm/include/asm/arch-sunxi
Hans de Goede 5665f50e81 sunxi: Fill memory before comparing it when doing dram init on sun6i
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>
2015-01-14 14:56:37 +01:00
..
clock.h sun6i: Add a sigma_delta_enable paramter to clock_set_pll5() 2015-01-14 14:56:37 +01:00
clock_sun4i.h sunxi: mmc: Properly setup mod-clk and clock sampling phases 2015-01-14 14:56:36 +01:00
clock_sun6i.h sun6i: Add a sigma_delta_enable paramter to clock_set_pll5() 2015-01-14 14:56:37 +01:00
cpu.h sunxi: Add support for the rsb (Reduced Serial Bus) 2015-01-14 14:56:36 +01:00
cpucfg_sun6i.h sun6i: Add cpucfg register definitions 2014-11-13 14:49:01 +01:00
display.h sunxi: video: Add simplefb support 2014-11-25 13:38:46 +01:00
dram.h sunxi: Fill memory before comparing it when doing dram init on sun6i 2015-01-14 14:56:37 +01:00
dram_sun4i.h sun4i: Rename dram files to dram_sun4i.x 2014-11-13 14:49:01 +01:00
dram_sun6i.h sun6i: Add dram initialization code 2014-11-13 14:49:01 +01:00
gpio.h sunxi: Add support for the rsb (Reduced Serial Bus) 2015-01-14 14:56:36 +01:00
i2c.h sunxi: Add i2c support 2014-07-18 19:41:30 +01:00
mmc.h sunxi: Use CONFIG_MACH_SUN?I from Kconfig instead of CONFIG_SUN?I 2014-11-05 13:09:58 +01:00
p2wi.h sun6i: Add new p2wi controller driver 2014-11-13 14:49:01 +01:00
prcm.h sunxi: Add support for the rsb (Reduced Serial Bus) 2015-01-14 14:56:36 +01:00
rsb.h sunxi: Add support for the rsb (Reduced Serial Bus) 2015-01-14 14:56:36 +01:00
spl.h arm: spl: fix include guard 2014-07-05 09:28:21 +02:00
sys_proto.h sunxi: add sun7i clocks and timer support. 2014-05-25 16:12:12 +02:00
timer.h sunxi: Use CONFIG_MACH_SUN?I from Kconfig instead of CONFIG_SUN?I 2014-11-05 13:09:58 +01:00
watchdog.h sunxi: Use CONFIG_MACH_SUN?I from Kconfig instead of CONFIG_SUN?I 2014-11-05 13:09:58 +01:00