提交 8ebe4f42 编写于 作者: C Chen-Yu Tsai 提交者: Hans de Goede

ARM: sunxi: Add basic A23 support

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: NChen-Yu Tsai <wens@csie.org>
Acked-by: NIan Campbell <ijc@hellion.org.uk>
上级 e637b30b
...@@ -456,6 +456,9 @@ config TARGET_SUN6I ...@@ -456,6 +456,9 @@ config TARGET_SUN6I
config TARGET_SUN7I config TARGET_SUN7I
bool "Support sun7i" bool "Support sun7i"
config TARGET_SUN8I
bool "Support sun8i"
config TARGET_SNOWBALL config TARGET_SNOWBALL
bool "Support snowball" bool "Support snowball"
......
...@@ -12,10 +12,12 @@ obj-y += board.o ...@@ -12,10 +12,12 @@ obj-y += board.o
obj-y += clock.o obj-y += clock.o
obj-y += pinmux.o obj-y += pinmux.o
obj-$(CONFIG_SUN6I) += prcm.o obj-$(CONFIG_SUN6I) += prcm.o
obj-$(CONFIG_SUN8I) += prcm.o
obj-$(CONFIG_SUN4I) += clock_sun4i.o obj-$(CONFIG_SUN4I) += clock_sun4i.o
obj-$(CONFIG_SUN5I) += clock_sun4i.o obj-$(CONFIG_SUN5I) += clock_sun4i.o
obj-$(CONFIG_SUN6I) += clock_sun6i.o obj-$(CONFIG_SUN6I) += clock_sun6i.o
obj-$(CONFIG_SUN7I) += clock_sun4i.o obj-$(CONFIG_SUN7I) += clock_sun4i.o
obj-$(CONFIG_SUN8I) += clock_sun6i.o
ifndef CONFIG_SPL_BUILD ifndef CONFIG_SPL_BUILD
obj-y += cpu_info.o obj-y += cpu_info.o
......
...@@ -110,7 +110,8 @@ void reset_cpu(ulong addr) ...@@ -110,7 +110,8 @@ void reset_cpu(ulong addr)
/* do some early init */ /* do some early init */
void s_init(void) 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 */ /* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */
asm volatile( asm volatile(
"mrc p15, 0, r0, c1, c0, 1\n" "mrc p15, 0, r0, c1, c0, 1\n"
......
...@@ -27,6 +27,8 @@ int print_cpuinfo(void) ...@@ -27,6 +27,8 @@ int print_cpuinfo(void)
puts("CPU: Allwinner A31 (SUN6I)\n"); puts("CPU: Allwinner A31 (SUN6I)\n");
#elif defined CONFIG_SUN7I #elif defined CONFIG_SUN7I
puts("CPU: Allwinner A20 (SUN7I)\n"); puts("CPU: Allwinner A20 (SUN7I)\n");
#elif defined CONFIG_SUN8I
puts("CPU: Allwinner A23 (SUN8I)\n");
#else #else
#warning Please update cpu_info.c with correct CPU information #warning Please update cpu_info.c with correct CPU information
puts("CPU: SUNXI Family\n"); puts("CPU: SUNXI Family\n");
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define CLK_GATE_CLOSE 0x0 #define CLK_GATE_CLOSE 0x0
/* clock control module regs definition */ /* clock control module regs definition */
#ifdef CONFIG_SUN6I #if defined(CONFIG_SUN6I) || defined(CONFIG_SUN8I)
#include <asm/arch/clock_sun6i.h> #include <asm/arch/clock_sun6i.h>
#else #else
#include <asm/arch/clock_sun4i.h> #include <asm/arch/clock_sun4i.h>
......
if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I || TARGET_SUN8I
config SYS_CONFIG_NAME config SYS_CONFIG_NAME
string string
...@@ -6,6 +6,7 @@ config SYS_CONFIG_NAME ...@@ -6,6 +6,7 @@ config SYS_CONFIG_NAME
default "sun5i" if TARGET_SUN5I default "sun5i" if TARGET_SUN5I
default "sun6i" if TARGET_SUN6I default "sun6i" if TARGET_SUN6I
default "sun7i" if TARGET_SUN7I default "sun7i" if TARGET_SUN7I
default "sun8i" if TARGET_SUN8I
config SYS_CPU config SYS_CPU
default "armv7" default "armv7"
......
/*
* (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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册