public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/9] ARM: sunxi: Add basic A23 support
Date: Sun, 12 Oct 2014 10:33:52 +0100	[thread overview]
Message-ID: <1413106432.11505.57.camel@hellion.org.uk> (raw)
In-Reply-To: <CAGb2v6578zekkYyAjjBrxcNwf0MBq1Atn_+S0AHOEN0H9mtQqQ@mail.gmail.com>

On Sun, 2014-10-12 at 10:43 +0800, Chen-Yu Tsai wrote:
> On Sat, Oct 11, 2014 at 11:58 PM, Ian Campbell <ijc@hellion.org.uk> wrote:
> > On Tue, 2014-10-07 at 15:11 +0800, Chen-Yu Tsai wrote:
> >> The basic blocks of the A23 are similar to the A31 (sun6i). Re-use
> >> sun6i code for initial clock, gpio, and uart setup.
> >
> > Do I take it that sun8i is also in the same position wrt DRAM bring up
> > code not existing yet and there therefore being no SPL yet?
> 
> That is correct.

Please could you add a sentence to the commit message.

Apart from that: Acked-by: Ian Campbell <ijc@hellion.org.uk>

> 
> >> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> >> ---
> >>  arch/arm/Kconfig                        |  3 +++
> >>  arch/arm/cpu/armv7/sunxi/Makefile       |  2 ++
> >>  arch/arm/cpu/armv7/sunxi/board.c        |  3 ++-
> >>  arch/arm/cpu/armv7/sunxi/cpu_info.c     |  2 ++
> >>  arch/arm/include/asm/arch-sunxi/clock.h |  2 +-
> >>  board/sunxi/Kconfig                     |  9 ++++++++-
> >>  include/configs/sun8i.h                 | 23 +++++++++++++++++++++++
> >>  7 files changed, 41 insertions(+), 3 deletions(-)
> >>  create mode 100644 include/configs/sun8i.h
> >>
> >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> >> index e3e7e78..cb691b2 100644
> >> --- a/arch/arm/Kconfig
> >> +++ b/arch/arm/Kconfig
> >> @@ -450,6 +450,9 @@ config TARGET_SUN6I
> >>  config TARGET_SUN7I
> >>       bool "Support sun7i"
> >>
> >> +config TARGET_SUN8I
> >> +     bool "Support sun8i"
> >> +
> >>  config TARGET_SNOWBALL
> >>       bool "Support snowball"
> >>
> >> diff --git a/arch/arm/cpu/armv7/sunxi/Makefile b/arch/arm/cpu/armv7/sunxi/Makefile
> >> index 2a42dca..24f1dae 100644
> >> --- a/arch/arm/cpu/armv7/sunxi/Makefile
> >> +++ b/arch/arm/cpu/armv7/sunxi/Makefile
> >> @@ -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
> >> diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
> >> index 29d45b6..61c1ba9 100644
> >> --- a/arch/arm/cpu/armv7/sunxi/board.c
> >> +++ b/arch/arm/cpu/armv7/sunxi/board.c
> >> @@ -100,7 +100,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)
> >
> > At some point we should refactor this to use a common Kconfig thing
> > (SUNXI_SMP etc) which the relevant targets select.
> 
> I agree. We can do this as we move further to Kconfig.
> 
> ChenYu
> 
> >>       /* 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 40c4e13..4f2a09c 100644
> >> --- a/arch/arm/cpu/armv7/sunxi/cpu_info.c
> >> +++ b/arch/arm/cpu/armv7/sunxi/cpu_info.c
> >> @@ -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");
> >> diff --git a/arch/arm/include/asm/arch-sunxi/clock.h b/arch/arm/include/asm/arch-sunxi/clock.h
> >> index 8f5d860..012c2af 100644
> >> --- a/arch/arm/include/asm/arch-sunxi/clock.h
> >> +++ b/arch/arm/include/asm/arch-sunxi/clock.h
> >> @@ -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>
> >> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> >> index 05defac..16f6db4 100644
> >> --- a/board/sunxi/Kconfig
> >> +++ b/board/sunxi/Kconfig
> >> @@ -27,7 +27,14 @@ config SYS_CONFIG_NAME
> >>
> >>  endif
> >>
> >> -if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I
> >> +if TARGET_SUN8I
> >> +
> >> +config SYS_CONFIG_NAME
> >> +     default "sun8i"
> >> +
> >> +endif
> >> +
> >> +if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN6I || TARGET_SUN7I || TARGET_SUN8I
> >>
> >>  config SYS_CPU
> >>       default "armv7"
> >> diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
> >> new file mode 100644
> >> index 0000000..1c1a7cd
> >> --- /dev/null
> >> +++ b/include/configs/sun8i.h
> >> @@ -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 */
> >
> >
> 

  reply	other threads:[~2014-10-12  9:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07  7:11 [U-Boot] [PATCH 0/9] ARM: sunxi: Add Allwinner A23 (sun8i) support Chen-Yu Tsai
2014-10-07  7:11 ` [U-Boot] [PATCH 1/9] ARM: sunxi: Fix build break when CONFIG_MMC is not defined Chen-Yu Tsai
2014-10-11 15:50   ` Ian Campbell
2014-10-12  8:58     ` Hans de Goede
2014-10-07  7:11 ` [U-Boot] [PATCH 2/9] ARM: sunxi: Add sun8i (A23) UART0 pin mux support Chen-Yu Tsai
2014-10-11 15:51   ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 3/9] ARM: sunxi: Add support for uart0 on port F (mmc0) Chen-Yu Tsai
2014-10-11 15:53   ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 4/9] mmc: sunxi: Add support for sun8i (A23) Chen-Yu Tsai
2014-10-11 15:54   ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 5/9] ARM: sunxi: Add basic A23 support Chen-Yu Tsai
2014-10-11 15:58   ` Ian Campbell
2014-10-12  2:43     ` Chen-Yu Tsai
2014-10-12  9:33       ` Ian Campbell [this message]
2014-10-07  7:11 ` [U-Boot] [PATCH 6/9] ARM: sunxi: Add support for R_PIO gpio banks Chen-Yu Tsai
2014-10-11 16:05   ` Ian Campbell
2014-10-12  8:23     ` Chen-Yu Tsai
2014-10-12  9:34       ` Ian Campbell
2014-10-13 12:57       ` Maxime Ripard
2014-10-17 14:48         ` [U-Boot] [linux-sunxi] " Chen-Yu Tsai
2014-10-21 18:55           ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 7/9] ARM: sunxi: Allow specifying module in prcm apb0 init function Chen-Yu Tsai
2014-10-11 16:11   ` Ian Campbell
2014-10-11 16:13     ` Ian Campbell
2014-10-12  8:15       ` Chen-Yu Tsai
2014-10-07  7:11 ` [U-Boot] [PATCH 8/9] ARM: sunxi: Add support for using R_UART as console Chen-Yu Tsai
2014-10-11 16:15   ` Ian Campbell
2014-10-07  7:11 ` [U-Boot] [PATCH 9/9] ARM: sunxi: Add Ippo-q8h-v5 A23 tablet board defconfig Chen-Yu Tsai
2014-10-11 16:17   ` Ian Campbell
2014-10-12  8:13     ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413106432.11505.57.camel@hellion.org.uk \
    --to=ijc@hellion.org.uk \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox