uboot-d1: add bootloader for upcoming d1 target
[openwrt/staging/mans0n.git] / package / boot / uboot-d1 / patches / 0067-sunxi-Move-SPL_BSS_START_ADDR-to-the-board-Kconfig.patch
1 From 71796f9d47a6b7e0dd6bb276436950463039c1b8 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Mon, 31 Oct 2022 00:08:26 -0500
4 Subject: [PATCH 67/90] sunxi: Move SPL_BSS_START_ADDR to the board Kconfig
5
6 This provides a default value for RISC-V when that is added, and it
7 makes sense to put this option next to the other DRAM layout options.
8
9 While at it, provide sensible values for platforms with less DRAM.
10
11 Signed-off-by: Samuel Holland <samuel@sholland.org>
12 ---
13 board/sunxi/Kconfig | 6 ++++++
14 common/spl/Kconfig | 3 ---
15 2 files changed, 6 insertions(+), 3 deletions(-)
16
17 --- a/board/sunxi/Kconfig
18 +++ b/board/sunxi/Kconfig
19 @@ -61,6 +61,12 @@ config PRE_CON_BUF_ADDR
20 default 0x4f000000 if SUNXI_MINIMUM_DRAM_MB >= 256
21 default 0x43000000 if SUNXI_MINIMUM_DRAM_MB >= 64
22
23 +config SPL_BSS_START_ADDR
24 + default 0x81f80000 if MACH_SUNIV
25 + default 0x2ff80000 if MACH_SUN9I
26 + default 0x4ff80000 if SUNXI_MINIMUM_DRAM_MB >= 256
27 + default 0x43f80000 if SUNXI_MINIMUM_DRAM_MB >= 64
28 +
29 config SPL_STACK_R_ADDR
30 default 0x81e00000 if MACH_SUNIV
31 default 0x2fe00000 if MACH_SUN9I
32 --- a/common/spl/Kconfig
33 +++ b/common/spl/Kconfig
34 @@ -119,9 +119,6 @@ config SPL_BSS_START_ADDR
35 default 0x88200000 if (ARCH_MX6 && (MX6SX || MX6SL || MX6UL || MX6ULL)) || ARCH_MX7
36 default 0x18200000 if ARCH_MX6 && !(MX6SX || MX6SL || MX6UL || MX6ULL)
37 default 0x80a00000 if ARCH_OMAP2PLUS
38 - default 0x81f80000 if ARCH_SUNXI && MACH_SUNIV
39 - default 0x4ff80000 if ARCH_SUNXI && !(MACH_SUN9I || MACH_SUNIV)
40 - default 0x2ff80000 if ARCH_SUNXI && MACH_SUN9I
41 default 0x1000 if ARCH_ZYNQMP
42
43 choice