[U-Boot] [PATCH v4 4/9] sunxi: add sun7i cpu, board and start of day support

Marc Zyngier maz at misterjones.org
Fri May 2 11:45:33 CEST 2014


Hi Ian,

On 2014-05-01 19:40, Ian Campbell wrote:
> This patch adds generic board, start of day and basic build system
> support for
> the Allwinner A20 (sun7i) processor. This code will not been compiled
> until the
> build is hooked up in a later patch. It has been split out to keep
> the patches
> manageable.
>
> Signed-off-by: Adam Sampson <ats at offog.org>
> Signed-off-by: Aleksei Mamlin <mamlinav at gmail.com>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
> Signed-off-by: Chen-Yu Tsai <wens at csie.org>
> Signed-off-by: Emilio López <emilio at elopez.com.ar>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> Signed-off-by: Henrik Nordstrom <henrik at henriknordstrom.net>
> Signed-off-by: Jens Kuske <jenskuske at gmail.com>
> Signed-off-by: Luc Verhaegen <libv at skynet.be>
> Signed-off-by: Luke Leighton <lkcl at lkcl.net>
> Signed-off-by: Oliver Schinagl <oliver at schinagl.nl>
> Signed-off-by: Patrick Wood <patrickhwood at gmail.com>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Signed-off-by: Wills Wang <wills.wang.open at gmail.com>
> Signed-off-by: Ian Campbell <ijc at hellion.org.uk>
> Cc: Tom Cubie <Mr.hipboi at gmail.com>
> ---
> v4: Based on d9fe0a1e061e "sunxi: mksunxiboot: remove unnecessary 
> casts."
>
> v3: Based on c89867dca2e9 "sunxi: clocks: clock_get_pll5
> prototype and coding style".
>
> v2: Based on u-boot-sunxi.git#sunxi d9aa5dd3d15c "sunxi: mmc:
> checkpatch whitespace fixes" with v2014.04-rc2 merged in:
>   - just init dram once
>   - remove clock ramping until power control is implemented
>   - add CONFIG_SUN7I to simplify future SUN?I support.
>   - fix a typo
>
> v1: Based on u-boot-sunxi.git#sunxi commit d854c4de2f57 "arm: Handle
> .gnu.hash
> section in ldscripts" vs v2014.01.
> ---
>  arch/arm/cpu/armv7/Makefile                 |   2 +-
>  arch/arm/cpu/armv7/sunxi/Makefile           |  11 +++
>  arch/arm/cpu/armv7/sunxi/board.c            |  88 +++++++++++++++++
>  arch/arm/cpu/armv7/sunxi/cpu_info.c         |  19 ++++
>  arch/arm/cpu/armv7/sunxi/start.c            |   1 +
>  arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds |  77 +++++++++++++++
>  arch/arm/include/asm/arch-sunxi/cpu.h       | 122 
> ++++++++++++++++++++++++
>  arch/arm/include/asm/arch-sunxi/spl.h       |  20 ++++
>  board/sunxi/Makefile                        |  11 +++
>  board/sunxi/board.c                         |  57 +++++++++++
>  include/configs/sun7i.h                     |  24 +++++
>  include/configs/sunxi-common.h              | 141
> ++++++++++++++++++++++++++++
>  12 files changed, 572 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/cpu/armv7/sunxi/board.c
>  create mode 100644 arch/arm/cpu/armv7/sunxi/cpu_info.c
>  create mode 100644 arch/arm/cpu/armv7/sunxi/start.c
>  create mode 100644 arch/arm/cpu/armv7/sunxi/u-boot-spl-fel.lds
>  create mode 100644 arch/arm/include/asm/arch-sunxi/cpu.h
>  create mode 100644 arch/arm/include/asm/arch-sunxi/spl.h
>  create mode 100644 board/sunxi/Makefile
>  create mode 100644 board/sunxi/board.c
>  create mode 100644 include/configs/sun7i.h
>  create mode 100644 include/configs/sunxi-common.h

[...]

> diff --git a/arch/arm/include/asm/arch-sunxi/cpu.h
> b/arch/arm/include/asm/arch-sunxi/cpu.h
> new file mode 100644
> index 0000000..7400559
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-sunxi/cpu.h
> @@ -0,0 +1,122 @@
> +/*
> + * (C) Copyright 2007-2011
> + * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
> + * Tom Cubie <tangliang at allwinnertech.com>
> + *
> + * SPDX-License-Identifier:	GPL-2.0+
> + */
> +
> +#ifndef _SUNXI_CPU_H
> +#define _SUNXI_CPU_H
> +
> +#define SUNXI_SRAM_A1_BASE		0x00000000
> +#define SUNXI_SRAM_A1_SIZE		(16 * 1024)	/* 16 kiB */
> +
> +#define SUNXI_SRAM_A2_BASE		0x00004000	/* 16 kiB */
> +#define SUNXI_SRAM_A3_BASE		0x00008000	/* 13 kiB */
> +#define SUNXI_SRAM_A4_BASE		0x0000b400	/* 3 kiB */
> +#define SUNXI_SRAM_D_BASE		0x01c00000
> +#define SUNXI_SRAM_B_BASE		0x01c00000	/* 64 kiB (secure) */

Can we please fix these last two values which are obviously wrong (at 
least on sun7i, they point to the SRAM controller address, as shown in 
the documentation on page 18).

I've been carrying a patch for this in my tree:
http://git.kernel.org/cgit/linux/kernel/git/maz/u-boot.git/commit/?h=wip/psci-v4-a20&id=e8cea4226fdbf7718f0b888b32f24d2803b168c6

Can you squash it into your next version?

Thanks,

         M.
-- 
Who you jivin' with that Cosmik Debris?


More information about the U-Boot mailing list