]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Introduce a new config symbol to control 16550 early debug code
authorPaul Mackerras <paulus@samba.org>
Tue, 10 Jan 2006 05:19:05 +0000 (16:19 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 10 Jan 2006 05:19:05 +0000 (16:19 +1100)
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>
arch/powerpc/Kconfig
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/platforms/maple/setup.c
include/asm-powerpc/serial.h

index 28004f002ec9f810e3885db237514fab696a42fe..17c1b6aa44bc12cfd37978e9b97330ca7331c394 100644 (file)
@@ -275,6 +275,7 @@ config PPC_PSERIES
        select PPC_I8259
        select PPC_RTAS
        select RTAS_ERROR_LOGGING
+       select PPC_UDBG_16550
        default y
 
 config PPC_CHRP
@@ -284,6 +285,7 @@ config PPC_CHRP
        select PPC_INDIRECT_PCI
        select PPC_RTAS
        select PPC_MPC106
+       select PPC_UDBG_16550
        default y
 
 config PPC_PMAC
@@ -306,6 +308,7 @@ config PPC_PREP
        depends on PPC_MULTIPLATFORM && PPC32 && BROKEN
        select PPC_I8259
        select PPC_INDIRECT_PCI
+       select PPC_UDBG_16550
        default y
 
 config PPC_MAPLE
@@ -314,6 +317,7 @@ config PPC_MAPLE
        select U3_DART
        select MPIC_BROKEN_U3
        select GENERIC_TBSYNC
+       select PPC_UDBG_16550
        default n
        help
           This option enables support for the Maple 970FX Evaluation Board.
@@ -324,6 +328,7 @@ config PPC_CELL
        depends on PPC_MULTIPLATFORM && PPC64
        select PPC_RTAS
        select MMIO_NVRAM
+       select PPC_UDBG_16550
 
 config PPC_OF
        def_bool y
@@ -370,6 +375,10 @@ config MPIC_BROKEN_U3
        depends on PPC_MAPLE
        default y
 
+config PPC_UDBG_16550
+       bool
+       default n
+
 config CELL_IIC
        depends on PPC_CELL
        bool
index 6e03b595b6c83220e10e97b937f267ada37d2875..0faf95c93ef86bdea8b8cf3a053be954944a5439 100644 (file)
@@ -55,7 +55,7 @@ obj-$(CONFIG_BOOTX_TEXT)      += btext.o
 obj-$(CONFIG_6xx)              += idle_6xx.o
 obj-$(CONFIG_SMP)              += smp.o
 obj-$(CONFIG_KPROBES)          += kprobes.o
-obj-$(CONFIG_SERIAL_8250)      += legacy_serial.o udbg_16550.o
+obj-$(CONFIG_PPC_UDBG_16550)   += legacy_serial.o udbg_16550.o
 module-$(CONFIG_PPC64)         += module_64.o
 obj-$(CONFIG_MODULES)          += $(module-y)
 
index e5d285adb49687534680d6797e7fd43f4c125f6d..db72a92943bf63e4cb9f1c1e583f027a6be06698 100644 (file)
@@ -299,9 +299,7 @@ void __init setup_arch(char **cmdline_p)
        if (ppc_md.init_early)
                ppc_md.init_early();
 
-#ifdef CONFIG_SERIAL_8250
        find_legacy_serial_ports();
-#endif
        finish_device_tree();
 
        smp_setup_cpu_maps();
index 81567e931260e951a31083aa2bf2fb3da9c865cf..c4b76961d6de78f57e86c256211d4e0844f7ed22 100644 (file)
@@ -472,9 +472,7 @@ void __init setup_system(void)
         * hash table management for us, thus ioremap works. We do that early
         * so that further code can be debugged
         */
-#ifdef CONFIG_SERIAL_8250
        find_legacy_serial_ports();
-#endif
 
        /*
         * "Finish" the device-tree, that is do the actual parsing of
index dd73e38bfb7d04f353b88c30a59e238bcdab76c3..a1cb4d2367204ecd01b3df138f8ac9dd4f7d7f86 100644 (file)
@@ -71,9 +71,6 @@
 #define DBG(fmt...)
 #endif
 
-extern void generic_find_legacy_serial_ports(u64 *physport,
-               unsigned int *default_speed);
-
 static void maple_restart(char *cmd)
 {
        unsigned int maple_nvram_base;
index 6dc9546d6908c2604692a531a16043fa1983f6f5..3e8589b43cb2b27657e54154c36a2c1814ef0b72 100644 (file)
 /* Default baud base if not found in device-tree */
 #define BASE_BAUD ( 1843200 / 16 )
 
+#ifdef CONFIG_PPC_UDBG_16550
 extern void find_legacy_serial_ports(void);
+#else
+#define find_legacy_serial_ports()     do { } while (0)
+#endif
 
 #endif /* _PPC64_SERIAL_H */