From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] [PATCH 01/13] sunxi: change SUNXI_HIGH_SRAM option to SUNXI_SRAM_ADDRESS
Date: Tue, 26 Jun 2018 11:34:30 +0100 [thread overview]
Message-ID: <8d346aae-f067-da71-994e-e39c8eac4cf6@arm.com> (raw)
In-Reply-To: <20180625103723.24760-2-icenowy@aosc.io>
(resend from proper address)
Hi,
On 25/06/18 11:37, Icenowy Zheng wrote:
> The new Allwinner H6 SoC has its SRAM A1 at neither 0x0 nor 0x10000, but
> it's at 0x20000. Thus the SUNXI_HIGH_SRAM option needs to be refactored
> to support this new configuration.
>
> Change it to SUNXI_SRAM_ADDRESS, which holds the real address of SRAM
> A1 in the memory map.
Nice rework, thanks for that!
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre.
> ---
> arch/arm/include/asm/arch-sunxi/spl.h | 6 +-----
> arch/arm/mach-sunxi/Kconfig | 14 +++++---------
> include/configs/sunxi-common.h | 19 +++++++++++--------
> 3 files changed, 17 insertions(+), 22 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-sunxi/spl.h b/arch/arm/include/asm/arch-sunxi/spl.h
> index a70b1797e5..e166568d11 100644
> --- a/arch/arm/include/asm/arch-sunxi/spl.h
> +++ b/arch/arm/include/asm/arch-sunxi/spl.h
> @@ -12,11 +12,7 @@
> #define SPL_SIGNATURE "SPL" /* marks "sunxi" SPL header */
> #define SPL_HEADER_VERSION 2
>
> -#ifdef CONFIG_SUNXI_HIGH_SRAM
> -#define SPL_ADDR 0x10000
> -#else
> -#define SPL_ADDR 0x0
> -#endif
> +#define SPL_ADDR CONFIG_SUNXI_SRAM_ADDRESS
>
> /* The low 8-bits of the 'boot_media' field in the SPL header */
> #define SUNXI_BOOTED_FROM_MMC0 0
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index 0a7bd3086a..e3c19b7464 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -73,16 +73,15 @@ config SUN8I_RSB
> with various RSB based devices, such as AXP223, AXP8XX PMICs,
> and AC100/AC200 ICs.
>
> -config SUNXI_HIGH_SRAM
> - bool
> - default n
> +config SUNXI_SRAM_ADDRESS
> + hex
> + default 0x10000 if MACH_SUN9I || MACH_SUN50I || MACH_SUN50I_H5
> + default 0x0
> ---help---
> Older Allwinner SoCs have their mask boot ROM mapped just below 4GB,
> with the first SRAM region being located at address 0.
> Some newer SoCs map the boot ROM at address 0 instead and move the
> - SRAM to 64KB, just behind the mask ROM.
> - Chips using the latter setup are supposed to select this option to
> - adjust the addresses accordingly.
> + SRAM to a different address.
>
> # Note only one of these may be selected at a time! But hidden choices are
> # not supported by Kconfig
> @@ -252,7 +251,6 @@ config MACH_SUN9I
> select CPU_V7
> select DRAM_SUN9I
> select SUN6I_PRCM
> - select SUNXI_HIGH_SRAM
> select SUNXI_GEN_SUN6I
> select SUN8I_RSB
> select SUPPORT_SPL
> @@ -264,7 +262,6 @@ config MACH_SUN50I
> select PHY_SUN4I_USB
> select SUNXI_DE2
> select SUNXI_GEN_SUN6I
> - select SUNXI_HIGH_SRAM
> select SUPPORT_SPL
> select SUNXI_DRAM_DW
> select SUNXI_DRAM_DW_32BIT
> @@ -275,7 +272,6 @@ config MACH_SUN50I_H5
> bool "sun50i (Allwinner H5)"
> select ARM64
> select MACH_SUNXI_H3_H5
> - select SUNXI_HIGH_SRAM
> select FIT
> select SPL_LOAD_FIT
>
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 9d9e9ce173..0196dd0431 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -83,20 +83,19 @@
>
> #define CONFIG_SPL_BSS_MAX_SIZE 0x00080000 /* 512 KiB */
>
> -#ifdef CONFIG_SUNXI_HIGH_SRAM
> /*
> * The A80's A1 sram starts at 0x00010000 rather then at 0x00000000 and is
> * slightly bigger. Note that it is possible to map the first 32 KiB of the
> * A1 at 0x00000000 like with older SoCs by writing 0x16aa0001 to the
> * undocumented 0x008000e0 SYS_CTRL register. Where the 16aa is a key and
> * the 1 actually activates the mapping of the first 32 KiB to 0x00000000.
> + * A64 and H5 also has SRAM A1 at 0x00010000, but no magic remap register
> + * is known yet.
> + * H6 has SRAM A1 at 0x00020000.
> */
> -#define CONFIG_SYS_INIT_RAM_ADDR 0x10000
> -#define CONFIG_SYS_INIT_RAM_SIZE 0x08000 /* FIXME: 40 KiB ? */
> -#else
> -#define CONFIG_SYS_INIT_RAM_ADDR 0x0
> -#define CONFIG_SYS_INIT_RAM_SIZE 0x8000 /* 32 KiB */
> -#endif
> +#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SUNXI_SRAM_ADDRESS
> +/* FIXME: this may be larger on some SoCs */
> +#define CONFIG_SYS_INIT_RAM_SIZE 0x8000 /* 32 KiB */
>
> #define CONFIG_SYS_INIT_SP_OFFSET \
> (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
> @@ -188,7 +187,11 @@
> #define CONFIG_SPL_BOARD_LOAD_IMAGE
> #endif
>
> -#ifdef CONFIG_SUNXI_HIGH_SRAM
> +/*
> + * We cannot use expressions here, because expressions won't be evaluated in
> + * autoconf.mk.
> + */
> +#if CONFIG_SUNXI_SRAM_ADDRESS == 0x10000
> #define CONFIG_SPL_TEXT_BASE 0x10060 /* sram start+header */
> #define CONFIG_SPL_MAX_SIZE 0x7fa0 /* 32 KiB */
> #ifdef CONFIG_ARM64
>
next prev parent reply other threads:[~2018-06-26 10:34 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 10:37 [U-Boot] [PATCH 00/13] Allwinner H6 support (w/ SPL) Icenowy Zheng
2018-06-25 10:37 ` [U-Boot] [PATCH 01/13] sunxi: change SUNXI_HIGH_SRAM option to SUNXI_SRAM_ADDRESS Icenowy Zheng
2018-06-25 12:30 ` Maxime Ripard
2018-06-26 10:34 ` Andre Przywara [this message]
2018-06-25 10:37 ` [U-Boot] [PATCH 02/13] sunxi: add basical memory map definitions of H6 SoC Icenowy Zheng
2018-06-25 12:33 ` Maxime Ripard
2018-06-25 12:50 ` Icenowy Zheng
2018-06-25 17:07 ` Maxime Ripard
2018-06-26 10:35 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-27 8:51 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 03/13] sunxi: change RMR64's RVBAR address for H6 Icenowy Zheng
2018-06-26 10:37 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 04/13] sunxi: change ATF position " Icenowy Zheng
2018-06-26 10:56 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 05/13] sunxi: add config for SPL at 0x20000 on H6 Icenowy Zheng
2018-06-26 10:56 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 06/13] sunxi: change GIC address " Icenowy Zheng
2018-06-26 10:56 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 07/13] sunxi: add clock code for H6 Icenowy Zheng
2018-06-26 13:04 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 08/13] sunxi: use sun6i-style watchdog " Icenowy Zheng
2018-06-25 10:37 ` [U-Boot] [PATCH 09/13] sunxi: add UART0 setup " Icenowy Zheng
2018-06-26 11:01 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 10/13] sunxi: add MMC support " Icenowy Zheng
2018-06-25 10:37 ` [U-Boot] [PATCH 11/13] sunxi: add DRAM support to H6 Icenowy Zheng
2018-06-27 9:46 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-27 10:49 ` Icenowy Zheng
2018-06-27 17:29 ` Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 12/13] sunxi: add support for Allwinner H6 SoC Icenowy Zheng
2018-06-27 14:04 ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-27 14:26 ` Icenowy Zheng
2018-06-25 10:37 ` [U-Boot] [PATCH 13/13] sunxi: add support for Pine H64 board Icenowy Zheng
2018-06-25 12:40 ` [U-Boot] [linux-sunxi] [PATCH 00/13] Allwinner H6 support (w/ SPL) Jagan Teki
2018-06-25 12:49 ` Icenowy Zheng
2018-06-25 13:02 ` Jagan Teki
2018-07-19 18:14 ` Jagan Teki
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=8d346aae-f067-da71-994e-e39c8eac4cf6@arm.com \
--to=andre.przywara@arm.com \
--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