sunxi: simplify get_tbclk

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: define bit shifts for CPU_AHB_APB0_CFG_REG

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: #define default values and shifts for pll cfg registers

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: only try to init dram once.

As Alex explains in [0] this triple call likely dates back to before the DRAM
init code used proper timings. It is not necessary any more.

[0] http://mid.gmane.org/<53247868.3050506@gmail.com>

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: clock_set_pll1 takes Hz not MHz

This was only wrong in the prototype.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: Remove unused CONFIG_ALLWINNER

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: configuration updates

Based on feedback from Tom Rini:
 - drop unnecessary CONFIG_SYS_PROMPT_HUSH_PS2
 - drop deprecated mtest settings
 - use generic baud rate table

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: Increase CONFIG_SYS_BOOTMAPSZ to 256MB

This value is supposed to reflect the lowmem mapping of the kernel. The
existing 16MB is clearly much to small for this. 256MB is likely to still be an
underestimate but is a reasonable, if conservative, value.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: remove key driver

This code hasn't been called since the calls to it randomly disappeared in
71e6be0ccbd5 "sunxi: get u-boot mmc spl work" and 4d29a5dd7414 "sunxi: further
clean sunxi platform". It seems to have only ever been used as test code anyway.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sunxi: Add gpio pull-up/down and cleanup pin function definitions

Add definitions for pull-up/downs, and several pin functions used
by various drivers, such as gmac, i2c, and mmc.

Also remove any pin functions not currently used by drivers.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
i2c: sunxi: Use sunxi gpio pin function macros

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
net: sunxi_emac: Use sunxi gpio pin function macros

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
net: sunxi_gmac: Use sunxi gpio pin function macros

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
mmc: sunxi: Use sunxi gpio functions to configure pins

Use the sunxi gpio driver to configure pins, instead of directly
writing magic numbers.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sunxi: fix sun5i uart1 pin definition name

The pin definition for uart1 was mis-named as uart0.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>