]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
vexpress64: move hardware setting from defconfig to Kconfig
authorAndre Przywara <andre.przywara@arm.com>
Fri, 4 Mar 2022 16:30:13 +0000 (16:30 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 1 Apr 2022 18:57:46 +0000 (14:57 -0400)
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>
arch/arm/Kconfig
board/armltd/vexpress64/Kconfig
configs/vexpress_aemv8a_juno_defconfig
configs/vexpress_aemv8a_semi_defconfig

index 0691292ea6ce8d95834b097ec345ec843d895604..7e613c7ed78df2a4c5f97799db6fbd31ca0d6c75 100644 (file)
@@ -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"
index 34126446a7d15294f457e018513a7bfba4ffb9e6..512bbbe72e60748f8b8b5a3fac853e2d6e2c63f7 100644 (file)
@@ -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
index 1f8f101f211cc0f0601502b89d037ef176d95abf..a5d7247467307b0fbc45225979e85520a785d397 100644 (file)
@@ -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
index dd06a1c1fb5e557d18165d8a1a90d5e608104cb9..b47aba2bc35423d9b2b3e3920b8011ea098b3b98 100644 (file)
@@ -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