spl: sunxi: Replace ARCH_SUNXI with BOARD_SUNXI

This provides a unified configuration across all sunxi boards,
regardless of CPU architecture.

Series-to: Andre Przywara <andre.przywara@arm.com>
Series-to: Jagan Teki <jagan@amarulasolutions.com>
Series-cc: u-boot@lists.denx.de

Cover-letter:
sunxi: Prepare platform Kconfig to support multiple architectures
sunxi is getting a new RISC-V platform, D1. We want to share as much of
the existing configuration as possible, to provide a familiar
environment, DRAM layout, partition layout, etc.

Because U-Boot includes all architecture Kconfig files at once, we must
use a symbol outside of both CONFIG_ARM and CONFIG_RISCV to contain
shared Kconfig options. I chose BOARD_SUNXI, corresponding to the file
location and somewhat following the BOARD_SPECIFIC_OPTIONS pattern.

I did a buildman run on this series. The only net option changes are the
expected ones:
 - Host-side USB gets enabled on several boards by the first patch
   (emlid_neutis_n5_devboard orangepi_zero2 pinephone pinetab tanix_tx6
   x96_mate teres_i)
 - CONFIG_BOARD_SUNXI gets added everywhere
 - CONFIG_SYS_I2C_MVTWSI gets enabled by the corresponding patch

Andre, please feel free to take any subset of these; they don't all have
to go in at once. And I'm open to suggestions about what instances of
ARCH_SUNXI should (not) be converted. Some of them are open to opinion.

I left alone the options in arch/arm/mach-sunxi/Kconfig that are covered
by other series (MMC CD/USB PHY/power pins, AXP GPIO).

After this series, the Kconfig changes needed for D1 support are quite
small, something like this commit:
c12cf6c5d7.patch

Adding SUNXI_MINIMUM_DRAM_MB certainly made things nicer. There are a
few options that probably still need some adjustment to respect it.
END

Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
Samuel Holland 2022-08-06 00:09:38 -05:00
parent 1cad18bc1d
commit c222a0e369
2 changed files with 7 additions and 7 deletions

View File

@ -111,7 +111,7 @@ config SPL_PAD_TO
config SPL_HAS_BSS_LINKER_SECTION
depends on SPL_FRAMEWORK
bool "Use a specific address for the BSS via the linker script"
default y if ARCH_SUNXI || ARCH_MX6 || ARCH_OMAP2PLUS || MIPS || RISCV || ARCH_ZYNQMP
default y if ARCH_MX6 || ARCH_OMAP2PLUS || ARCH_ZYNQMP || BOARD_SUNXI || MIPS || RISCV
config SPL_BSS_START_ADDR
hex "Link address for the BSS within the SPL binary"
@ -349,7 +349,7 @@ config SPL_SYS_MALLOC_SIMPLE
config SPL_SHARES_INIT_SP_ADDR
bool "SPL and U-Boot use the same initial stack pointer location"
depends on (ARM || ARCH_JZ47XX || MICROBLAZE || RISCV) && SPL_FRAMEWORK
default n if ARCH_SUNXI || ARCH_MX6 || ARCH_MX7
default n if BOARD_SUNXI || ARCH_MX6 || ARCH_MX7
default y
help
In many cases, we can use the same initial stack pointer address for
@ -469,7 +469,7 @@ config SPL_DISPLAY_PRINT
config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
bool "MMC raw mode: by sector"
default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER || \
default y if BOARD_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER || \
ARCH_MX6 || ARCH_MX7 || \
ARCH_ROCKCHIP || ARCH_MVEBU || ARCH_SOCFPGA || \
ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
@ -482,7 +482,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
hex "Address on the MMC to load U-Boot from"
depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
default 0x40 if ARCH_SUNXI
default 0x40 if BOARD_SUNXI
default 0x75 if ARCH_DAVINCI
default 0x8a if ARCH_MX6 || ARCH_MX7
default 0x100 if ARCH_UNIPHIER
@ -499,7 +499,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
config SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET
hex "U-Boot main hardware partition image offset"
depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
default 0x10 if ARCH_SUNXI
default 0x10 if BOARD_SUNXI
default 0x0
help
On some platforms SPL location depends on hardware partition. The ROM
@ -1344,7 +1344,7 @@ endif # SPL_SPI_FLASH_SUPPORT
config SYS_SPI_U_BOOT_OFFS
hex "address of u-boot payload in SPI flash"
default 0x8000 if ARCH_SUNXI
default 0x8000 if BOARD_SUNXI
default 0x0
depends on SPL_SPI_LOAD || SPL_SPI_SUNXI
help

View File

@ -264,7 +264,7 @@ endif
INPUTS-$(CONFIG_TARGET_SOCFPGA_SOC64) += $(obj)/u-boot-spl-dtb.hex
ifdef CONFIG_ARCH_SUNXI
ifdef CONFIG_BOARD_SUNXI
INPUTS-y += $(obj)/sunxi-spl.bin
ifdef CONFIG_NAND_SUNXI