summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2021-02-25 17:22:30 +0800
committerPriyanka Jain <priyanka.jain@nxp.com>2021-03-05 10:25:42 +0530
commitc1979d74bc52a727a1c09d4592f18e2226e45af6 (patch)
tree4e3a1d4dcdb51a4884348a5c69a6f174f5ec8096
parent91617d2865dcb31d3e70165861eb9c0a0c450ab8 (diff)
downloadu-boot-c1979d74bc52a727a1c09d4592f18e2226e45af6.tar.gz
u-boot-c1979d74bc52a727a1c09d4592f18e2226e45af6.tar.bz2
u-boot-c1979d74bc52a727a1c09d4592f18e2226e45af6.zip
ppc: qemu: Enable OF_CONTROL
The QEMU ppce500 machine generates a device tree blob and passes it to U-Boot during boot. Let's enable OF_CONTROL with OF_BOARD and provide board_fdt_blob_setup() in the board codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
-rw-r--r--board/freescale/qemu-ppce500/qemu-ppce500.c10
-rw-r--r--configs/qemu-ppce500_defconfig3
2 files changed, 12 insertions, 1 deletions
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index 4719d98584..50167d546f 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -364,3 +364,13 @@ u32 cpu_mask(void)
{
return (1 << cpu_numcores()) - 1;
}
+
+/**
+ * Return the virtual address of FDT that was passed by QEMU
+ *
+ * @return virtual address of FDT received from QEMU in r3 register
+ */
+void *board_fdt_blob_setup(void)
+{
+ return get_fdt_virt();
+}
diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig
index 25fcd41986..4522e18c7b 100644
--- a/configs/qemu-ppce500_defconfig
+++ b/configs/qemu-ppce500_defconfig
@@ -22,6 +22,8 @@ CONFIG_CMD_PING=y
# CONFIG_CMD_HASH is not set
CONFIG_CMD_EXT2=y
CONFIG_DOS_PARTITION=y
+CONFIG_OF_CONTROL=y
+CONFIG_OF_BOARD=y
CONFIG_ENV_OVERWRITE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
# CONFIG_MMC is not set
@@ -29,4 +31,3 @@ CONFIG_E1000=y
CONFIG_SYS_NS16550=y
CONFIG_ADDR_MAP=y
CONFIG_PANIC_HANG=y
-CONFIG_OF_LIBFDT=y