Commit e1a0888ed224cc4c4e019a37b7b0331b11745e4d
1 parent
046664aedd
Exists in
v2017.01-smarct4x
and in
37 other branches
sunxi: Convert sun5i boards to use auto dram configuration
Currently we've separate detailed dram settings for all sun5i boards, this moves them over to using auto dram configuration so that we can get rid of all the per board dram_foo.c files. This has been tested on a A10s-Olinuxino, A13-Olinuxino, A13-OlinuxinoM, mk802-a10s and r7-tv-dongle board. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Showing 12 changed files with 19 additions and 169 deletions Side-by-side Diff
- board/sunxi/Kconfig
- board/sunxi/Makefile
- board/sunxi/dram_a10s_olinuxino_m.c
- board/sunxi/dram_a13_oli_micro.c
- board/sunxi/dram_a13_olinuxino.c
- board/sunxi/dram_bananapi.c
- board/sunxi/dram_r7dongle.c
- configs/A10s-OLinuXino-M_defconfig
- configs/A13-OLinuXinoM_defconfig
- configs/A13-OLinuXino_defconfig
- configs/Auxtek-T004_defconfig
- configs/r7-tv-dongle_defconfig
board/sunxi/Kconfig
... | ... | @@ -39,16 +39,14 @@ |
39 | 39 | default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I |
40 | 40 | ---help--- |
41 | 41 | Set the dram clock speed, valid range 240 - 480, must be a multiple |
42 | - of 24. Note on sun4i / sun5i / sun7i this is only used by boards | |
43 | - which use dram autoconfig. | |
42 | + of 24. | |
44 | 43 | |
45 | 44 | config DRAM_ZQ |
46 | 45 | int "sunxi dram zq value" |
47 | 46 | default 123 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN8I |
48 | 47 | default 127 if MACH_SUN7I |
49 | 48 | ---help--- |
50 | - Set the dram zq value. Note on sun4i / sun5i / sun7i this is only | |
51 | - used by boards which use dram autoconfig. | |
49 | + Set the dram zq value. | |
52 | 50 | |
53 | 51 | if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I |
54 | 52 | config DRAM_EMR1 |
... | ... | @@ -56,8 +54,7 @@ |
56 | 54 | default 0 if MACH_SUN4I |
57 | 55 | default 4 if MACH_SUN5I || MACH_SUN7I |
58 | 56 | ---help--- |
59 | - Set the dram controller emr1 value. Note this is only used by boards | |
60 | - which use dram autoconfig. | |
57 | + Set the dram controller emr1 value. | |
61 | 58 | endif |
62 | 59 | |
63 | 60 | config SYS_CONFIG_NAME |
board/sunxi/Makefile
... | ... | @@ -12,12 +12,6 @@ |
12 | 12 | obj-$(CONFIG_SUNXI_GMAC) += gmac.o |
13 | 13 | obj-$(CONFIG_SUNXI_AHCI) += ahci.o |
14 | 14 | obj-$(CONFIG_MACH_SUN4I) += dram_sun4i_auto.o |
15 | +obj-$(CONFIG_MACH_SUN5I) += dram_sun5i_auto.o | |
15 | 16 | obj-$(CONFIG_MACH_SUN7I) += dram_sun5i_auto.o |
16 | -obj-$(CONFIG_TARGET_A10S_OLINUXINO_M) += dram_a10s_olinuxino_m.o | |
17 | -obj-$(CONFIG_TARGET_A13_OLINUXINO) += dram_a13_olinuxino.o | |
18 | -obj-$(CONFIG_TARGET_A13_OLINUXINOM) += dram_a13_oli_micro.o | |
19 | -# This is not a typo, uses the same mem settings as the a10s-olinuxino-m | |
20 | -obj-$(CONFIG_TARGET_AUXTEK_T004) += dram_a10s_olinuxino_m.o | |
21 | -obj-$(CONFIG_TARGET_MK802_A10S) += dram_sun5i_auto.o | |
22 | -obj-$(CONFIG_TARGET_R7DONGLE) += dram_r7dongle.o |
board/sunxi/dram_a10s_olinuxino_m.c
1 | -/* this file is generated, don't edit it yourself */ | |
2 | - | |
3 | -#include <common.h> | |
4 | -#include <asm/arch/dram.h> | |
5 | - | |
6 | -static struct dram_para dram_para = { | |
7 | - .clock = 432, | |
8 | - .type = 3, | |
9 | - .rank_num = 1, | |
10 | - .density = 4096, | |
11 | - .io_width = 16, | |
12 | - .bus_width = 16, | |
13 | - .cas = 9, | |
14 | - .zq = 123, | |
15 | - .odt_en = 0, | |
16 | - .size = 512, | |
17 | - .tpr0 = 0x42d899b7, | |
18 | - .tpr1 = 0xa090, | |
19 | - .tpr2 = 0x22a00, | |
20 | - .tpr3 = 0, | |
21 | - .tpr4 = 0, | |
22 | - .tpr5 = 0, | |
23 | - .emr1 = 0x4, | |
24 | - .emr2 = 0x10, | |
25 | - .emr3 = 0, | |
26 | -}; | |
27 | - | |
28 | -unsigned long sunxi_dram_init(void) | |
29 | -{ | |
30 | - return dramc_init(&dram_para); | |
31 | -} |
board/sunxi/dram_a13_oli_micro.c
1 | -/* this file is generated, don't edit it yourself */ | |
2 | - | |
3 | -#include <common.h> | |
4 | -#include <asm/arch/dram.h> | |
5 | - | |
6 | -static struct dram_para dram_para = { | |
7 | - .clock = 408, | |
8 | - .type = 3, | |
9 | - .rank_num = 1, | |
10 | - .density = 2048, | |
11 | - .io_width = 16, | |
12 | - .bus_width = 16, | |
13 | - .cas = 9, | |
14 | - .zq = 123, | |
15 | - .odt_en = 0, | |
16 | - .size = 256, | |
17 | - .tpr0 = 0x42d899b7, | |
18 | - .tpr1 = 0xa090, | |
19 | - .tpr2 = 0x22a00, | |
20 | - .tpr3 = 0, | |
21 | - .tpr4 = 0, | |
22 | - .tpr5 = 0, | |
23 | - .emr1 = 0, | |
24 | - .emr2 = 0x10, | |
25 | - .emr3 = 0, | |
26 | - | |
27 | -}; | |
28 | - | |
29 | -unsigned long sunxi_dram_init(void) | |
30 | -{ | |
31 | - return dramc_init(&dram_para); | |
32 | -} |
board/sunxi/dram_a13_olinuxino.c
1 | -/* this file is generated, don't edit it yourself */ | |
2 | - | |
3 | -#include <common.h> | |
4 | -#include <asm/arch/dram.h> | |
5 | - | |
6 | -static struct dram_para dram_para = { | |
7 | - .clock = 408, | |
8 | - .type = 3, | |
9 | - .rank_num = 1, | |
10 | - .density = 2048, | |
11 | - .io_width = 8, | |
12 | - .bus_width = 16, | |
13 | - .cas = 9, | |
14 | - .zq = 123, | |
15 | - .odt_en = 0, | |
16 | - .size = 512, | |
17 | - .tpr0 = 0x42d899b7, | |
18 | - .tpr1 = 0xa090, | |
19 | - .tpr2 = 0x22a00, | |
20 | - .tpr3 = 0, | |
21 | - .tpr4 = 0, | |
22 | - .tpr5 = 0, | |
23 | - .emr1 = 0, | |
24 | - .emr2 = 0x10, | |
25 | - .emr3 = 0, | |
26 | -}; | |
27 | - | |
28 | -unsigned long sunxi_dram_init(void) | |
29 | -{ | |
30 | - return dramc_init(&dram_para); | |
31 | -} |
board/sunxi/dram_bananapi.c
1 | -/* this file is generated, don't edit it yourself */ | |
2 | - | |
3 | -#include <common.h> | |
4 | -#include <asm/arch/dram.h> | |
5 | - | |
6 | -static struct dram_para dram_para = { | |
7 | - .clock = 432, | |
8 | - .type = 3, | |
9 | - .rank_num = 1, | |
10 | - .density = 4096, | |
11 | - .io_width = 16, | |
12 | - .bus_width = 32, | |
13 | - .cas = 9, | |
14 | - .zq = 0x7f, | |
15 | - .odt_en = 0, | |
16 | - .size = 1024, | |
17 | - .tpr0 = 0x42d899b7, | |
18 | - .tpr1 = 0xa090, | |
19 | - .tpr2 = 0x22a00, | |
20 | - .tpr3 = 0x0, | |
21 | - .tpr4 = 0x1, | |
22 | - .tpr5 = 0x0, | |
23 | - .emr1 = 0x4, | |
24 | - .emr2 = 0x10, | |
25 | - .emr3 = 0x0, | |
26 | -}; | |
27 | - | |
28 | -unsigned long sunxi_dram_init(void) | |
29 | -{ | |
30 | - return dramc_init(&dram_para); | |
31 | -} |
board/sunxi/dram_r7dongle.c
1 | -/* this file is generated, don't edit it yourself */ | |
2 | - | |
3 | -#include <common.h> | |
4 | -#include <asm/arch/dram.h> | |
5 | - | |
6 | -static struct dram_para dram_para = { | |
7 | - .clock = 384, | |
8 | - .type = 3, | |
9 | - .rank_num = 1, | |
10 | - .density = 2048, | |
11 | - .io_width = 8, | |
12 | - .bus_width = 32, | |
13 | - .cas = 9, | |
14 | - .zq = 123, | |
15 | - .odt_en = 0, | |
16 | - .size = 1024, | |
17 | - .tpr0 = 0x42d899b7, | |
18 | - .tpr1 = 0xa090, | |
19 | - .tpr2 = 0x22a00, | |
20 | - .tpr3 = 0, | |
21 | - .tpr4 = 0, | |
22 | - .tpr5 = 0, | |
23 | - .emr1 = 0x04, | |
24 | - .emr2 = 0x10, | |
25 | - .emr3 = 0, | |
26 | -}; | |
27 | - | |
28 | -unsigned long sunxi_dram_init(void) | |
29 | -{ | |
30 | - return dramc_init(&dram_para); | |
31 | -} |
configs/A10s-OLinuXino-M_defconfig
configs/A13-OLinuXinoM_defconfig
configs/A13-OLinuXino_defconfig
configs/Auxtek-T004_defconfig