Skip to contentSkip to conversation

powerpc/boot: Use CONFIG_PPC_POWERNV to compile OPAL support

PATCH Applied Cédric Le Goater 3 participants 3 messages Oct 11, 2021 – Oct 17, 2021 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/boot: Use CONFIG_PPC_POWERNV to compile OPAL support

CONFIG_PPC64_BOOT_WRAPPER is selected by CPU_LITTLE_ENDIAN which is used to compile support for other platforms such as Microwatt. There is no need for OPAL calls on these.

---
 arch/powerpc/boot/serial.c | 2 +-
 arch/powerpc/boot/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/boot/serial.c +1 -1
index 9a19e5905485..54d2522be485 100644
@@ -132,7 +132,7 @@ int serial_console_init(void)
 	else if (dt_is_compatible(devp, "fsl,mpc5200-psc-uart"))
 		rc = mpc5200_psc_console_init(devp, &serial_cd);
 #endif
-#ifdef CONFIG_PPC64_BOOT_WRAPPER
+#ifdef CONFIG_PPC_POWERNV
 	else if (dt_is_compatible(devp, "ibm,opal-console-raw"))
 		rc = opal_console_init(devp, &serial_cd);
 #endif
arch/powerpc/boot/Makefile +1 -1
index 089ee3ea55c8..9993c6256ad2 100644
@@ -123,7 +123,7 @@ src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \
 		oflib.c ofconsole.c cuboot.c
 
 src-wlib-$(CONFIG_PPC_MPC52xx) += mpc52xx-psc.c
-src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S opal.c
+src-wlib-$(CONFIG_PPC_POWERNV) += opal-calls.S opal.c
 ifndef CONFIG_PPC64_BOOT_WRAPPER
 src-wlib-y += crtsavres.S
 endif
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Cédric Le Goater

CONFIG_PPC64_BOOT_WRAPPER is selected by CPU_LITTLE_ENDIAN which is used to compile support for other platforms such as Microwatt. There is no need for OPAL calls on these.

Quoted 34 lines
---
 arch/powerpc/boot/serial.c | 2 +-
 arch/powerpc/boot/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/boot/serial.c +1 -1
index 9a19e5905485..54d2522be485 100644
@@ -132,7 +132,7 @@ int serial_console_init(void)
        else if (dt_is_compatible(devp, "fsl,mpc5200-psc-uart"))
                rc = mpc5200_psc_console_init(devp, &serial_cd);
 #endif
-#ifdef CONFIG_PPC64_BOOT_WRAPPER
+#ifdef CONFIG_PPC_POWERNV
        else if (dt_is_compatible(devp, "ibm,opal-console-raw"))
                rc = opal_console_init(devp, &serial_cd);
 #endif
arch/powerpc/boot/Makefile +1 -2
index 089ee3ea55c8..9993c6256ad2 100644
@@ -123,7 +123,7 @@ src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \
                oflib.c ofconsole.c cuboot.c
 
 src-wlib-$(CONFIG_PPC_MPC52xx) += mpc52xx-psc.c
-src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S opal.c
+src-wlib-$(CONFIG_PPC_POWERNV) += opal-calls.S opal.c
 ifndef CONFIG_PPC64_BOOT_WRAPPER
 src-wlib-y += crtsavres.S
 endif
--

2.31.1