summaryrefslogtreecommitdiff
path: root/arch/arm/mach-versal
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-09-18 14:58:16 +0200
committerMichal Simek <michal.simek@xilinx.com>2018-10-16 16:53:24 +0200
commitddccf5ef90b6df10fe7a58fe112d2d4013e4f154 (patch)
tree129771927906fdb4786c03f4a93859ab45cbf87a /arch/arm/mach-versal
parent3dc80934f4651a3ef243a393be04b1f7f71daf24 (diff)
downloadu-boot-ddccf5ef90b6df10fe7a58fe112d2d4013e4f154.tar.gz
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/Kconfig5
-rw-r--r--arch/arm/mach-versal/cpu.c14
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