Skip to contentSkip to conversation

imx8qxp: mek: enable dm-spl for pm

PATCH In review Peng Fan 2 participants 4 messages Mar 7, 2019 – Apr 26, 2019

Subsystems (2)
lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/1 imx8qxp: mek: enable dm-spl for pm

with u-boot,dm-spl added for imx8qx-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.

---
 arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi |  5 +++++
 board/freescale/imx8qxp_mek/spl.c        | 15 ---------------
 configs/imx8qxp_mek_defconfig            |  2 +-
 3 files changed, 6 insertions(+), 16 deletions(-)
arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi +5 -0
index 5d50eb028e..201559008c 100644
@@ -3,6 +3,11 @@
  * Copyright 2018 NXP
  */
 
+&{/imx8qx-pm} {
+
+	u-boot,dm-spl;
+};
+
 &mu {
 	u-boot,dm-spl;
 };
board/freescale/imx8qxp_mek/spl.c +0 -15
index 95ce9f37e8..51f323811a 100644
@@ -27,21 +27,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();
configs/imx8qxp_mek_defconfig +1 -1
index a94998b8b5..915d8812ad 100644
@@ -4,7 +4,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=0x2000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_TARGET_IMX8QXP_MEK=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
Signature · 1 line
2.16.4
author
#1 lore raw

PATCH 1/1 imx8qxp: mek: enable dm-spl for pm

Hi Stefano,

Are you fine with this patch?

Thanks,
Peng.

Quoted 79 lines

-----Original Message-----
From: Peng Fan
Sent: 2019年3月7日 20:44
To: sbabic at denx.de; festevam at gmail.com
Cc: dl-uboot-imx <[email protected]>; u-boot at lists.denx.de; Peng Fan <[email protected]>
Subject: [PATCH] imx8qxp: mek: enable dm-spl for pm

with u-boot,dm-spl added for imx8qx-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.

---
 arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi |  5 +++++
 board/freescale/imx8qxp_mek/spl.c        | 15 ---------------
 configs/imx8qxp_mek_defconfig            |  2 +-
 3 files changed, 6 insertions(+), 16 deletions(-)
arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi +5 -0
index 5d50eb028e..201559008c 100644
@@ -3,6 +3,11 @@
  * Copyright 2018 NXP
  */
 
+&{/imx8qx-pm} {
+
+	u-boot,dm-spl;
+};
+
 &mu {
 	u-boot,dm-spl;
 };
board/freescale/imx8qxp_mek/spl.c +0 -15
index 95ce9f37e8..51f323811a 100644
@@ -27,21 +27,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/freescale/imx8qxp_mek/spl.c +0 -0
 	board_early_init_f();
configs/imx8qxp_mek_defconfig +0 -0
index a94998b8b5..915d8812ad 100644
@@ -4,7 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x80020000

CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y

configs/imx8qxp_mek_defconfig +1 -2
-CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_TARGET_IMX8QXP_MEK=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
--

2.16.4

author
#2 lore raw

PATCH 1/1 imx8qxp: mek: enable dm-spl for pm

Ping..

Thanks,
Peng

Quoted 86 lines

Hi Stefano,

Are you fine with this patch?

Thanks,
Peng.

Quoted 79 lines

-----Original Message-----
From: Peng Fan
Sent: 2019年3月7日 20:44
To: sbabic at denx.de; festevam at gmail.com
Cc: dl-uboot-imx <[email protected]>; u-boot at lists.denx.de; Peng Fan <[email protected]>
Subject: [PATCH] imx8qxp: mek: enable dm-spl for pm

with u-boot,dm-spl added for imx8qx-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.

---
 arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi |  5 +++++
 board/freescale/imx8qxp_mek/spl.c        | 15 ---------------
 configs/imx8qxp_mek_defconfig            |  2 +-
 3 files changed, 6 insertions(+), 16 deletions(-)
arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi +5 -0
index 5d50eb028e..201559008c 100644
@@ -3,6 +3,11 @@
  * Copyright 2018 NXP
  */
 
+&{/imx8qx-pm} {
+
+	u-boot,dm-spl;
+};
+
 &mu {
 	u-boot,dm-spl;
 };
board/freescale/imx8qxp_mek/spl.c +0 -15
index 95ce9f37e8..51f323811a 100644
@@ -27,21 +27,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/freescale/imx8qxp_mek/spl.c +0 -0
 	board_early_init_f();
(quoted diff) +0 -0

b/configs/imx8qxp_mek_defconfig index a94998b8b5..915d8812ad 100644

configs/imx8qxp_mek_defconfig +0 -0
@@ -4,7 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x80020000

CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y

configs/imx8qxp_mek_defconfig +1 -2
-CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
 CONFIG_TARGET_IMX8QXP_MEK=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
--

2.16.4

#3 lore raw
In reply to Peng Fan
Quoted 4 lines

with u-boot,dm-spl added for imx8qx-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.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================