ARM: sunxi: Basic Allwinner A10/A13 (sun4i/sun5i) support

This patch adds support for the Allwinner A10/A13 SoC's. Additionally
board support for the dev-boards sun4i/sun5i is added.

NOTES (remove in final version before submission):
Additionally, I did put some comments for further cleanup into the
code. Search for "test-only" to find those.

I also added Tom Cubie as original author and added your s-o-b as you will
notice. I hope this is correct. Otherwise just change it.

Still missing it a maintainer entry for those boards in the
MAINTAINERS file. Is this Tom Cubie? Or you?

And should Tom's email address be changed? He is not working for Allwinner
any more. Correct?

Signed-off-by: Tom Cubie <tangliang@allwinnertech.com>
Signed-off-by: Henrik Nordström <henrik@henriknordstrom.net>
Signed-off-by: Stefan Roese <sr@denx.de>

ARM: sunxi: Autodetect DRAM size by using get_ram_size()

With this patch tried to consolidate the DRAM init code a bit.
dramc_get_dram_size() is removed completely. Now get_ram_size() is
called to detect the amount of DRAM by probing some values. This
is the recommended way of doing it in U-Boot.

Signed-off-by: Stefan Roese <sr@denx.de>

ARM: sunxi: Simplify board name definition

By defining the board name in boards.cfg we don't need to add
anything to the configuration header files for new board ports.
The only drawback is that we can't use spaces in names,
like "A13 MID". But I personally don't think this is a big problem.

Signed-off-by: Stefan Roese <sr@denx.de>

clean up boards
ARM: sunxi: Add MMC driver

TODO: Commit text and s-o-b's, and address "test-only" comments

Signed-off-by: Henrik Nodstrom <henrik@henriknordstrom.net>
Signed-off-by: Stefan Roese <sr@denx.de>
ARM: sunxi: Add sunxi I2C driver

TODO: From:,  S-o-b: , driver needs to get moved into drivers/i2c/

Signed-off-by: Stefan Roese <sr@denx.de>
ARM: sunxi: Add sunxi watchdog support

TODO: S-o-b's: From:, move driver to drivers/watchdog

Signed-off-by: Stefan Roese <sr@denx.de>
power: Add AXP209 Power Management controller (I2C)

This patch adds the AXP209 Power Management controller. Which will
be used by some upcoming sunxi (Allwinner A10/A13) boards.

TODO: S-o-b's: From:, Address test-only comment

Signed-off-by: Stefan Roese <sr@denx.de>
sunxi: mksunixboot adding sunxi boot header

TODO: Reword commit subject and add commit text
And addres test-only comment in code (#if 1)

Signed-off-by: Stefan Roese <sr@denx.de>
ARM: sunxi: U-Boot SPL capable of booting directly from MMC

 - Initializes SDRAM controller
 - Configures CPU power & clock
 - Loads u-boot into SDRAM
 - Jumps to u-boot

TODO: Address test-only comments, s-o-b's: From. Commit text,
seperate this patch into smaller patches (board support vs SPL etc)

Signed-off-by: Tom Cubie <tangliang@allwinnertech.com>
Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
Signed-off-by: Stefan Roese <sr@denx.de>

ARM: sunxi: dram.c: Use struct instead of macros to access register
ARM: sunxi: dram.c: Simplify dramc_set_autorefresh_cycle()
ARM: sunxi: Coding-style cleanup of u-boot-spl.lds

Signed-off-by: Stefan Roese <sr@denx.de>

ARM: sunxi: Remove compile warning in board/sunxi/board.c

Remove compile warning:
board.c: In function 'spl_display_print':
board.c:95:2: warning: 'return' with a value, in function returning void [enabled by default]

Additionally a comment is changed to match the recommended
comment style.

Signed-off-by: Stefan Roese <sr@denx.de>

ARM: sunxi: Add CONFIG_SPL_PAD_TO for combined sunxi-spl & u-boot

Signed-off-by: Stefan Roese <sr@denx.de>

Makefile: sunxi: Add build target for combined sunxi-spl.bin & u-boot.bin

Signed-off-by: Stefan Roese <sr@denx.de>
ARM sunxi: Add SPL loaders for A13 OlinuXIno and Mele A1000 boards
ARM sunxi: add SPL board definition for cubieboard

Signed-off-by: Alejandro Mery <amery@geeks.cl>
Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
Signed-off-by: Stefan Roese <sr@denx.de>
ARM sunxi: Hackberry 1GB SPL board definition

Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
Signed-off-by: J M <mtx512jm@gmail.com>
ARM sunxi: a13_mid board definition

Signed-off-by: Jari Helaakoski <tekkuli@gmail.com>
Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
ARM sunxi: add mini-x board

Signed-off-by: Jari Helaakoski <tekkuli@gmail.com>
Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
ARM sunxi: add hyundai A7HD definition

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
Signed-off-by: Stefan Roese <sr@denx.de>