Re: [U-Boot] [PATCH v5 4/8] sunxi: add sun7i cpu, board and start of day support

2014-05-09 Thread Tom Rini
On Mon, May 05, 2014 at 11:52:26AM +0100, Ian Campbell wrote:

 This patch adds generic board, start of day and basic build system support for
 the Allwinner A20 (sun7i) processor. This code will not been compiled until 
 the
 build is hooked up in a later patch. It has been split out to keep the patches
 manageable.
 
 Signed-off-by: Adam Sampson a...@offog.org
 Signed-off-by: Aleksei Mamlin mamli...@gmail.com
 Signed-off-by: Alexandru Gagniuc mr.nuke...@gmail.com
 Signed-off-by: Chen-Yu Tsai w...@csie.org
 Signed-off-by: Emilio López emi...@elopez.com.ar
 Signed-off-by: Hans de Goede hdego...@redhat.com
 Signed-off-by: Henrik Nordstrom hen...@henriknordstrom.net
 Signed-off-by: Jens Kuske jensku...@gmail.com
 Signed-off-by: Luc Verhaegen l...@skynet.be
 Signed-off-by: Luke Leighton l...@lkcl.net
 Signed-off-by: Oliver Schinagl oli...@schinagl.nl
 Signed-off-by: Patrick Wood patrickhw...@gmail.com
 Signed-off-by: Stefan Roese s...@denx.de
 Signed-off-by: Wills Wang wills.wang.o...@gmail.com
 Signed-off-by: Ian Campbell i...@hellion.org.uk
 Reviewed-by: Marek Vasut ma...@denx.de
 Cc: Tom Cubie mr.hip...@gmail.com

Reviewed-by: Tom Rini tr...@ti.com

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v5 4/8] sunxi: add sun7i cpu, board and start of day support

2014-05-05 Thread Ian Campbell
This patch adds generic board, start of day and basic build system support for
the Allwinner A20 (sun7i) processor. This code will not been compiled until the
build is hooked up in a later patch. It has been split out to keep the patches
manageable.

Signed-off-by: Adam Sampson a...@offog.org
Signed-off-by: Aleksei Mamlin mamli...@gmail.com
Signed-off-by: Alexandru Gagniuc mr.nuke...@gmail.com
Signed-off-by: Chen-Yu Tsai w...@csie.org
Signed-off-by: Emilio López emi...@elopez.com.ar
Signed-off-by: Hans de Goede hdego...@redhat.com
Signed-off-by: Henrik Nordstrom hen...@henriknordstrom.net
Signed-off-by: Jens Kuske jensku...@gmail.com
Signed-off-by: Luc Verhaegen l...@skynet.be
Signed-off-by: Luke Leighton l...@lkcl.net
Signed-off-by: Oliver Schinagl oli...@schinagl.nl
Signed-off-by: Patrick Wood patrickhw...@gmail.com
Signed-off-by: Stefan Roese s...@denx.de
Signed-off-by: Wills Wang wills.wang.o...@gmail.com
Signed-off-by: Ian Campbell i...@hellion.org.uk
Reviewed-by: Marek Vasut ma...@denx.de
Cc: Tom Cubie mr.hip...@gmail.com
---
v5: Based on 3f5ff92b1503 sunxi: add comments to pll1_para array.
  - Correct SRAM_B/SRAM_D memory map

v4: Based on d9fe0a1e061e sunxi: mksunxiboot: remove unnecessary casts.
  - No changes required

v3: Based on c89867dca2e9 sunxi: clocks: clock_get_pll5
prototype and coding style.

v2: Based on u-boot-sunxi.git#sunxi d9aa5dd3d15c sunxi: mmc:
checkpatch whitespace fixes with v2014.04-rc2 merged in:
  - just init dram once
  - remove clock ramping until power control is implemented
  - add CONFIG_SUN7I to simplify future SUN?I support.
  - fix a typo

v1: Based on u-boot-sunxi.git#sunxi commit d854c4de2f57 arm: Handle .gnu.hash
section in ldscripts vs v2014.01.
---
 arch/arm/cpu/armv7/Makefile |   2 +-
 arch/arm/cpu/armv7/sunxi/Makefile   |  11 +++
 arch/arm/cpu/armv7/sunxi/board.c|  88 +
 arch/arm/cpu/armv7/sunxi/cpu_info.c |  19 
 arch/arm/cpu/armv7/sunxi/start.c|   1 +
 arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds |  77 +++
 arch/arm/include/asm/arch-sunxi/cpu.h   | 122 
 arch/arm/include/asm/arch-sunxi/spl.h   |  20 
 board/sunxi/Makefile|  11 +++
 board/sunxi/board.c |  57 +++
 include/configs/sun7i.h |  24 +
 include/configs/sunxi-common.h  | 141 
 12 files changed, 572 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/cpu/armv7/sunxi/board.c
 create mode 100644 arch/arm/cpu/armv7/sunxi/cpu_info.c
 create mode 100644 arch/arm/cpu/armv7/sunxi/start.c
 create mode 100644 arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds
 create mode 100644 arch/arm/include/asm/arch-sunxi/cpu.h
 create mode 100644 arch/arm/include/asm/arch-sunxi/spl.h
 create mode 100644 board/sunxi/Makefile
 create mode 100644 board/sunxi/board.c
 create mode 100644 include/configs/sun7i.h
 create mode 100644 include/configs/sunxi-common.h

diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index 119ebb3..ddf00f3 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -12,7 +12,7 @@ obj-y += cache_v7.o
 obj-y  += cpu.o
 obj-y  += syslib.o
 
-ifneq 
($(CONFIG_AM43XX)$(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6)$(CONFIG_TI81XX)$(CONFIG_AT91FAMILY),)
+ifneq 
($(CONFIG_AM43XX)$(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6)$(CONFIG_TI81XX)$(CONFIG_AT91FAMILY)$(CONFIG_SUNXI),)
 ifneq ($(CONFIG_SKIP_LOWLEVEL_INIT),y)
 obj-y  += lowlevel_init.o
 endif
diff --git a/arch/arm/cpu/armv7/sunxi/Makefile 
b/arch/arm/cpu/armv7/sunxi/Makefile
index d81d26c..a64bfa1 100644
--- a/arch/arm/cpu/armv7/sunxi/Makefile
+++ b/arch/arm/cpu/armv7/sunxi/Makefile
@@ -8,7 +8,18 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 obj-y  += timer.o
+obj-y  += board.o
 obj-y  += clock.o
 obj-y  += pinmux.o
 obj-$(CONFIG_SUN7I)+= clock_sun4i.o
+
+ifndef CONFIG_SPL_BUILD
+obj-y  += cpu_info.o
+endif
+
+ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SUN7I)+= dram.o
+ifdef CONFIG_SPL_FEL
+obj-y  += start.o
+endif
+endif
diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
new file mode 100644
index 000..b5c0cb7
--- /dev/null
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -0,0 +1,88 @@
+/*
+ * (C) Copyright 2012 Henrik Nordstrom hen...@henriknordstrom.net
+ *
+ * (C) Copyright 2007-2011
+ * Allwinner Technology Co., Ltd. www.allwinnertech.com
+ * Tom Cubie tangli...@allwinnertech.com
+ *
+ * Some init for sunxi platform.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include common.h
+#include serial.h
+#ifdef CONFIG_SPL_BUILD
+#include spl.h
+#endif
+#include asm/gpio.h
+#include asm/io.h
+#include asm/arch/clock.h
+#include asm/arch/gpio.h
+#include asm/arch/sys_proto.h
+#include asm/arch/timer.h
+
+#ifdef CONFIG_SPL_BUILD
+/* Pointer to the global data structure for