Patchwork [U-Boot,22/22] ARM sunxi: SPL support for Olinuxino A13 Micro

login
register
mail settings
Submitter Henrik Nordström
Date Nov. 25, 2012, 11:46 a.m.
Message ID <1353843998.17518.34.camel@home.hno.se>
Download mbox | patch
Permalink /patch/201536/
State Changes Requested
Delegated to: Albert ARIBAUD
Headers show

Comments

Henrik Nordström - Nov. 25, 2012, 11:46 a.m.
From: hehopmajieh <gamishev@gmail.com>
Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
---
 board/sunxi/Makefile             |    1 +
 board/sunxi/dram_a13_oli_micro.c |   32 ++++++++++++++++++++++++++++++++
 boards.cfg                       |    1 +
 include/configs/sunxi-common.h   |    2 ++
 4 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100644 board/sunxi/dram_a13_oli_micro.c

Patch

diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
index c7d7268..8f6b984 100644
--- a/board/sunxi/Makefile
+++ b/board/sunxi/Makefile
@@ -27,6 +27,7 @@  LIB	:= $(obj)lib$(BOARD).o
 
 COBJS-y	:= board.o
 COBJS-$(CONFIG_A13_OLINUXINO)	+= dram_a13_olinuxino.o
+COBJS-$(CONFIG_A13_OLINUXINOM)	+= dram_a13_oli_micro.o
 COBJS-$(CONFIG_A13_MID)		+= dram_a13_mid.o
 COBJS-$(CONFIG_CUBIEBOARD)	+= dram_cubieboard.o
 COBJS-$(CONFIG_CUBIEBOARD_512)	+= dram_cubieboard_512.o
diff --git a/board/sunxi/dram_a13_oli_micro.c b/board/sunxi/dram_a13_oli_micro.c
new file mode 100644
index 0000000..09653df
--- /dev/null
+++ b/board/sunxi/dram_a13_oli_micro.c
@@ -0,0 +1,32 @@ 
+/* this file is generated, don't edit it yourself */
+
+#include <common.h>
+#include <asm/arch/dram.h>
+
+static struct dram_para dram_para = {
+	.clock = 408,
+	.type = 3,
+	.rank_num = 1,
+	.density = 2048,
+	.io_width = 16,
+	.bus_width = 16,
+	.cas = 9,
+	.zq = 123,
+	.odt_en = 0,
+	.size = 256,
+	.tpr0 = 0x42d899b7,
+	.tpr1 = 0xa090,
+	.tpr2 = 0x22a00,
+	.tpr3 = 0,
+	.tpr4 = 0,
+	.tpr5 = 0,
+	.emr1 = 0,
+	.emr2 = 0x10,
+	.emr3 = 0,
+
+};
+
+int sunxi_dram_init(void)
+{
+	return dramc_init(&dram_para);
+}
diff --git a/boards.cfg b/boards.cfg
index 1704a9a..ae6d05e 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -289,6 +289,7 @@  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
+A13-OLinuXinoM               arm         armv7       sunxi               -              sunxi       sun5i:A13_OLINUXINOM,SPL,NO_AXP
 A13_MID                      arm         armv7       sunxi               -              sunxi       sun5i:A13_MID,SPL
 Cubieboard                   arm         armv7       sunxi               -              sunxi       sun4i:CUBIEBOARD,SPL
 Cubieboard_512               arm         armv7       sunxi               -              sunxi       sun4i:CUBIEBOARD_512,SPL
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index b0dcfdb..c2976f0 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -236,6 +236,8 @@ 
 
 /* PMU */
 #define CONFIG_SPL_POWER_SUPPORT
+#ifndef CONFIG_NO_AXP
 #define CONFIG_AXP209_POWER
+#endif
 
 #endif /* __CONFIG_H */