]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM: sunxi: Add basic A23 support
authorChen-Yu Tsai <wens@csie.org>
Wed, 22 Oct 2014 08:47:44 +0000 (16:47 +0800)
committerHans de Goede <hdegoede@redhat.com>
Fri, 24 Oct 2014 07:35:39 +0000 (09:35 +0200)
The basic blocks of the A23 are similar to the A31 (sun6i). Re-use
sun6i code for initial clock, gpio, and uart setup.

There is no SPL support for A23, as we do not have any documentation
or sample code for DRAM initialization.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
arch/arm/Kconfig
arch/arm/cpu/armv7/sunxi/Makefile
arch/arm/cpu/armv7/sunxi/board.c
arch/arm/cpu/armv7/sunxi/cpu_info.c
arch/arm/include/asm/arch-sunxi/clock.h
board/sunxi/Kconfig
include/configs/sun8i.h [new file with mode: 0644]

index 4317b69e361ed80c0ac1511715efe4901d1d1442..8f910f39a37ec5350d094070fdfdd6a2986519b8 100644 (file)
@@ -456,6 +456,9 @@ config TARGET_SUN6I
 config TARGET_SUN7I
        bool "Support sun7i"
 
+config TARGET_SUN8I
+       bool "Support sun8i"
+
 config TARGET_SNOWBALL
        bool "Support snowball"
 
index 2a42dcaaa20d1ab4913b0d1550bbc4b087aa76b3..24f1daee64766d1631122a65dcb13dcb88dbc8ea 100644 (file)
@@ -12,10 +12,12 @@ obj-y       += board.o
 obj-y  += clock.o
 obj-y  += pinmux.o
 obj-$(CONFIG_SUN6I)    += prcm.o
+obj-$(CONFIG_SUN8I)    += prcm.o
 obj-$(CONFIG_SUN4I)    += clock_sun4i.o
 obj-$(CONFIG_SUN5I)    += clock_sun4i.o
 obj-$(CONFIG_SUN6I)    += clock_sun6i.o
 obj-$(CONFIG_SUN7I)    += clock_sun4i.o
+obj-$(CONFIG_SUN8I)    += clock_sun6i.o
 
 ifndef CONFIG_SPL_BUILD
 obj-y  += cpu_info.o
index 7d10f10fd8da9ddb7ae9ce04074191e92c533cb3..134a19874e49769d2c341409e94683968ff39f36 100644 (file)
@@ -110,7 +110,8 @@ void reset_cpu(ulong addr)
 /* do some early init */
 void s_init(void)
 {
-#if !defined CONFIG_SPL_BUILD && (defined CONFIG_SUN7I || defined CONFIG_SUN6I)
+#if !defined CONFIG_SPL_BUILD && (defined CONFIG_SUN7I || \
+               defined CONFIG_SUN6I || defined CONFIG_SUN8I)
        /* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */
        asm volatile(
                "mrc p15, 0, r0, c1, c0, 1\n"
index 40c4e1347c272878e0ca22b7864d66695e53307f..4f2a09cd2e28cbd69a498bab61c06341f4235473 100644 (file)
@@ -27,6 +27,8 @@ int print_cpuinfo(void)
        puts("CPU:   Allwinner A31 (SUN6I)\n");
 #elif defined CONFIG_SUN7I
        puts("CPU:   Allwinner A20 (SUN7I)\n");
+#elif defined CONFIG_SUN8I
+       puts("CPU:   Allwinner A23 (SUN8I)\n");
 #else
 #warning Please update cpu_info.c with correct CPU information
        puts("CPU:   SUNXI Family\n");
index 8f5d86025b31e6facefcc63c6e9caf2033164dd9..012c2af72e396bbb328b26fc20c5c8ed3b48b597 100644 (file)
@@ -15,7 +15,7 @@
 #define CLK_GATE_CLOSE                 0x0
 
 /* clock control module regs definition */
-#ifdef CONFIG_SUN6I
+#if defined(CONFIG_SUN6I) || defined(CONFIG_SUN8I)
 #include <asm/arch/clock_sun6i.h>
 #else
 #include <asm/arch/clock_sun4i.h>
index 9892a34cfbbaac0a1a89bd75fb95b30d451c5a7e..449c0460f996d639901fe859caeb1683764f1a4e 100644 (file)
@@ -1,4 +1,4 @@
-if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
+if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I || TARGET_SUN8I
 
 config SYS_CONFIG_NAME
        string
@@ -6,6 +6,7 @@ config SYS_CONFIG_NAME
        default "sun5i" if TARGET_SUN5I
        default "sun6i" if TARGET_SUN6I
        default "sun7i" if TARGET_SUN7I
+       default "sun8i" if TARGET_SUN8I
 
 config SYS_CPU
        default "armv7"
diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
new file mode 100644 (file)
index 0000000..1c1a7cd
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * (C) Copyright 2014 Chen-Yu Tsai <wens@csie.org>
+ *
+ * Configuration settings for the Allwinner A23 (sun8i) CPU
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * A23 specific configuration
+ */
+#define CONFIG_SUN8I           /* sun8i SoC generation */
+#define CONFIG_SYS_PROMPT      "sun8i# "
+
+/*
+ * Include common sunxi configuration where most the settings are
+ */
+#include <configs/sunxi-common.h>
+
+#endif /* __CONFIG_H */