]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ppc: qemu: Enable OF_CONTROL
authorBin Meng <bmeng.cn@gmail.com>
Thu, 25 Feb 2021 09:22:30 +0000 (17:22 +0800)
committerPriyanka Jain <priyanka.jain@nxp.com>
Fri, 5 Mar 2021 04:55:42 +0000 (10:25 +0530)
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>
board/freescale/qemu-ppce500/qemu-ppce500.c
configs/qemu-ppce500_defconfig

index 4719d985842abff2e7543812d93e566231c95afe..50167d546f831de3faffafea4fdfcfed69328994 100644 (file)
@@ -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();
+}
index 25fcd41986589293e185b51fe5442f29b69f8b78..4522e18c7baee21f9469ca2f6af899543479f047 100644 (file)
@@ -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