with u-boot,dm-spl added for imx8qm-pm node, and SPL_SIMPLE_BUS enabled,
the bind and probe code in board file could be removed.

Also we need to enlarge SYS_MALLOC_F_LEN to avoid calloc fail.

Signed-off-by: Peng Fan <peng....@nxp.com>
---
 arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi |  5 +++++
 board/freescale/imx8qm_mek/spl.c        | 16 ----------------
 configs/imx8qm_mek_defconfig            |  1 +
 3 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi 
b/arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi
index 5d50eb028e..9a4a83b70e 100644
--- a/arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi
+++ b/arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi
@@ -3,6 +3,11 @@
  * Copyright 2018 NXP
  */
 
+&{/imx8qm-pm} {
+
+       u-boot,dm-spl;
+};
+
 &mu {
        u-boot,dm-spl;
 };
diff --git a/board/freescale/imx8qm_mek/spl.c b/board/freescale/imx8qm_mek/spl.c
index 95ce9f37e8..cb4006eb2a 100644
--- a/board/freescale/imx8qm_mek/spl.c
+++ b/board/freescale/imx8qm_mek/spl.c
@@ -18,7 +18,6 @@ DECLARE_GLOBAL_DATA_PTR;
 void spl_board_init(void)
 {
        struct udevice *dev;
-       int offset;
 
        uclass_find_first_device(UCLASS_MISC, &dev);
 
@@ -27,21 +26,6 @@ void spl_board_init(void)
                        continue;
        }
 
-       offset = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "nxp,imx8-pd");
-       while (offset != -FDT_ERR_NOTFOUND) {
-               lists_bind_fdt(gd->dm_root, offset_to_ofnode(offset),
-                              NULL, true);
-               offset = fdt_node_offset_by_compatible(gd->fdt_blob, offset,
-                                                      "nxp,imx8-pd");
-       }
-
-       uclass_find_first_device(UCLASS_POWER_DOMAIN, &dev);
-
-       for (; dev; uclass_find_next_device(&dev)) {
-               if (device_probe(dev))
-                       continue;
-       }
-
        arch_cpu_init();
 
        board_early_init_f();
diff --git a/configs/imx8qm_mek_defconfig b/configs/imx8qm_mek_defconfig
index 3294931ef8..594eb9efb2 100644
--- a/configs/imx8qm_mek_defconfig
+++ b/configs/imx8qm_mek_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_TEXT_BASE=0x80020000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x8000
 CONFIG_TARGET_IMX8QM_MEK=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
-- 
2.16.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to