summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/sunxi/Kconfig36
-rw-r--r--board/sunxi/MAINTAINERS2
-rw-r--r--board/sunxi/Makefile8
-rw-r--r--board/sunxi/dram_cubieboard.c31
-rw-r--r--board/sunxi/dram_sun4i_360_1024_iow16.c31
-rw-r--r--board/sunxi/dram_sun4i_360_512.c31
-rw-r--r--board/sunxi/dram_sun4i_auto.c (renamed from board/sunxi/dram_sun4i_360_1024_iow8.c)16
7 files changed, 29 insertions, 126 deletions
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index d4d1fa24e7..514e02236a 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -33,21 +33,31 @@ config MACH_SUN8I
endchoice
-if MACH_SUN6I || MACH_SUN8I
-
config DRAM_CLK
- int "sun6i dram clock speed"
- default 312
+ int "sunxi dram clock speed"
+ default 312 if MACH_SUN6I || MACH_SUN8I
+ default 360 if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
---help---
Set the dram clock speed, valid range 240 - 480, must be a multiple
- of 24.
+ of 24. Note on sun4i / sun5i / sun7i this is only used by boards
+ which use dram autoconfig.
config DRAM_ZQ
- int "sun6i dram zq value"
- default 123
+ int "sunxi dram zq value"
+ default 123 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN8I
+ default 127 if MACH_SUN7I
---help---
- Set the dram zq value.
-
+ Set the dram zq value. Note on sun4i / sun5i / sun7i this is only
+ used by boards which use dram autoconfig.
+
+if MACH_SUN4I || MACH_SUN5I || MACH_SUN7I
+config DRAM_EMR1
+ int "sunxi dram emr1 value"
+ default 0 if MACH_SUN4I
+ default 4 if MACH_SUN5I || MACH_SUN7I
+ ---help---
+ Set the dram controller emr1 value. Note this is only used by boards
+ which use dram autoconfig.
endif
config SYS_CONFIG_NAME
@@ -132,10 +142,6 @@ config TARGET_PCDUINO3
bool "PCDUINO3"
depends on MACH_SUN7I
-config TARGET_MELE_A1000G
- bool "MELE_A1000G"
- depends on MACH_SUN4I
-
config TARGET_MELE_A1000
bool "MELE_A1000"
depends on MACH_SUN4I
@@ -148,10 +154,6 @@ config TARGET_MELE_M9
bool "MELE_M9"
depends on MACH_SUN6I
-config TARGET_MINI_X_1GB
- bool "MINI_X_1GB"
- depends on MACH_SUN4I
-
config TARGET_MINI_X
bool "MINI_X"
depends on MACH_SUN4I
diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index 3a09be92de..6ed8c3a2a8 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -7,10 +7,8 @@ F: configs/A10-OLinuXino-Lime_defconfig
F: configs/ba10_tv_box_defconfig
F: configs/Cubieboard_defconfig
F: configs/Mele_A1000_defconfig
-F: configs/Mele_A1000G_defconfig
F: configs/Mele_M3_defconfig
F: configs/Mini-X_defconfig
-F: configs/Mini-X-1Gb_defconfig
F: include/configs/sun5i.h
F: configs/A10s-OLinuXino-M_defconfig
F: configs/A13-OLinuXino_defconfig
diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
index fab0877a54..54628e3ec4 100644
--- a/board/sunxi/Makefile
+++ b/board/sunxi/Makefile
@@ -23,15 +23,13 @@ obj-$(CONFIG_TARGET_AUXTEK_T004) += dram_a10s_olinuxino_m.o
obj-$(CONFIG_TARGET_BA10_TV_BOX) += dram_sun4i_384_1024_iow8.o
obj-$(CONFIG_TARGET_BANANAPI) += dram_bananapi.o
obj-$(CONFIG_TARGET_BANANAPRO) += dram_bananapi.o
-obj-$(CONFIG_TARGET_CUBIEBOARD) += dram_cubieboard.o
+obj-$(CONFIG_TARGET_CUBIEBOARD) += dram_sun4i_auto.o
obj-$(CONFIG_TARGET_CUBIEBOARD2) += dram_cubieboard2.o
obj-$(CONFIG_TARGET_CUBIETRUCK) += dram_cubietruck.o
obj-$(CONFIG_TARGET_I12_TVBOX) += dram_sun7i_384_1024_iow16.o
-obj-$(CONFIG_TARGET_MELE_A1000) += dram_sun4i_360_512.o
-obj-$(CONFIG_TARGET_MELE_A1000G) += dram_sun4i_360_1024_iow8.o
+obj-$(CONFIG_TARGET_MELE_A1000) += dram_sun4i_auto.o
obj-$(CONFIG_TARGET_MELE_M3) += dram_sun7i_384_1024_iow16.o
-obj-$(CONFIG_TARGET_MINI_X) += dram_sun4i_360_512.o
-obj-$(CONFIG_TARGET_MINI_X_1GB) += dram_sun4i_360_1024_iow16.o
+obj-$(CONFIG_TARGET_MINI_X) += dram_sun4i_auto.o
obj-$(CONFIG_TARGET_MSI_PRIMO73) += dram_sun7i_384_1024_iow16.o
obj-$(CONFIG_TARGET_PCDUINO) += dram_sun4i_408_1024_iow8.o
obj-$(CONFIG_TARGET_PCDUINO3) += dram_linksprite_pcduino3.o
diff --git a/board/sunxi/dram_cubieboard.c b/board/sunxi/dram_cubieboard.c
deleted file mode 100644
index 399028ca96..0000000000
--- a/board/sunxi/dram_cubieboard.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* 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,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_sun4i_360_1024_iow16.c b/board/sunxi/dram_sun4i_360_1024_iow16.c
deleted file mode 100644
index 376371330d..0000000000
--- a/board/sunxi/dram_sun4i_360_1024_iow16.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* this file is generated, don't edit it yourself */
-
-#include <common.h>
-#include <asm/arch/dram.h>
-
-static struct dram_para dram_para = {
- .clock = 360,
- .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,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_sun4i_360_512.c b/board/sunxi/dram_sun4i_360_512.c
deleted file mode 100644
index 48aa6e2d63..0000000000
--- a/board/sunxi/dram_sun4i_360_512.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* this file is generated, don't edit it yourself */
-
-#include <common.h>
-#include <asm/arch/dram.h>
-
-static struct dram_para dram_para = {
- .clock = 360,
- .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,
-};
-
-unsigned long sunxi_dram_init(void)
-{
- return dramc_init(&dram_para);
-}
diff --git a/board/sunxi/dram_sun4i_360_1024_iow8.c b/board/sunxi/dram_sun4i_auto.c
index 2a5c9edd91..826bacf94a 100644
--- a/board/sunxi/dram_sun4i_360_1024_iow8.c
+++ b/board/sunxi/dram_sun4i_auto.c
@@ -1,26 +1,24 @@
-/* this file is generated, don't edit it yourself */
-
#include <common.h>
#include <asm/arch/dram.h>
static struct dram_para dram_para = {
- .clock = 360,
+ .clock = CONFIG_DRAM_CLK,
.type = 3,
.rank_num = 1,
- .density = 2048,
- .io_width = 8,
- .bus_width = 32,
+ .density = 0,
+ .io_width = 0,
+ .bus_width = 0,
.cas = 6,
- .zq = 123,
+ .zq = CONFIG_DRAM_ZQ,
.odt_en = 0,
- .size = 1024,
+ .size = 0,
.tpr0 = 0x30926692,
.tpr1 = 0x1090,
.tpr2 = 0x1a0c8,
.tpr3 = 0,
.tpr4 = 0,
.tpr5 = 0,
- .emr1 = 0,
+ .emr1 = CONFIG_DRAM_EMR1,
.emr2 = 0,
.emr3 = 0,
};