aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Przywara2022-03-04 16:30:13 +0000
committerTom Rini2022-04-01 14:57:46 -0400
commit5865038257d1a38dd71f8107e4510f3c0c0dd584 (patch)
tree8a2e0dbd6d9be74b3102fa8ac6539e484579a59c
parente09ec8e340260ace3d49d634fc869b7a9eb09186 (diff)
vexpress64: move hardware setting from defconfig to Kconfig
The defconfigs for the Arm Juno board and the FVP model are quite large, setting a lot of platform-fixed variables like SYS_TEXT_BASE. As those values are not really a user choice, let's provide default values for them in our Kconfig file, so a lot of cruft can be removed from the defconfig files. This also moves the driver selection out of there, since this is again not something a user should really decide on. Instead we allow users to enable or disable subsystems, and select the appropriate drivers based on that in the Kconfig file. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--board/armltd/vexpress64/Kconfig41
-rw-r--r--configs/vexpress_aemv8a_juno_defconfig21
-rw-r--r--configs/vexpress_aemv8a_semi_defconfig10
4 files changed, 44 insertions, 32 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0691292ea6c..7e613c7ed78 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1258,6 +1258,10 @@ config ARCH_VEXPRESS64
select PL01X_SERIAL
select OF_CONTROL
select CLK
+ select BLK
+ select MTD_NOR_FLASH if MTD
+ select FLASH_CFI_DRIVER if MTD
+ select ENV_IS_IN_FLASH if MTD
config TARGET_TOTAL_COMPUTE
bool "Support Total Compute Platform"
diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig
index 34126446a7d..512bbbe72e6 100644
--- a/board/armltd/vexpress64/Kconfig
+++ b/board/armltd/vexpress64/Kconfig
@@ -15,15 +15,24 @@ choice
config TARGET_VEXPRESS64_BASE_FVP
bool "Support Versatile Express ARMv8a FVP BASE model"
select SEMIHOSTING
+ select VIRTIO_BLK if VIRTIO_MMIO
+ select VIRTIO_NET if VIRTIO_MMIO
+ select DM_ETH if VIRTIO_NET
select LINUX_KERNEL_IMAGE_HEADER
select POSITION_INDEPENDENT
select OF_BOARD
config TARGET_VEXPRESS64_JUNO
bool "Support Versatile Express Juno Development Platform"
- select DM_ETH
- select USB
- select BLK
+ select PCIE_ECAM_GENERIC if PCI
+ select SATA_SIL
+ select SMC911X if DM_ETH
+ select SMC911X_32_BIT if SMC911X
+ select CMD_USB if USB
+ select USB_EHCI_HCD if USB
+ select USB_EHCI_GENERIC if USB
+ select USB_OHCI_HCD if USB
+ select USB_OHCI_GENERIC if USB
imply OF_HAS_PRIOR_STAGE
endchoice
@@ -38,4 +47,30 @@ config JUNO_DTB_PART
config LNX_KRNL_IMG_TEXT_OFFSET_BASE
default SYS_TEXT_BASE
+config SYS_TEXT_BASE
+ default 0x88000000 if TARGET_VEXPRESS64_BASE_FVP
+ default 0xe0000000 if TARGET_VEXPRESS64_JUNO
+
+config SYS_MALLOC_LEN
+ default 0x810000 if TARGET_VEXPRESS64_JUNO
+ default 0x840000 if TARGET_VEXPRESS64_BASE_FVP
+
+config SYS_MALLOC_F_LEN
+ default 0x2000
+
+config SYS_LOAD_ADDR
+ default 0x90000000
+
+config ENV_ADDR
+ default 0x0BFC0000 if TARGET_VEXPRESS64_JUNO
+ default 0x0FFC0000 if TARGET_VEXPRESS64_BASE_FVP
+
+config ENV_SIZE
+ default 0x10000 if TARGET_VEXPRESS64_JUNO
+ default 0x40000
+
+config ENV_SECT_SIZE
+ default 0x10000 if TARGET_VEXPRESS64_JUNO
+ default 0x40000
+
endif
diff --git a/configs/vexpress_aemv8a_juno_defconfig b/configs/vexpress_aemv8a_juno_defconfig
index 1f8f101f211..a5d72474673 100644
--- a/configs/vexpress_aemv8a_juno_defconfig
+++ b/configs/vexpress_aemv8a_juno_defconfig
@@ -1,11 +1,6 @@
CONFIG_ARM=y
CONFIG_ARCH_VEXPRESS64=y
-CONFIG_SYS_TEXT_BASE=0xe0000000
-CONFIG_SYS_MALLOC_LEN=0x810000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=2
-CONFIG_ENV_SIZE=0x10000
-CONFIG_ENV_SECT_SIZE=0x10000
CONFIG_DEFAULT_DEVICE_TREE="juno-r2"
CONFIG_IDENT_STRING=" vexpress_aemv8a"
CONFIG_TARGET_VEXPRESS64_JUNO=y
@@ -13,7 +8,6 @@ CONFIG_SYS_MEMTEST_START=0x80000000
CONFIG_SYS_MEMTEST_END=0xff000000
CONFIG_DISTRO_DEFAULTS=y
CONFIG_REMAKE_ELF=y
-CONFIG_SYS_LOAD_ADDR=0x90000000
CONFIG_BOOTDELAY=1
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttyAMA0,115200n8 root=/dev/sda2 rw rootwait earlycon=pl011,0x7ff80000 debug user_debug=31 androidboot.hardware=juno loglevel=9"
@@ -28,7 +22,6 @@ CONFIG_CMD_ARMFLASH=y
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_PCI=y
CONFIG_CMD_SATA=y
-CONFIG_CMD_USB=y
# CONFIG_CMD_ITEST is not set
# CONFIG_CMD_SETEXPR is not set
CONFIG_BOOTP_BOOTFILESIZE=y
@@ -36,21 +29,11 @@ CONFIG_BOOTP_BOOTFILESIZE=y
CONFIG_CMD_CACHE=y
# CONFIG_CMD_SLEEP is not set
CONFIG_CMD_UBI=y
-CONFIG_ENV_IS_IN_FLASH=y
-CONFIG_ENV_ADDR=0xBFC0000
-CONFIG_SATA_SIL=y
# CONFIG_MMC is not set
CONFIG_MTD=y
-CONFIG_MTD_NOR_FLASH=y
-CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_PROTECTION=y
CONFIG_SYS_FLASH_CFI=y
-CONFIG_SMC911X=y
-CONFIG_SMC911X_32_BIT=y
+CONFIG_DM_ETH=y
CONFIG_PCI=y
-CONFIG_PCIE_ECAM_GENERIC=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_GENERIC=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_OHCI_GENERIC=y
+CONFIG_USB=y
diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig
index dd06a1c1fb5..b47aba2bc35 100644
--- a/configs/vexpress_aemv8a_semi_defconfig
+++ b/configs/vexpress_aemv8a_semi_defconfig
@@ -1,19 +1,13 @@
CONFIG_ARM=y
# CONFIG_ARM64_CRC32 is not set
CONFIG_ARCH_VEXPRESS64=y
-CONFIG_SYS_TEXT_BASE=0x88000000
-CONFIG_SYS_MALLOC_LEN=0x840000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=2
-CONFIG_ENV_SIZE=0x40000
-CONFIG_ENV_SECT_SIZE=0x40000
CONFIG_DEFAULT_DEVICE_TREE="fvp-base-revc"
CONFIG_IDENT_STRING=" vexpress_aemv8a"
CONFIG_SYS_MEMTEST_START=0x80000000
CONFIG_SYS_MEMTEST_END=0xff000000
CONFIG_DISTRO_DEFAULTS=y
CONFIG_REMAKE_ELF=y
-CONFIG_SYS_LOAD_ADDR=0x90000000
CONFIG_ANDROID_BOOT_IMAGE=y
CONFIG_BOOTDELAY=1
CONFIG_USE_BOOTARGS=y
@@ -38,12 +32,8 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_UBI=y
# CONFIG_ISO_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
-CONFIG_ENV_IS_IN_FLASH=y
-CONFIG_ENV_ADDR=0xFFC0000
# CONFIG_MMC is not set
CONFIG_MTD=y
-CONFIG_MTD_NOR_FLASH=y
-CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_PROTECTION=y
CONFIG_SYS_FLASH_CFI=y