Skip to content

Commit 866bfc7

Browse files
hreineckempe
authored andcommitted
powerpc: conditionally compile platform-specific serial drivers
mpsc.c and mpc52xx-psc.c are platform-specific serial drivers, and should be compiled for the respective platforms only. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Torsten Duwe <duwe@suse.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent eb03916 commit 866bfc7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

arch/powerpc/boot/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \
107107
$(libfdt) libfdt-wrapper.c \
108108
ns16550.c serial.c simple_alloc.c div64.S util.S \
109109
elf_util.c $(zlib-y) devtree.c stdlib.c \
110-
oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \
111-
uartlite.c mpc52xx-psc.c opal.c
110+
oflib.c ofconsole.c cuboot.c cpm-serial.c \
111+
uartlite.c opal.c
112+
src-wlib-$(CONFIG_PPC_MPC52XX) += mpc52xx-psc.c
112113
src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S
113114
ifndef CONFIG_PPC64_BOOT_WRAPPER
114115
src-wlib-y += crtsavres.S
@@ -117,7 +118,7 @@ src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c
117118
src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c
118119
src-wlib-$(CONFIG_PPC_8xx) += mpc8xx.c planetcore.c fsl-soc.c
119120
src-wlib-$(CONFIG_PPC_82xx) += pq2.c fsl-soc.c planetcore.c
120-
src-wlib-$(CONFIG_EMBEDDED6xx) += mv64x60.c mv64x60_i2c.c ugecon.c fsl-soc.c
121+
src-wlib-$(CONFIG_EMBEDDED6xx) += mpsc.c mv64x60.c mv64x60_i2c.c ugecon.c fsl-soc.c
121122

122123
src-plat-y := of.c epapr.c
123124
src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c \

arch/powerpc/boot/serial.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,19 @@ int serial_console_init(void)
120120
if (dt_is_compatible(devp, "ns16550") ||
121121
dt_is_compatible(devp, "pnpPNP,501"))
122122
rc = ns16550_console_init(devp, &serial_cd);
123+
#ifdef CONFIG_EMBEDDED6xx
123124
else if (dt_is_compatible(devp, "marvell,mv64360-mpsc"))
124125
rc = mpsc_console_init(devp, &serial_cd);
126+
#endif
125127
else if (dt_is_compatible(devp, "fsl,cpm1-scc-uart") ||
126128
dt_is_compatible(devp, "fsl,cpm1-smc-uart") ||
127129
dt_is_compatible(devp, "fsl,cpm2-scc-uart") ||
128130
dt_is_compatible(devp, "fsl,cpm2-smc-uart"))
129131
rc = cpm_console_init(devp, &serial_cd);
132+
#ifdef CONFIG_PPC_MPC52XX
130133
else if (dt_is_compatible(devp, "fsl,mpc5200-psc-uart"))
131134
rc = mpc5200_psc_console_init(devp, &serial_cd);
135+
#endif
132136
else if (dt_is_compatible(devp, "xlnx,opb-uartlite-1.00.b") ||
133137
dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a"))
134138
rc = uartlite_console_init(devp, &serial_cd);

0 commit comments

Comments
 (0)