powerpc: Introduce a new config symbol to control 16550 early debug code

The previous change by Kumar Gala in this area led to legacy_serial.c
and udbg_16550.c being built as modules when CONFIG_SERIAL_8250=m.
Fix this by introducing a new symbol, CONFIG_PPC_UDBG_16550, to
control whether these files get built, and arrange for it to be selected
for those platforms that need it.

Signed-off-by: Paul Mackerras <paulus@samba.org>

+14 -8
+9
arch/powerpc/Kconfig
··· 275 275 select PPC_I8259 276 276 select PPC_RTAS 277 277 select RTAS_ERROR_LOGGING 278 + select PPC_UDBG_16550 278 279 default y 279 280 280 281 config PPC_CHRP ··· 285 284 select PPC_INDIRECT_PCI 286 285 select PPC_RTAS 287 286 select PPC_MPC106 287 + select PPC_UDBG_16550 288 288 default y 289 289 290 290 config PPC_PMAC ··· 308 306 depends on PPC_MULTIPLATFORM && PPC32 && BROKEN 309 307 select PPC_I8259 310 308 select PPC_INDIRECT_PCI 309 + select PPC_UDBG_16550 311 310 default y 312 311 313 312 config PPC_MAPLE ··· 317 314 select U3_DART 318 315 select MPIC_BROKEN_U3 319 316 select GENERIC_TBSYNC 317 + select PPC_UDBG_16550 320 318 default n 321 319 help 322 320 This option enables support for the Maple 970FX Evaluation Board. ··· 328 324 depends on PPC_MULTIPLATFORM && PPC64 329 325 select PPC_RTAS 330 326 select MMIO_NVRAM 327 + select PPC_UDBG_16550 331 328 332 329 config PPC_OF 333 330 def_bool y ··· 374 369 bool 375 370 depends on PPC_MAPLE 376 371 default y 372 + 373 + config PPC_UDBG_16550 374 + bool 375 + default n 377 376 378 377 config CELL_IIC 379 378 depends on PPC_CELL
+1 -1
arch/powerpc/kernel/Makefile
··· 55 55 obj-$(CONFIG_6xx) += idle_6xx.o 56 56 obj-$(CONFIG_SMP) += smp.o 57 57 obj-$(CONFIG_KPROBES) += kprobes.o 58 - obj-$(CONFIG_SERIAL_8250) += legacy_serial.o udbg_16550.o 58 + obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o 59 59 module-$(CONFIG_PPC64) += module_64.o 60 60 obj-$(CONFIG_MODULES) += $(module-y) 61 61
-2
arch/powerpc/kernel/setup_32.c
··· 299 299 if (ppc_md.init_early) 300 300 ppc_md.init_early(); 301 301 302 - #ifdef CONFIG_SERIAL_8250 303 302 find_legacy_serial_ports(); 304 - #endif 305 303 finish_device_tree(); 306 304 307 305 smp_setup_cpu_maps();
-2
arch/powerpc/kernel/setup_64.c
··· 472 472 * hash table management for us, thus ioremap works. We do that early 473 473 * so that further code can be debugged 474 474 */ 475 - #ifdef CONFIG_SERIAL_8250 476 475 find_legacy_serial_ports(); 477 - #endif 478 476 479 477 /* 480 478 * "Finish" the device-tree, that is do the actual parsing of
-3
arch/powerpc/platforms/maple/setup.c
··· 71 71 #define DBG(fmt...) 72 72 #endif 73 73 74 - extern void generic_find_legacy_serial_ports(u64 *physport, 75 - unsigned int *default_speed); 76 - 77 74 static void maple_restart(char *cmd) 78 75 { 79 76 unsigned int maple_nvram_base;
+4
include/asm-powerpc/serial.h
··· 15 15 /* Default baud base if not found in device-tree */ 16 16 #define BASE_BAUD ( 1843200 / 16 ) 17 17 18 + #ifdef CONFIG_PPC_UDBG_16550 18 19 extern void find_legacy_serial_ports(void); 20 + #else 21 + #define find_legacy_serial_ports() do { } while (0) 22 + #endif 19 23 20 24 #endif /* _PPC64_SERIAL_H */