]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
powerpc/boot: Only build uartlite if XILINX_VIRTEX=y
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 8 Nov 2017 11:05:27 +0000 (22:05 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 11 Dec 2017 02:03:30 +0000 (13:03 +1100)
The serial code in uartlite.c only matches if we find one of two
Xilinx (xlnx) nodes in the device tree, there's no need to build or
link the code on other platforms.

As far as I can tell CONFIG_XILINX_VIRTEX is the appropriate symbol to
use to conditionally compile the code.

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

index 08782f55b89ff491383adaa1bbdb6eee8490020b..16beaeee5f95dde90d0256a207da47180923f1d3 100644 (file)
@@ -109,7 +109,7 @@ src-wlib-y := string.S crt0.S stdio.c decompress.c main.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 \
-               uartlite.c opal.c
+               opal.c
 src-wlib-$(CONFIG_PPC_MPC52XX) += mpc52xx-psc.c
 src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) +=  opal-calls.S
 ifndef CONFIG_PPC64_BOOT_WRAPPER
@@ -120,6 +120,7 @@ src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c
 src-wlib-$(CONFIG_PPC_8xx) += mpc8xx.c planetcore.c fsl-soc.c
 src-wlib-$(CONFIG_PPC_82xx) += pq2.c fsl-soc.c planetcore.c
 src-wlib-$(CONFIG_EMBEDDED6xx) += mpsc.c mv64x60.c mv64x60_i2c.c ugecon.c fsl-soc.c
+src-wlib-$(CONFIG_XILINX_VIRTEX) += uartlite.c
 
 src-plat-y := of.c epapr.c
 src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c \
index 7b5c02b1afd00987ad1bdf3336480de0f198d1e1..71d062b48c1b7735418e2b5bab4c0c66efc8ef6c 100644 (file)
@@ -133,9 +133,11 @@ 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_XILINX_VIRTEX
        else if (dt_is_compatible(devp, "xlnx,opb-uartlite-1.00.b") ||
                 dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a"))
                rc = uartlite_console_init(devp, &serial_cd);
+#endif
        else if (dt_is_compatible(devp, "ibm,opal-console-raw"))
                rc = opal_console_init(devp, &serial_cd);