diff mbox

[U-Boot,7/7] ARM: sunxi: Add basic A31 support

Message ID 1410182892-18647-8-git-send-email-wens@csie.org
State Superseded
Delegated to: Ian Campbell
Headers show

Commit Message

Chen-Yu Tsai Sept. 8, 2014, 1:28 p.m. UTC
From: Maxime Ripard <maxime.ripard@free-electrons.com>

Add a new sun6i machine that doesn't do much for now.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[wens@csie.org: use SPDX labels, adapt to Kconfig system, drop ifdef
		around mmc and smp code, drop MACH_TYPE]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/Kconfig                    |  3 +++
 arch/arm/cpu/armv7/sunxi/cpu_info.c |  2 ++
 board/sunxi/Kconfig                 | 10 +++++++++-
 configs/Colombus_defconfig          |  4 ++++
 include/configs/sun6i.h             | 26 ++++++++++++++++++++++++++
 5 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 configs/Colombus_defconfig
 create mode 100644 include/configs/sun6i.h

Comments

Ian Campbell Sept. 21, 2014, 6:51 p.m. UTC | #1
On Mon, 2014-09-08 at 21:28 +0800, Chen-Yu Tsai wrote:
> From: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> Add a new sun6i machine that doesn't do much for now.

Can you briefly outline here what it _does_ do, please.

The actual code looks ok to me. There is some possibility we might
consolidate some of these Kconfig options, or at least move them to the
sunxi Kconfig. We can cross the bridge when we come to it though.

Any links to some info about the Colombus? Is it the WITS development
kit which google found for me?

Ian.
Maxime Ripard Sept. 21, 2014, 7:01 p.m. UTC | #2
Hi Ian,

On Sun, Sep 21, 2014 at 07:51:17PM +0100, Ian Campbell wrote:
> On Mon, 2014-09-08 at 21:28 +0800, Chen-Yu Tsai wrote:
> > From: Maxime Ripard <maxime.ripard@free-electrons.com>
> > 
> > Add a new sun6i machine that doesn't do much for now.
> 
> Can you briefly outline here what it _does_ do, please.

When I contributed this patch, it was only having the UART support,
but judging from the rest of the patches Chen-Yu sent, I guess it does
a bit more than that now, especially MMC.

> The actual code looks ok to me. There is some possibility we might
> consolidate some of these Kconfig options, or at least move them to the
> sunxi Kconfig. We can cross the bridge when we come to it though.
> 
> Any links to some info about the Colombus? Is it the WITS development
> kit which google found for me?

It is.

Maxime
Chen-Yu Tsai Sept. 22, 2014, 1:30 p.m. UTC | #3
On Mon, Sep 22, 2014 at 3:01 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi Ian,
>
> On Sun, Sep 21, 2014 at 07:51:17PM +0100, Ian Campbell wrote:
>> On Mon, 2014-09-08 at 21:28 +0800, Chen-Yu Tsai wrote:
>> > From: Maxime Ripard <maxime.ripard@free-electrons.com>
>> >
>> > Add a new sun6i machine that doesn't do much for now.
>>
>> Can you briefly outline here what it _does_ do, please.
>
> When I contributed this patch, it was only having the UART support,
> but judging from the rest of the patches Chen-Yu sent, I guess it does
> a bit more than that now, especially MMC.

Yeah. I'll rewrite the commit message.

>> The actual code looks ok to me. There is some possibility we might
>> consolidate some of these Kconfig options, or at least move them to the
>> sunxi Kconfig. We can cross the bridge when we come to it though.
>>
>> Any links to some info about the Colombus? Is it the WITS development
>> kit which google found for me?
>
> It is.

I'll split out the Colombus defconfig into a separate patch, like we
split machine support and board files for the kernel.


ChenYu
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 22f0f09..bfbe6f1 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -439,6 +439,9 @@  config TARGET_SUN4I
 config TARGET_SUN5I
 	bool "Support sun5i"
 
+config TARGET_SUN6I
+	bool "Support sun6i"
+
 config TARGET_SUN7I
 	bool "Support sun7i"
 
diff --git a/arch/arm/cpu/armv7/sunxi/cpu_info.c b/arch/arm/cpu/armv7/sunxi/cpu_info.c
index 5cf35ac..40c4e13 100644
--- a/arch/arm/cpu/armv7/sunxi/cpu_info.c
+++ b/arch/arm/cpu/armv7/sunxi/cpu_info.c
@@ -23,6 +23,8 @@  int print_cpuinfo(void)
 	case 7: puts("CPU:   Allwinner A10s (SUN5I)\n"); break;
 	default: puts("CPU:   Allwinner A1X (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/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 7bdf958..c78750e 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -14,6 +14,14 @@  config SYS_CONFIG_NAME
 
 endif
 
+if TARGET_SUN6I
+
+config SYS_CONFIG_NAME
+	string
+	default "sun6i"
+
+endif
+
 if TARGET_SUN7I
 
 config SYS_CONFIG_NAME
@@ -22,7 +30,7 @@  config SYS_CONFIG_NAME
 
 endif
 
-if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN7I
+if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
 
 config SYS_CPU
 	string
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
new file mode 100644
index 0000000..16800de
--- /dev/null
+++ b/configs/Colombus_defconfig
@@ -0,0 +1,4 @@ 
+CONFIG_SYS_EXTRA_OPTIONS="COLOMBUS"
+CONFIG_ARM=y
+CONFIG_TARGET_SUN6I=y
+CONFIG_FDTFILE="sun6i-a31-colombus.dtb"
diff --git a/include/configs/sun6i.h b/include/configs/sun6i.h
new file mode 100644
index 0000000..93a1d96
--- /dev/null
+++ b/include/configs/sun6i.h
@@ -0,0 +1,26 @@ 
+/*
+ * (C) Copyright 2012-2013 Henrik Nordstrom <henrik@henriknordstrom.net>
+ * (C) Copyright 2013 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+ * (C) Copyright 2013 Maxime Ripard <maxime.ripard@free-electrons.com>
+ *
+ * Configuration settings for the Allwinner A31 (sun6i) CPU
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * A31 specific configuration
+ */
+#define CONFIG_SUN6I		/* sun6i SoC generation */
+
+#define CONFIG_SYS_PROMPT		"sun6i# "
+
+/*
+ * Include common sunxi configuration where most the settings are
+ */
+#include <configs/sunxi-common.h>
+
+#endif /* __CONFIG_H */