uml: bump to 3.14.16
[openwrt/staging/yousong.git] / package / boot / uboot-sunxi / patches / 003-bananapi.patch
1 From 600e61eed037eb27df6301db9e7dab0a86cc1012 Mon Sep 17 00:00:00 2001
2 From: Bo Shen <voice.shen@gmail.com>
3 Date: Sat, 12 Apr 2014 07:42:11 +0800
4 Subject: [PATCH] bananapi: add bananapi board support
5
6 BananaPi is A20 based board. More information:
7 www.banana-pi.org
8
9 The bananapi.h is original from sun7i.h + sunxi-common.h
10 The dram_bananapi.c is original from dram_cubieboard2.c
11
12 Signed-off-by: Bo Shen <voice.shen@gmail.com>
13 ---
14 arch/arm/cpu/armv7/sunxi/board.c | 3 +
15 board/sunxi/Makefile | 1 +
16 board/sunxi/dram_bananapi.c | 31 +++
17 boards.cfg | 1 +
18 include/configs/bananapi.h | 432 +++++++++++++++++++++++++++++++++++++++
19 5 files changed, 468 insertions(+)
20 create mode 100644 board/sunxi/dram_bananapi.c
21 create mode 100644 include/configs/bananapi.h
22
23 diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
24 index 9b3d5a2..2df7704 100644
25 diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
26 index bed033b..bbe73f6 100644
27 --- a/board/sunxi/Makefile
28 +++ b/board/sunxi/Makefile
29 @@ -20,6 +20,7 @@ obj-$(CONFIG_AUXTEK_T003) += dram_auxtek_t003.o
30 # This is not a typo, uses the same mem settings as the a10s-olinuxino-m
31 obj-$(CONFIG_AUXTEK_T004) += dram_a10s_olinuxino_m.o
32 obj-$(CONFIG_BA10_TV_BOX) += dram_sun4i_384_1024_iow8.o
33 +obj-$(CONFIG_BANANAPI) += dram_bananapi.o
34 obj-$(CONFIG_COBY_MID7042) += dram_sun4i_408_1024_iow16.o
35 obj-$(CONFIG_COBY_MID8042) += dram_sun4i_360_1024_iow16.o
36 obj-$(CONFIG_COBY_MID9742) += dram_sun4i_408_1024_iow16.o
37 diff --git a/board/sunxi/dram_bananapi.c b/board/sunxi/dram_bananapi.c
38 new file mode 100644
39 index 0000000..9e75367
40 --- /dev/null
41 +++ b/board/sunxi/dram_bananapi.c
42 @@ -0,0 +1,31 @@
43 +/* this file is generated, don't edit it yourself */
44 +
45 +#include <common.h>
46 +#include <asm/arch/dram.h>
47 +
48 +static struct dram_para dram_para = {
49 + .clock = 480,
50 + .type = 3,
51 + .rank_num = 1,
52 + .density = 4096,
53 + .io_width = 16,
54 + .bus_width = 32,
55 + .cas = 9,
56 + .zq = 0x7f,
57 + .odt_en = 0,
58 + .size = 1024,
59 + .tpr0 = 0x42d899b7,
60 + .tpr1 = 0xa090,
61 + .tpr2 = 0x22a00,
62 + .tpr3 = 0x0,
63 + .tpr4 = 0x1,
64 + .tpr5 = 0x0,
65 + .emr1 = 0x4,
66 + .emr2 = 0x10,
67 + .emr3 = 0x0,
68 +};
69 +
70 +unsigned long sunxi_dram_init(void)
71 +{
72 + return dramc_init(&dram_para);
73 +}
74 diff --git a/boards.cfg b/boards.cfg
75 index f1a5d07..5073644 100644
76 --- a/boards.cfg
77 +++ b/boards.cfg
78 @@ -381,6 +381,7 @@ Active arm armv7 sunxi - sunxi
79 Active arm armv7 sunxi - sunxi Auxtek-T003 sun5i:AUXTEK_T003,SPL,AXP152_POWER,STATUSLED=34 -
80 Active arm armv7 sunxi - sunxi Auxtek-T004 sun5i:AUXTEK_T004,SPL,AXP152_POWER,STATUSLED=34 -
81 Active arm armv7 sunxi - sunxi ba10_tv_box sun4i:BA10_TV_BOX,SPL,SUNXI_EMAC -
82 +Active arm armv7 sunxi - sunxi bananapi sun7i:BANANAPI,SPL,SUNXI_GMAC,STATUSLED=248 -
83 Active arm armv7 sunxi - sunxi Coby_MID7042 sun4i:COBY_MID7042,SPL -
84 Active arm armv7 sunxi - sunxi Coby_MID8042 sun4i:COBY_MID8042,SPL -
85 Active arm armv7 sunxi - sunxi Coby_MID9742 sun4i:COBY_MID9742,SPL -
86 diff --git a/include/configs/bananapi.h b/include/configs/bananapi.h
87 new file mode 100644
88 index 0000000..5e70e63
89 --
90 1.9.3
91