Skip to contentSkip to conversation

imx: imx8: fix build when CONFIG_IMX_BOOTAUX is set

PATCH In review [email protected] 3 participants 4 messages Aug 7, 2024 – Aug 13, 2024

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

PATCH 1/1 imx: imx8: fix build when CONFIG_IMX_BOOTAUX is set

From: Max Krummenacher <[email protected]>

Use correct function name.

Fixes e8cd1f60d964 ("imx: imx8: bootaux: Add i.MX8 M4 boot support")

---

 arch/arm/mach-imx/imx8/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-imx/imx8/cpu.c +2 -2
index accba502e492..834aca82bcfd 100644
@@ -258,14 +258,14 @@ int arch_auxiliary_core_up(u32 core_id, ulong boot_private_data)
 			return -EIO;
 		}
 
-		if (!power_domain_lookup_name("audio_sai0", &pd)) {
+		if (!imx8_power_domain_lookup_name("audio_sai0", &pd)) {
 			if (power_domain_on(&pd)) {
 				printf("Error power on SAI0\n");
 				return -EIO;
 			}
 		}
 
-		if (!power_domain_lookup_name("audio_ocram", &pd)) {
+		if (!imx8_power_domain_lookup_name("audio_ocram", &pd)) {
 			if (power_domain_on(&pd)) {
 				printf("Error power on HIFI RAM\n");
 				return -EIO;
Signature · 1 line
2.42.0
#1 lore raw
Quoted 20 lines

Subject: [PATCH] imx: imx8: fix build when CONFIG_IMX_BOOTAUX is set

From: Max Krummenacher <[email protected]>

Use correct function name.

Fixes e8cd1f60d964 ("imx: imx8: bootaux: Add i.MX8 M4 boot

support")

---

 arch/arm/mach-imx/imx8/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-imx/imx8/cpu.c +0 -0

imx/imx8/cpu.c index accba502e492..834aca82bcfd 100644

arch/arm/mach-imx/imx8/cpu.c int arch_auxiliary_core_up(u32 core_id, · line 264

Quoted 8 lines
arch/arm/mach-imx/imx8/cpu.c +1 -1
@@ -258,14 +258,14 @@ int arch_auxiliary_core_up(u32 core_id,
 ulong boot_private_data)
 			return -EIO;
 		}
 
-		if (!power_domain_lookup_name("audio_sai0", &pd))
 {
+		if (!imx8_power_domain_lookup_name("audio_sai0",
 &pd)) {

I think need to find a proper fix to this. This API is legacy API.

Thanks
Peng

#2 lore raw

Hello Peng Fan

Quoted 24 lines · Peng Fan
Quoted 24 lines

Subject: [PATCH] imx: imx8: fix build when CONFIG_IMX_BOOTAUX is set

From: Max Krummenacher <[email protected]>

Use correct function name.

Fixes e8cd1f60d964 ("imx: imx8: bootaux: Add i.MX8 M4 boot

support")

---

 arch/arm/mach-imx/imx8/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-imx/imx8/cpu.c +0 -0

imx/imx8/cpu.c index accba502e492..834aca82bcfd 100644

arch/arm/mach-imx/imx8/cpu.c +0 -0
@@ -258,14 +258,14 @@ int arch_auxiliary_core_up(u32 core_id,
 ulong boot_private_data)
 			return -EIO;
 		}
 
Quoted 6 lines

arch/arm/mach-imx/imx8/cpu.c int arch_auxiliary_core_up(u32 core_id, · line 264

Quoted 4 lines
arch/arm/mach-imx/imx8/cpu.c +1 -1
-		if (!power_domain_lookup_name("audio_sai0", &pd))
 {
+		if (!imx8_power_domain_lookup_name("audio_sai0",
 &pd)) {

I think need to find a proper fix to this. This API is legacy API.

The current code does call a function which does not exist. Thus the compile fails if enabling CONFIG_IMX_BOOTAUX for a i.MX 8X and likely always did.
I think that would merrit fixing it now rather than waiting until the more modern API is ported into U-Boot and the code using it changed to the new API.

Alternatively I could remove the handling of the HiFi auxiliary core from arch_auxiliary_core_up() and returning EINVAL if someone tried to set that core up.

Regards
Max

Quoted 5 lines

Thanks
Peng

reviewer
#3 lore raw

Hi Max,

Quoted 6 lines · Max Krummenacher

The current code does call a function which does not exist. Thus the compile fails if enabling CONFIG_IMX_BOOTAUX for a i.MX 8X and likely always did.
I think that would merrit fixing it now rather than waiting until the more modern API is ported into U-Boot and the code using it changed to the new API.

Agreed, applied it.

Peng, feel free to submit additional patches to address this issue.