vexpress64: fvp: enable OF_CONTROL
The FVP base model is relying on a DT for Linux operation, so there is no reason we would need to rely on hardcoded information for U-Boot. Letting U-Boot use a DT will open up the usage of actual peripherals, beyond the support for semihosting only. Enable OF_CONTROL in the Kconfig, and use the latest dts files from Linux. Depending on whether we use the boot-wrapper or TF-A, there is already a DTB provided or not, respectively. To cover the boot-wrapper, we add an arm64 Linux kernel header, which allows the boot-wrapper to treat U-Boot like a Linux kernel. U-Boot will find the pointer to the DTB in x0, and will use it. Even though TF-A carries a DT, at the moment this is not made available to non-secure world, so to not break users, we use the U-Boot provided DTB copy in that case. For some reason TF-A puts some DT like structure at the address x0 is pointing at, but that is very small and doesn't carry any hardware information. Make the code to ignore those small DTBs. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
parent
71fa41ebfc
commit
c0fce92956
5 changed files with 17 additions and 4 deletions
|
@ -1256,6 +1256,8 @@ config ARCH_VEXPRESS64
|
|||
select DM
|
||||
select DM_SERIAL
|
||||
select PL01X_SERIAL
|
||||
select OF_CONTROL
|
||||
select CLK
|
||||
|
||||
config TARGET_TOTAL_COMPUTE
|
||||
bool "Support Total Compute Platform"
|
||||
|
|
|
@ -1185,6 +1185,7 @@ dtb-$(CONFIG_TARGET_MX53PPD) += imx53-ppd.dtb
|
|||
# TODO(Linus Walleij <linus.walleij@linaro.org>): Should us a single vexpress
|
||||
# Kconfig option to build all of these. See examples above.
|
||||
dtb-$(CONFIG_TARGET_VEXPRESS_CA9X4) += vexpress-v2p-ca9.dtb
|
||||
dtb-$(CONFIG_TARGET_VEXPRESS64_BASE_FVP) += fvp-base-revc.dtb
|
||||
dtb-$(CONFIG_TARGET_VEXPRESS64_JUNO) += juno-r2.dtb
|
||||
|
||||
dtb-$(CONFIG_TARGET_TOTAL_COMPUTE) += total_compute.dtb
|
||||
|
|
|
@ -15,13 +15,14 @@ choice
|
|||
config TARGET_VEXPRESS64_BASE_FVP
|
||||
bool "Support Versatile Express ARMv8a FVP BASE model"
|
||||
select SEMIHOSTING
|
||||
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 OF_CONTROL
|
||||
select CLK
|
||||
select BLK
|
||||
imply OF_HAS_PRIOR_STAGE
|
||||
|
||||
|
@ -34,4 +35,7 @@ config JUNO_DTB_PART
|
|||
The ARM partition name in the NOR flash memory holding the
|
||||
device tree blob to configure U-Boot.
|
||||
|
||||
config LNX_KRNL_IMG_TEXT_OFFSET_BASE
|
||||
default SYS_TEXT_BASE
|
||||
|
||||
endif
|
||||
|
|
|
@ -168,11 +168,17 @@ void *board_fdt_blob_setup(int *err)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (fdt_magic(prior_stage_fdt_address) == FDT_MAGIC) {
|
||||
if (fdt_magic(prior_stage_fdt_address) == FDT_MAGIC &&
|
||||
fdt_totalsize(prior_stage_fdt_address) > 0x100) {
|
||||
*err = 0;
|
||||
return (void *)prior_stage_fdt_address;
|
||||
}
|
||||
|
||||
if (fdt_magic(gd->fdt_blob) == FDT_MAGIC) {
|
||||
*err = 0;
|
||||
return (void *)gd->fdt_blob;
|
||||
}
|
||||
|
||||
*err = -ENXIO;
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ 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
|
||||
|
@ -46,4 +47,3 @@ CONFIG_FLASH_CFI_DRIVER=y
|
|||
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
|
||||
CONFIG_SYS_FLASH_PROTECTION=y
|
||||
CONFIG_SYS_FLASH_CFI=y
|
||||
CONFIG_OF_LIBFDT=y
|
||||
|
|
Loading…
Reference in a new issue