aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-01-10 00:19:05 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-10 00:19:05 -0500
commit13b8a272297b29870d5bf5f8db7a381dd9e82382 (patch)
tree7abd516728d53f2d096d757412d6e9cd17819382 /arch/powerpc
parent0f17574a651884c721e1a33051719e59deb13c18 (diff)
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/Kconfig9
-rw-r--r--arch/powerpc/kernel/Makefile2
-rw-r--r--arch/powerpc/kernel/setup_32.c2
-rw-r--r--arch/powerpc/kernel/setup_64.c2
-rw-r--r--arch/powerpc/platforms/maple/setup.c3
5 files changed, 10 insertions, 8 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 28004f002ec9..17c1b6aa44bc 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -275,6 +275,7 @@ config PPC_PSERIES
275 select PPC_I8259 275 select PPC_I8259
276 select PPC_RTAS 276 select PPC_RTAS
277 select RTAS_ERROR_LOGGING 277 select RTAS_ERROR_LOGGING
278 select PPC_UDBG_16550
278 default y 279 default y
279 280
280config PPC_CHRP 281config PPC_CHRP
@@ -284,6 +285,7 @@ config PPC_CHRP
284 select PPC_INDIRECT_PCI 285 select PPC_INDIRECT_PCI
285 select PPC_RTAS 286 select PPC_RTAS
286 select PPC_MPC106 287 select PPC_MPC106
288 select PPC_UDBG_16550
287 default y 289 default y
288 290
289config PPC_PMAC 291config PPC_PMAC
@@ -306,6 +308,7 @@ config PPC_PREP
306 depends on PPC_MULTIPLATFORM && PPC32 && BROKEN 308 depends on PPC_MULTIPLATFORM && PPC32 && BROKEN
307 select PPC_I8259 309 select PPC_I8259
308 select PPC_INDIRECT_PCI 310 select PPC_INDIRECT_PCI
311 select PPC_UDBG_16550
309 default y 312 default y
310 313
311config PPC_MAPLE 314config PPC_MAPLE
@@ -314,6 +317,7 @@ config PPC_MAPLE
314 select U3_DART 317 select U3_DART
315 select MPIC_BROKEN_U3 318 select MPIC_BROKEN_U3
316 select GENERIC_TBSYNC 319 select GENERIC_TBSYNC
320 select PPC_UDBG_16550
317 default n 321 default n
318 help 322 help
319 This option enables support for the Maple 970FX Evaluation Board. 323 This option enables support for the Maple 970FX Evaluation Board.
@@ -324,6 +328,7 @@ config PPC_CELL
324 depends on PPC_MULTIPLATFORM && PPC64 328 depends on PPC_MULTIPLATFORM && PPC64
325 select PPC_RTAS 329 select PPC_RTAS
326 select MMIO_NVRAM 330 select MMIO_NVRAM
331 select PPC_UDBG_16550
327 332
328config PPC_OF 333config PPC_OF
329 def_bool y 334 def_bool y
@@ -370,6 +375,10 @@ config MPIC_BROKEN_U3
370 depends on PPC_MAPLE 375 depends on PPC_MAPLE
371 default y 376 default y
372 377
378config PPC_UDBG_16550
379 bool
380 default n
381
373config CELL_IIC 382config CELL_IIC
374 depends on PPC_CELL 383 depends on PPC_CELL
375 bool 384 bool
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 6e03b595b6c8..0faf95c93ef8 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -55,7 +55,7 @@ obj-$(CONFIG_BOOTX_TEXT) += btext.o
55obj-$(CONFIG_6xx) += idle_6xx.o 55obj-$(CONFIG_6xx) += idle_6xx.o
56obj-$(CONFIG_SMP) += smp.o 56obj-$(CONFIG_SMP) += smp.o
57obj-$(CONFIG_KPROBES) += kprobes.o 57obj-$(CONFIG_KPROBES) += kprobes.o
58obj-$(CONFIG_SERIAL_8250) += legacy_serial.o udbg_16550.o 58obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o
59module-$(CONFIG_PPC64) += module_64.o 59module-$(CONFIG_PPC64) += module_64.o
60obj-$(CONFIG_MODULES) += $(module-y) 60obj-$(CONFIG_MODULES) += $(module-y)
61 61
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index e5d285adb496..db72a92943bf 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -299,9 +299,7 @@ void __init setup_arch(char **cmdline_p)
299 if (ppc_md.init_early) 299 if (ppc_md.init_early)
300 ppc_md.init_early(); 300 ppc_md.init_early();
301 301
302#ifdef CONFIG_SERIAL_8250
303 find_legacy_serial_ports(); 302 find_legacy_serial_ports();
304#endif
305 finish_device_tree(); 303 finish_device_tree();
306 304
307 smp_setup_cpu_maps(); 305 smp_setup_cpu_maps();
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 81567e931260..c4b76961d6de 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -472,9 +472,7 @@ void __init setup_system(void)
472 * hash table management for us, thus ioremap works. We do that early 472 * hash table management for us, thus ioremap works. We do that early
473 * so that further code can be debugged 473 * so that further code can be debugged
474 */ 474 */
475#ifdef CONFIG_SERIAL_8250
476 find_legacy_serial_ports(); 475 find_legacy_serial_ports();
477#endif
478 476
479 /* 477 /*
480 * "Finish" the device-tree, that is do the actual parsing of 478 * "Finish" the device-tree, that is do the actual parsing of
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index dd73e38bfb7d..a1cb4d236720 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -71,9 +71,6 @@
71#define DBG(fmt...) 71#define DBG(fmt...)
72#endif 72#endif
73 73
74extern void generic_find_legacy_serial_ports(u64 *physport,
75 unsigned int *default_speed);
76
77static void maple_restart(char *cmd) 74static void maple_restart(char *cmd)
78{ 75{
79 unsigned int maple_nvram_base; 76 unsigned int maple_nvram_base;