diff options
author | Michal Simek <michal.simek@xilinx.com> | 2018-09-18 14:58:16 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2018-10-16 16:53:24 +0200 |
commit | ddccf5ef90b6df10fe7a58fe112d2d4013e4f154 (patch) | |
tree | 129771927906fdb4786c03f4a93859ab45cbf87a /arch/arm/mach-versal | |
parent | 3dc80934f4651a3ef243a393be04b1f7f71daf24 (diff) |
arm64: versal: Add Xilinx Versal Virtual QEMU board
Virtual QEMU board is generating DTB self and putting it to
VERSAL_QEMU_DTB_ADDR address.
Board is using CONFIG_OF_BOARD which ensures that u-boot is aligned with
board created by QEMU.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/arm/mach-versal')
-rw-r--r-- | arch/arm/mach-versal/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/mach-versal/cpu.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-versal/Kconfig b/arch/arm/mach-versal/Kconfig index 04dbaea09c..9cee97b748 100644 --- a/arch/arm/mach-versal/Kconfig +++ b/arch/arm/mach-versal/Kconfig @@ -36,4 +36,9 @@ config COUNTER_FREQUENCY config ZYNQ_SDHCI_MAX_FREQ default 200000000 +config VERSAL_OF_BOARD_DTB_ADDR + hex + default 0x1000 + depends on OF_BOARD + endif diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c index 959570eef6..1fd3c246c1 100644 --- a/arch/arm/mach-versal/cpu.c +++ b/arch/arm/mach-versal/cpu.c @@ -67,3 +67,17 @@ u64 get_page_table_size(void) { return 0x14000; } + +#if defined(CONFIG_OF_BOARD) +void *board_fdt_blob_setup(void) +{ + static void *fw_dtb = (void *)CONFIG_VERSAL_OF_BOARD_DTB_ADDR; + + if (fdt_magic(fw_dtb) != FDT_MAGIC) { + printf("DTB is not passed via %llx\n", (u64)fw_dtb); + return NULL; + } + + return fw_dtb; +} +#endif |