Skip to contentSkip to conversation

Kconfig: set i.MX8MQ SYS_MALLOC_F_LEN

PATCH In review Peng Fan (OSS) 3 participants 6 messages Apr 29, 2022 – Jun 10, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 Kconfig: set i.MX8MQ SYS_MALLOC_F_LEN

From: Peng Fan <[email protected]>

set SPL_SYS_MALLOC_F_LEN to 0x2000
set SYS_MALLOC_F_LEN to 0x10000

This is to prepare enable CLK_IMX8MQ for i.MX8MQ

Fixes commit 4eb82c2e56a7c ("imx: power-domain: Get rid of SMCCC dependency")
---
 Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Kconfig +2 -1
index bdae59e06f4..4559b627707 100644
@@ -257,7 +257,7 @@ config SYS_MALLOC_F_LEN
 	default 0x4000 if SANDBOX || RISCV || ARCH_APPLE || ROCKCHIP_RK3368 || \
 			  ROCKCHIP_RK3399
 	default 0x8000 if RCAR_GEN3
-	default 0x10000 if ARCH_IMX8 || (ARCH_IMX8M && !IMX8MQ) || \
+	default 0x10000 if ARCH_IMX8 || ARCH_IMX8M || \
 			   ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \
 			   ARCH_LS1046A
 	default 0x2000
@@ -285,6 +285,7 @@ config SPL_SYS_MALLOC_F_LEN
 	depends on SYS_MALLOC_F && SPL
 	default 0 if !SPL_FRAMEWORK
 	default 0x2800 if RCAR_GEN3
+	default 0x2000 if IMX8MQ
 	default SYS_MALLOC_F_LEN
 	help
 	  In SPL memory is very limited on many platforms. Still,
Signature · 1 line
2.36.0
#1 lore raw

PATCH 2/3 imx: imx8mq: default select CLK_IMX8MQ

From: Peng Fan <[email protected]>

Since the power domain driver default select CONFIG_CLK, so we will meet lots failures without CLK_IMX8MQ, so default select it.

Fixes commit 4eb82c2e56a7c ("imx: power-domain: Get rid of SMCCC dependency")
---
 arch/arm/mach-imx/imx8m/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8m/Kconfig +1 -0
index 24299ae037f..7f23d687be3 100644
@@ -8,6 +8,7 @@ config IMX8M
 config IMX8MQ
 	bool
 	select IMX8M
+	select CLK_IMX8MQ
 
 config IMX8MM
 	bool
Signature · 1 line
2.36.0
#2 lore raw

Re: [PATCH 2/3] imx: imx8mq: default select CLK_IMX8MQ

Quoted 6 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Since the power domain driver default select CONFIG_CLK, so we will meet lots failures without CLK_IMX8MQ, so default select it.

There is a related patch [1] that I submitted for all imx8m SoC's t select their respective CLK_IMX8M[MNPQ]

adam

[1] - https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Quoted 21 lines
Fixes commit 4eb82c2e56a7c ("imx: power-domain: Get rid of SMCCC dependency")
---
 arch/arm/mach-imx/imx8m/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8m/Kconfig +1 -1
index 24299ae037f..7f23d687be3 100644
@@ -8,6 +8,7 @@ config IMX8M
 config IMX8MQ
        bool
        select IMX8M
+       select CLK_IMX8MQ
 
 config IMX8MM
        bool
--

2.36.0

#3 lore raw

Re: [PATCH 2/3] imx: imx8mq: default select CLK_IMX8MQ

Quoted 10 lines · Adam Ford
Quoted 6 lines · Peng Fan (OSS)

From: Peng Fan <[email protected]>

Since the power domain driver default select CONFIG_CLK, so we will meet lots failures without CLK_IMX8MQ, so default select it.

There is a related patch [1] that I submitted for all imx8m SoC's t select their respective CLK_IMX8M[MNPQ]

Actually default select CLK_IMX8MQ will not make i.MX8MQ bootable, patch 1 in this patchset still needed. If possible, you could take my patch 1 in your patchset and drop patch 2 in this patchset.

Thanks,
Peng.

Quoted 26 lines

adam

[1] - https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20220417221647.2390750-1-aford173%40gmail.com%2F&amp;data=05%7C01%7Cpeng.fan%40nxp.com%7C48339c3e1efe45476e6d08da2ab04211%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637869233759129025%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wZCdJR%2BVf%2BpeBkq%2BtGA%2FcXkxY5GUPUfU%2FeyPtrc%2Bpn0%3D&amp;reserved=0

Quoted 21 lines
Fixes commit 4eb82c2e56a7c ("imx: power-domain: Get rid of SMCCC dependency")
---
  arch/arm/mach-imx/imx8m/Kconfig | 1 +
  1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8m/Kconfig +1 -1
index 24299ae037f..7f23d687be3 100644
@@ -8,6 +8,7 @@ config IMX8M
  config IMX8MQ
         bool
         select IMX8M
+       select CLK_IMX8MQ
 
  config IMX8MM
         bool
--

2.36.0

#4 lore raw

PATCH 3/3 imx: imx8mq: select CONFIG_CMD_CLK

In reply to Peng Fan (OSS)

From: Peng Fan <[email protected]>

select CONFIG_CMD_CLK to enable dump clk in uboot shell

---
 configs/imx8mq_evk_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/imx8mq_evk_defconfig +1 -0
index 780f93103c7..9f54a280d9b 100644
@@ -40,6 +40,7 @@ CONFIG_SYS_PROMPT="u-boot=> "
 # CONFIG_CMD_EXPORTENV is not set
 # CONFIG_CMD_IMPORTENV is not set
 # CONFIG_CMD_CRC32 is not set
+CONFIG_CMD_CLK=y
 CONFIG_CMD_FUSE=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
Signature · 1 line
2.36.0
#5 lore raw
In reply to Peng Fan (OSS)

Hi Peng,

Am Fr., 29. Apr. 2022 um 09:20 Uhr schrieb Peng Fan (OSS) <[email protected]>:

Quoted 10 lines

From: Peng Fan <[email protected]>

set SPL_SYS_MALLOC_F_LEN to 0x2000
set SYS_MALLOC_F_LEN to 0x10000

This is to prepare enable CLK_IMX8MQ for i.MX8MQ

Fixes commit 4eb82c2e56a7c ("imx: power-domain: Get rid of SMCCC dependency")

The kontron pitx-imx8m board (imx8mq SoC) does not start properly in since 4eb82c2e56a7c. This is still valid in the 2022.7-rcX. I see in patchwork that this commit is superseded. Are there others available that will fix your mentioned problem?

Quoted 26 lines
---
 Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Kconfig +2 -2
index bdae59e06f4..4559b627707 100644
@@ -257,7 +257,7 @@ config SYS_MALLOC_F_LEN
        default 0x4000 if SANDBOX || RISCV || ARCH_APPLE || ROCKCHIP_RK3368 || \
                          ROCKCHIP_RK3399
        default 0x8000 if RCAR_GEN3
-       default 0x10000 if ARCH_IMX8 || (ARCH_IMX8M && !IMX8MQ) || \
+       default 0x10000 if ARCH_IMX8 || ARCH_IMX8M || \
                           ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \
                           ARCH_LS1046A
        default 0x2000
@@ -285,6 +285,7 @@ config SPL_SYS_MALLOC_F_LEN
        depends on SYS_MALLOC_F && SPL
        default 0 if !SPL_FRAMEWORK
        default 0x2800 if RCAR_GEN3
+       default 0x2000 if IMX8MQ
        default SYS_MALLOC_F_LEN
        help
          In SPL memory is very limited on many platforms. Still,
--
Quoted 2 lines

2.36.0

Thanks

Signature · 1 line
Heiko