]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: makes an invisible option for H3-like DRAM controllers
authorIcenowy Zheng <icenowy@aosc.xyz>
Sat, 3 Jun 2017 09:10:14 +0000 (17:10 +0800)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 8 Jun 2017 17:07:55 +0000 (22:37 +0530)
Allwinner SoCs after H3 (e.g. A64, H5, R40, V3s) uses a H3-like
DesignWare DRAM controller, which do not have official free DRAM
initialization code, but can use modified dram_sun8i_h3.c.

Add a invisible option for easier DRAM initialization code reuse.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/include/asm/arch-sunxi/dram.h
arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h [moved from arch/arm/include/asm/arch-sunxi/dram_sun8i_h3.h with 100% similarity]
arch/arm/mach-sunxi/Kconfig
arch/arm/mach-sunxi/Makefile
arch/arm/mach-sunxi/dram_sunxi_dw.c [moved from arch/arm/mach-sunxi/dram_sun8i_h3.c with 100% similarity]

index f452f889f928624cfe99a2e101ec4ba29d7bfbbf..80abac95b8e13e4ab6b1802a3b05f0b5bcd81a38 100644 (file)
 #include <asm/arch/dram_sun8i_a33.h>
 #elif defined(CONFIG_MACH_SUN8I_A83T)
 #include <asm/arch/dram_sun8i_a83t.h>
-#elif defined(CONFIG_MACH_SUNXI_H3_H5) || \
-      defined(CONFIG_MACH_SUN8I_R40) || \
-      defined(CONFIG_MACH_SUN50I)
-#include <asm/arch/dram_sun8i_h3.h>
+#elif defined(CONFIG_SUNXI_DRAM_DW)
+#include <asm/arch/dram_sunxi_dw.h>
 #elif defined(CONFIG_MACH_SUN9I)
 #include <asm/arch/dram_sun9i.h>
 #else
index 7ced838d6a7027cc48371760dd3f021dd1ea96a0..11da1ab738c9929eb65b8599b3fa624d87cc825f 100644 (file)
@@ -29,11 +29,19 @@ config SUNXI_GEN_SUN6I
        separate ahb reset control registers, custom pmic bus, new style
        watchdog, etc.
 
+config SUNXI_DRAM_DW
+       bool
+       ---help---
+       Select this for sunxi SoCs which uses a DRAM controller like the
+       DesignWare controller used in H3, mainly SoCs after H3, which do
+       not have official open-source DRAM initialization code, but can
+       use modified H3 DRAM initialization code.
 
 config MACH_SUNXI_H3_H5
        bool
        select DM_I2C
        select SUNXI_DE2
+       select SUNXI_DRAM_DW
        select SUNXI_GEN_SUN6I
        select SUPPORT_SPL
 
@@ -118,6 +126,7 @@ config MACH_SUN8I_R40
        select ARCH_SUPPORT_PSCI
        select SUNXI_GEN_SUN6I
        select SUPPORT_SPL
+       select SUNXI_DRAM_DW
 
 config MACH_SUN8I_V3S
        bool "sun8i (Allwinner V3s)"
@@ -143,6 +152,7 @@ config MACH_SUN50I
        select SUNXI_GEN_SUN6I
        select SUNXI_HIGH_SRAM
        select SUPPORT_SPL
+       select SUNXI_DRAM_DW
        select FIT
        select SPL_LOAD_FIT
 
index 5510aa54353f5653ed803a2d6cf00f9099ec59dd..41cee267655f870622dce2a1d40d9df0c8134885 100644 (file)
@@ -48,8 +48,6 @@ obj-$(CONFIG_MACH_SUN7I)      += dram_sun4i.o
 obj-$(CONFIG_MACH_SUN8I_A23)   += dram_sun8i_a23.o
 obj-$(CONFIG_MACH_SUN8I_A33)   += dram_sun8i_a33.o
 obj-$(CONFIG_MACH_SUN8I_A83T)  += dram_sun8i_a83t.o
-obj-$(CONFIG_MACH_SUNXI_H3_H5) += dram_sun8i_h3.o
-obj-$(CONFIG_MACH_SUN8I_R40)   += dram_sun8i_h3.o
+obj-$(CONFIG_SUNXI_DRAM_DW)    += dram_sunxi_dw.o
 obj-$(CONFIG_MACH_SUN9I)       += dram_sun9i.o
-obj-$(CONFIG_MACH_SUN50I)      += dram_sun8i_h3.o
 endif