[U-Boot] [PATCH 14/22] ARM sunxi: SPL support for Cubieboard board

Henrik Nordström henrik at henriknordstrom.net
Sun Nov 25 12:45:13 CET 2012


From: Henrik Nordstrom <henrik at henriknordstrom.net>
Signed-off-by: Alejandro Mery <amery at geeks.cl>
Signed-off-by: Henrik Nordstrom <henrik at henriknordstrom.net>
Signed-off-by: Stefan Roese <sr at denx.de>
---
 board/sunxi/Makefile              |    2 ++
 board/sunxi/dram_cubieboard.c     |   31 +++++++++++++++++++++++++++++++
 board/sunxi/dram_cubieboard_512.c |   31 +++++++++++++++++++++++++++++++
 boards.cfg                        |    2 ++
 4 files changed, 66 insertions(+), 0 deletions(-)
 create mode 100644 board/sunxi/dram_cubieboard.c
 create mode 100644 board/sunxi/dram_cubieboard_512.c

diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
index b386b2b..c2c6c65 100644
--- a/board/sunxi/Makefile
+++ b/board/sunxi/Makefile
@@ -27,6 +27,8 @@ LIB	:= $(obj)lib$(BOARD).o
 
 COBJS-y	:= board.o
 COBJS-$(CONFIG_A13_OLINUXINO)	+= dram_a13_olinuxino.o
+COBJS-$(CONFIG_CUBIEBOARD)	+= dram_cubieboard.o
+COBJS-$(CONFIG_CUBIEBOARD_512)	+= dram_cubieboard_512.o
 COBJS-$(CONFIG_MELE_A1000)	+= dram_mele_a1000.o
 
 COBJS	:= $(COBJS-y)
diff --git a/board/sunxi/dram_cubieboard.c b/board/sunxi/dram_cubieboard.c
new file mode 100644
index 0000000..7e71b35
--- /dev/null
+++ b/board/sunxi/dram_cubieboard.c
@@ -0,0 +1,31 @@
+/* this file is generated, don't edit it yourself */
+
+#include <common.h>
+#include <asm/arch/dram.h>
+
+static struct dram_para dram_para = {
+	.clock = 480,
+	.type = 3,
+	.rank_num = 1,
+	.density = 4096,
+	.io_width = 16,
+	.bus_width = 32,
+	.cas = 6,
+	.zq = 123,
+	.odt_en = 0,
+	.size = 1024,
+	.tpr0 = 0x30926692,
+	.tpr1 = 0x1090,
+	.tpr2 = 0x1a0c8,
+	.tpr3 = 0,
+	.tpr4 = 0,
+	.tpr5 = 0,
+	.emr1 = 0,
+	.emr2 = 0,
+	.emr3 = 0,
+};
+
+int sunxi_dram_init(void)
+{
+	return dramc_init(&dram_para);
+}
diff --git a/board/sunxi/dram_cubieboard_512.c b/board/sunxi/dram_cubieboard_512.c
new file mode 100644
index 0000000..3377fba
--- /dev/null
+++ b/board/sunxi/dram_cubieboard_512.c
@@ -0,0 +1,31 @@
+/* this file is generated, don't edit it yourself */
+
+#include <common.h>
+#include <asm/arch/dram.h>
+
+static struct dram_para dram_para = {
+	.clock = 480,
+	.type = 3,
+	.rank_num = 1,
+	.density = 2048,
+	.io_width = 16,
+	.bus_width = 32,
+	.cas = 6,
+	.zq = 123,
+	.odt_en = 0,
+	.size = 512,
+	.tpr0 = 0x30926692,
+	.tpr1 = 0x1090,
+	.tpr2 = 0x1a0c8,
+	.tpr3 = 0,
+	.tpr4 = 0,
+	.tpr5 = 0,
+	.emr1 = 0,
+	.emr2 = 0,
+	.emr3 = 0,
+};
+
+int sunxi_dram_init(void)
+{
+	return dramc_init(&dram_para);
+}
diff --git a/boards.cfg b/boards.cfg
index 8371a12..207af34 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -289,6 +289,8 @@ colibri_t20_iris             arm         armv7:arm720t colibri_t20_iris  toradex
 u8500_href                   arm         armv7       u8500               st-ericsson    u8500
 snowball                     arm         armv7       snowball               st-ericsson    u8500
 A13-OLinuXino                arm         armv7       sunxi               -              sunxi       sun5i:A13_OLINUXINO,SPL
+Cubieboard                   arm         armv7       sunxi               -              sunxi       sun4i:CUBIEBOARD,SPL
+Cubieboard_512               arm         armv7       sunxi               -              sunxi       sun4i:CUBIEBOARD_512,SPL
 Mele_A1000                   arm         armv7       sunxi               -              sunxi       sun4i:MELE_A1000,SPL
 sun4i                        arm         armv7       sunxi               -              sunxi       sun4i
 sun4i_sdcon                  arm         armv7       sunxi               -              sunxi       sun4i:UART0_PORT_F
-- 
1.7.7.6




More information about the U-Boot mailing list