]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/boot: Only build OPAL code when necessary
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 8 Nov 2017 11:05:28 +0000 (22:05 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 11 Dec 2017 02:03:30 +0000 (13:03 +1100)
Only build the OPAL console code in when necessary. This looks like it
should use CONFIG_PPC_POWERNV, but because the opal-call.S code is
64-bit only, we must only build it when we're building the boot
wrapper 64-bit.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/boot/Makefile
arch/powerpc/boot/serial.c

index 16beaeee5f95dde90d0256a207da47180923f1d3..650be8300fda2e6fe09f61b97a936cf5024a2009 100644 (file)
@@ -108,10 +108,10 @@ src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \
                $(libfdt) libfdt-wrapper.c \
                ns16550.c serial.c simple_alloc.c div64.S util.S \
                elf_util.c $(zlib-y) devtree.c stdlib.c \
-               oflib.c ofconsole.c cuboot.c cpm-serial.c \
-               opal.c
+               oflib.c ofconsole.c cuboot.c cpm-serial.c
+
 src-wlib-$(CONFIG_PPC_MPC52XX) += mpc52xx-psc.c
-src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) +=  opal-calls.S
+src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S opal.c
 ifndef CONFIG_PPC64_BOOT_WRAPPER
 src-wlib-y += crtsavres.S
 endif
index 71d062b48c1b7735418e2b5bab4c0c66efc8ef6c..6f2b2ecf10bd5e068cbbc462d3a3d17261573833 100644 (file)
@@ -138,8 +138,10 @@ int serial_console_init(void)
                 dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a"))
                rc = uartlite_console_init(devp, &serial_cd);
 #endif
+#ifdef CONFIG_PPC64_BOOT_WRAPPER
        else if (dt_is_compatible(devp, "ibm,opal-console-raw"))
                rc = opal_console_init(devp, &serial_cd);
+#endif
 
        /* Add other serial console driver calls here */