u-boot/arch/arm/include/asm/arch-sunxi
Hans de Goede fc3a832576 sunxi: mmc: Properly setup mod-clk and clock sampling phases
The sunxi mmc controller has both an internal clock divider, as well as
the divider in the mod0-clk for the mmc controller.

The internal divider cannot be used, as it conflicts with the setting of
clock sampling phases which is done in the mod0-clk, so it must be set to
0 (divide by 1).

For some reason while the kernel has had this correct from day one, the
u-boot sunxi mmc code has been using a fixed mod0-clk and setting its
internal divider depending on the desired speed. This is something which
we've inherited from the original Allwinner u-boot sources, but while this
has been fixed in Allwinner's own u-boot code at least for the A23 and later
upstream u-boot was still doing this wrong.

This commit fixes this, thereby also fixing mmc support not working reliable
on the A23 (which seems more sensitive to this) and possible also fixes some
other sunxi mmc issues.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-14 14:56:36 +01:00
..
clock.h sunxi: Add video pll clock functions 2014-11-25 13:38:46 +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 sunxi: mmc: Properly setup mod-clk and clock sampling phases 2015-01-14 14:56:36 +01:00
cpu.h sun6i: Add sunxi_get_ss_bonding_id() function 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 sun6i: Add dram initialization code 2014-11-13 14:49:01 +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 sun6i: Add gmac support for sun6i boards 2014-11-25 13:38:46 +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 sun6i: Add clock functions needed for SPL / DRAM init 2014-11-13 14:49:01 +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