From: Maxime Ripard <[email protected]> Add a new sun6i machine that doesn't do much for now.
Signed-off-by: Maxime Ripard <[email protected]> Signed-off-by: Hans de Goede <[email protected]> --- arch/arm/cpu/armv7/sunxi/board.c | 2 +- arch/arm/cpu/armv7/sunxi/cpu_info.c | 2 ++ boards.cfg | 1 + include/configs/sun6i.h | 43 +++++++++++++++++++++++++++++++++++++ include/configs/sunxi-common.h | 2 ++ 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 include/configs/sun6i.h diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c index 9b3d5a2..50fcc06 100644 --- a/arch/arm/cpu/armv7/sunxi/board.c +++ b/arch/arm/cpu/armv7/sunxi/board.c @@ -86,7 +86,7 @@ void reset_cpu(ulong addr) /* do some early init */ void s_init(void) { -#if !defined CONFIG_SPL_BUILD && defined CONFIG_SUN7I +#if !defined CONFIG_SPL_BUILD && (defined CONFIG_SUN7I || defined CONFIG_SUN6I) /* Enable SMP mode for CPU0, by setting bit 6 of Auxiliary Ctl reg */ asm volatile( "mrc p15, 0, r0, c1, c0, 1\n" diff --git a/arch/arm/cpu/armv7/sunxi/cpu_info.c b/arch/arm/cpu/armv7/sunxi/cpu_info.c index a388a53..f8a2efd 100644 --- a/arch/arm/cpu/armv7/sunxi/cpu_info.c +++ b/arch/arm/cpu/armv7/sunxi/cpu_info.c @@ -18,6 +18,8 @@ int print_cpuinfo(void) #elif defined CONFIG_SUN5I /* TODO: Distinguish A13/A10s */ puts("CPU: Allwinner A13/A10s (SUN5I)\n"); +#elif defined CONFIG_SUN6I + puts("CPU: Allwinner A31 (SUN6I)\n"); #elif defined CONFIG_SUN7I puts("CPU: Allwinner A20 (SUN7I)\n"); #else diff --git a/boards.cfg b/boards.cfg index f1a5d07..2beb4bb 100644 --- a/boards.cfg +++ b/boards.cfg @@ -386,6 +386,7 @@ Active arm armv7 sunxi - sunxi Active arm armv7 sunxi - sunxi Coby_MID9742 sun4i:COBY_MID9742,SPL - Active arm armv7 sunxi - sunxi Iteaduino_Plus_A10 sun4i:ITEADA10,SPL,SUNXI_EMAC,STATUSLED=244,STATUSLED1=245 - Active arm armv7 sunxi - sunxi Iteaduino_Plus_A20 sun7i:ITEADA20,SPL,SUNXI_EMAC,STATUSLED=244,STATUSLED1=245 - +Active arm armv7 sunxi - sunxi Colombus sun6i:COLOMBUS - Active arm armv7 sunxi - sunxi Cubieboard sun4i:CUBIEBOARD,SPL,SUNXI_EMAC,STATUSLED=244,STATUSLED1=245 - Active arm armv7 sunxi - sunxi Cubieboard2 sun7i:CUBIEBOARD2,SPL,SUNXI_GMAC,STATUSLED=244,STATUSLED1=245,FAST_MBUS - Active arm armv7 sunxi - sunxi Cubieboard2_FEL sun7i:CUBIEBOARD2,SPL_FEL,SUNXI_GMAC,STATUSLED=244,STATUSLED1=245,FAST_MBUS - diff --git a/include/configs/sun6i.h b/include/configs/sun6i.h new file mode 100644 index 0000000..543b39a --- /dev/null +++ b/include/configs/sun6i.h @@ -0,0 +1,43 @@ +/* + * (C) Copyright 2012-2013 Henrik Nordstrom <[email protected]> + * (C) Copyright 2013 Luke Kenneth Casson Leighton <[email protected]> + * (C) Copyright 2013 Maxime Ripard <[email protected]> + * + * Configuration settings for the Allwinner A31 (sun6i) CPU + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* + * A31 specific configuration + */ +#define CONFIG_SUN6I /* sun6i SoC generation */ + +#define CONFIG_SYS_PROMPT "sun6i# " +#define CONFIG_MACH_TYPE 3892 + +/* + * Include common sunxi configuration where most the settings are + */ +#include <configs/sunxi-common.h> + +#endif /* __CONFIG_H */ diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 212b621..dd7c668 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -81,6 +81,7 @@ /* mmc config */ /* Can't use MMC slot 0 if the UART is directed there */ +#ifndef CONFIG_SUN6I #if !defined CONFIG_UART0_PORT_F || CONFIG_MMC_SUNXI_SLOT != 0 #define CONFIG_MMC #define CONFIG_GENERIC_MMC @@ -93,6 +94,7 @@ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 /* first detected MMC controller */ #endif +#endif /* 4MB of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (4 << 20)) -- 1.9.0 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
