[U-Boot] [PATCH] sunxi: makes an invisible option for H3-like DRAM controllers
Jagan Teki
jagan at openedev.com
Wed Mar 1 10:24:16 UTC 2017
On Tue, Feb 14, 2017 at 7:19 PM, Icenowy Zheng <icenowy at aosc.xyz> wrote:
> 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 at aosc.xyz>
> Acked-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> ---
> arch/arm/include/asm/arch-sunxi/dram.h | 4 ++--
> .../include/asm/arch-sunxi/{dram_sun8i_h3.h => dram_sunxi_dw.h} | 0
> arch/arm/mach-sunxi/Makefile | 2 +-
> arch/arm/mach-sunxi/{dram_sun8i_h3.c => dram_sunxi_dw.c} | 0
> board/sunxi/Kconfig | 9 +++++++++
> 5 files changed, 12 insertions(+), 3 deletions(-)
> rename arch/arm/include/asm/arch-sunxi/{dram_sun8i_h3.h => dram_sunxi_dw.h} (100%)
> rename arch/arm/mach-sunxi/{dram_sun8i_h3.c => dram_sunxi_dw.c} (100%)
>
> diff --git a/arch/arm/include/asm/arch-sunxi/dram.h b/arch/arm/include/asm/arch-sunxi/dram.h
> index 53e6d471d2..6f0131ab16 100644
> --- a/arch/arm/include/asm/arch-sunxi/dram.h
> +++ b/arch/arm/include/asm/arch-sunxi/dram.h
> @@ -24,8 +24,8 @@
> #include <asm/arch/dram_sun8i_a33.h>
> #elif defined(CONFIG_MACH_SUN8I_A83T)
> #include <asm/arch/dram_sun8i_a83t.h>
> -#elif defined(CONFIG_MACH_SUN8I_H3) || defined(CONFIG_MACH_SUN50I)
> -#include <asm/arch/dram_sun8i_h3.h>
> +#elif defined(CONFIG_SUNXI_DW_DRAM)
> +#include <asm/arch/dram_sunxi_dw.h>
> #elif defined(CONFIG_MACH_SUN9I)
> #include <asm/arch/dram_sun9i.h>
> #else
> diff --git a/arch/arm/include/asm/arch-sunxi/dram_sun8i_h3.h b/arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h
> similarity index 100%
> rename from arch/arm/include/asm/arch-sunxi/dram_sun8i_h3.h
> rename to arch/arm/include/asm/arch-sunxi/dram_sunxi_dw.h
> diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile
> index 7daba1169c..25d896a14e 100644
> --- a/arch/arm/mach-sunxi/Makefile
> +++ b/arch/arm/mach-sunxi/Makefile
> @@ -48,7 +48,7 @@ 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_SUN8I_H3) += dram_sun8i_h3.o
> +obj-$(CONFIG_SUNXI_DW_DRAM) += dram_sunxi_dw.o
> obj-$(CONFIG_MACH_SUN9I) += dram_sun9i.o
> obj-$(CONFIG_MACH_SUN50I) += dram_sun8i_h3.o
> endif
> diff --git a/arch/arm/mach-sunxi/dram_sun8i_h3.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c
> similarity index 100%
> rename from arch/arm/mach-sunxi/dram_sun8i_h3.c
> rename to arch/arm/mach-sunxi/dram_sunxi_dw.c
> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> index 018bdd12dd..d09ae6067e 100644
> --- a/board/sunxi/Kconfig
> +++ b/board/sunxi/Kconfig
> @@ -42,6 +42,13 @@ config SUNXI_GEN_SUN6I
> separate ahb reset control registers, custom pmic bus, new style
> watchdog, etc.
>
> +config SUNXI_DW_DRAM
I prefer SUNXI_DRAM_DW since config start with SUNXI which is OS and
DRAM which is peripheral and DW from the vendor, this notation quite
relevant if there is any new DRAM the tail should be changed.
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
More information about the U-Boot
mailing list