5fe5c5b8f0d941c0fac958e745da0d7e9f1cafb9
[openwrt.git] / package / boot / uboot-sunxi / patches / 001-a10_olinuxino_lime_support.patch
1 diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
2 index 4c85fe9..61dc9ab 100644
3 --- a/board/sunxi/Makefile
4 +++ b/board/sunxi/Makefile
5 @@ -31,6 +31,7 @@ LIB   := $(obj)lib$(BOARD).o
6  
7  COBJS-y        := board.o
8  COBJS-$(CONFIG_A10_MID_1GB)    += dram_sun4i_360_1024_iow16.o
9 +COBJS-$(CONFIG_A10_OLINUXINO_L)        += dram_a10_olinuxino_l.o
10  COBJS-$(CONFIG_A10S_OLINUXINO_M)       += dram_a10s_olinuxino_m.o
11  COBJS-$(CONFIG_A13_OLINUXINO)  += dram_a13_olinuxino.o
12  COBJS-$(CONFIG_A13_OLINUXINOM) += dram_a13_oli_micro.o
13 diff --git a/board/sunxi/dram_a10_olinuxino_l.c b/board/sunxi/dram_a10_olinuxino_l.c
14 new file mode 100644
15 index 0000000..31b6542
16 --- /dev/null
17 +++ b/board/sunxi/dram_a10_olinuxino_l.c
18 @@ -0,0 +1,31 @@
19 +/* this file is generated, don't edit it yourself */
20 +
21 +#include <common.h>
22 +#include <asm/arch/dram.h>
23 +
24 +static struct dram_para dram_para = {
25 +       .clock = 480,
26 +       .type = 3,
27 +       .rank_num = 1,
28 +       .density = 4096,
29 +       .io_width = 16,
30 +       .bus_width = 16,
31 +       .cas = 9,
32 +       .zq = 123,
33 +       .odt_en = 0,
34 +       .size = 512,
35 +       .tpr0 = 0x42d899b7,
36 +       .tpr1 = 0xa090,
37 +       .tpr2 = 0x22a00,
38 +       .tpr3 = 0,
39 +       .tpr4 = 0,
40 +       .tpr5 = 0,
41 +       .emr1 = 0x4,
42 +       .emr2 = 0x10,
43 +       .emr3 = 0,
44 +};
45 +
46 +unsigned long sunxi_dram_init(void)
47 +{
48 +       return dramc_init(&dram_para);
49 +}
50 diff --git a/boards.cfg b/boards.cfg
51 index 24f6a67..94a2c82 100644
52 --- a/boards.cfg
53 +++ b/boards.cfg
54 @@ -404,6 +404,7 @@ Active  arm         armv7          sunxi       -               sunxi
55  Active  arm         armv7          sunxi       -               sunxi               uhost_u1a                            sun4i:UHOST_U1A,SPL,STATUSLED=34                                                                                                  -
56  Active  arm         armv7          sunxi       -               sunxi               wobo-i5                              sun5i:WOBO_I5,SPL,STATUSLED=34                                                                                                    -
57  Active  arm         armv7          sunxi       -               sunxi               xzpad700                             sun5i:XZPAD700,SPL                                                                                                                -
58 +Active  arm         armv7          sunxi       -               sunxi               A10-OLinuXino-Lime                   sun4i:A10_OLINUXINO_L,SPL,SUNXI_EMAC                                                                                             -
59  Active  arm         armv7          u8500       st-ericsson     snowball            snowball                             -                                                                                                                                 Mathieu Poirier <mathieu.poirier@linaro.org>
60  Active  arm         armv7          u8500       st-ericsson     u8500               u8500_href                           -                                                                                                                                 -
61  Active  arm         armv7          vf610       freescale       vf610twr            vf610twr                             vf610twr:IMX_CONFIG=board/freescale/vf610twr/imximage.cfg                                                                         Alison Wang <b18965@freescale.com>