]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fixes / Enhancements for PPC_GEN550
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Feb 2004 02:30:50 +0000 (18:30 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 4 Feb 2004 02:30:50 +0000 (18:30 -0800)
From: Tom Rini <trini@kernel.crashing.org>

Various fixes for the PPC_GEN550 backend.

- Move PPC_GEN550 bool into a more appropriate spot.

- Add PPC_GEN550 support to the MCPN765 platform.

- Allow for SERIAL_TEXT_DEBUG on PPC_GEN550.

- Add missing headers to arch/ppc/syslib/gen550_dbg.c

- Clean-up the KGDB interface such that we allow for a kgdb_map_scc call,
  but do not require one.

- Add gen550 prototypes to <asm/kgdb.h>

- PPC_GEN550 backend code doesn't depend on 8250_SERIAL.

arch/ppc/Kconfig
arch/ppc/kernel/setup.c
arch/ppc/platforms/mcpn765_setup.c
arch/ppc/platforms/sandpoint.c
arch/ppc/syslib/Makefile
arch/ppc/syslib/gen550_dbg.c
arch/ppc/syslib/gen550_kgdb.c
include/asm-ppc/kgdb.h
include/asm-ppc/machdep.h

index ec25b00bfaaf7f7e5385b4cf62a58b36516e1d71..c066db4a3ba867a9955bba476f389b43d0227b5b 100644 (file)
@@ -583,11 +583,6 @@ config PPC_CHRP
        depends on PPC_MULTIPLATFORM
        default y
 
-config PPC_GEN550
-       bool
-       depends on SANDPOINT
-       default y
-
 config PPC_PMAC
        bool
        depends on PPC_MULTIPLATFORM
@@ -603,6 +598,11 @@ config PPC_OF
        depends on PPC_PMAC || PPC_CHRP
        default y
 
+config PPC_GEN550
+       bool
+       depends on SANDPOINT || MCPN765
+       default y
+
 config FORCE
        bool
        depends on 6xx && (PCORE || POWERPMC250)
@@ -1404,7 +1404,7 @@ config BOOTX_TEXT
 
 config SERIAL_TEXT_DEBUG
        bool "Support for early boot texts over serial port"
-       depends on 4xx || GT64260 || LOPEC || MCPN765 || PPLUS || PRPMC800 || SANDPOINT
+       depends on 4xx || GT64260 || LOPEC || PPLUS || PRPMC800 || PPC_GEN550
 
 config OCP
        bool
index 32fece58813665db82674d1606d2096adaffef5c..94c00edb40bf6b1289c4f3a518f7b1ed65a74d85 100644 (file)
@@ -48,11 +48,6 @@ extern void identify_cpu(unsigned long offset, unsigned long cpu);
 extern void do_cpu_ftr_fixups(unsigned long offset);
 extern void reloc_got2(unsigned long offset);
 
-
-#ifdef CONFIG_KGDB
-extern void kgdb_map_scc(void);
-#endif
-
 extern void ppc6xx_idle(void);
 extern void power4_idle(void);
 
@@ -632,7 +627,8 @@ void __init setup_arch(char **cmdline_p)
        if ( ppc_md.progress ) ppc_md.progress("setup_arch: enter", 0x3eab);
 
 #if defined(CONFIG_KGDB)
-       kgdb_map_scc();
+       if (ppc_md.kgdb_map_scc)
+               ppc_md.kgdb_map_scc();
        set_debug_traps();
        if (strstr(cmd_line, "gdb")) {
                if (ppc_md.progress)
index e64cfb9f60b3afde1c12795a47438f61f9b13af1..3ffcc851200142646fb8b4b9ab387dd580cb120f 100644 (file)
@@ -50,6 +50,7 @@
 #include <asm/pci-bridge.h>
 #include <asm/bootinfo.h>
 #include <asm/pplus.h>
+#include <asm/kgdb.h>
 
 #include "mcpn765.h"
 #include "mcpn765_serial.h"
@@ -78,9 +79,6 @@ static u_char mcpn765_openpic_initsenses[] __initdata = {
 extern u_int openpic_irq(void);
 extern char cmd_line[];
 
-extern void gen550_progress(char *, unsigned short);
-extern void gen550_init(int, struct uart_port *);
-
 int use_of_interrupt_tree = 0;
 
 static void mcpn765_halt(void);
@@ -472,6 +470,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 #if defined(CONFIG_SERIAL_8250) && \
        (defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG))
        mcpn765_early_serial_map();
+#ifdef CONFIG_KGDB
+       ppc_md.kgdb_map_scc = gen550_kgdb_map_scc;
+#endif
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
        ppc_md.progress = gen550_progress;
 #endif
index e41b109fc4afb51a2140e8e4e19dffe6f9e3247c..fa837875255f833c3f67aaf64870102c74667dcf 100644 (file)
 #include <asm/bootinfo.h>
 #include <asm/mpc10x.h>
 #include <asm/pci-bridge.h>
+#include <asm/kgdb.h>
 
 #include "sandpoint.h"
 
-extern void gen550_progress(char *, unsigned short);
-extern void gen550_init(int, struct uart_port *);
-
 unsigned char __res[sizeof(bd_t)];
 
 static void sandpoint_halt(void);
@@ -706,6 +704,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 #if defined(CONFIG_SERIAL_8250) && \
        (defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG))
        sandpoint_early_serial_map();
+#ifdef CONFIG_KGDB
+       ppc_md.kgdb_map_scc = gen550_kgdb_map_scc;
+#endif
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
        ppc_md.progress = gen550_progress;
 #endif
index 59dd330444bcf8ec0e85527e341ef1beb8673670..9c5faac9735056e7827e3b7f94e09523d979bb15 100644 (file)
@@ -66,7 +66,7 @@ obj-$(CONFIG_SANDPOINT)               += i8259.o open_pic.o mpc10x_common.o \
 obj-$(CONFIG_SPRUCE)           += cpc700_pic.o indirect_pci.o pci_auto.o \
                                   todc_time.o
 obj-$(CONFIG_8260)             += m8260_setup.o ppc8260_pic.o
-ifeq ($(CONFIG_SERIAL_8250)$(CONFIG_PPC_GEN550),yy)
+ifeq ($(CONFIG_PPC_GEN550),y)
 obj-$(CONFIG_KGDB)             += gen550_kgdb.o gen550_dbg.o
 obj-$(CONFIG_SERIAL_TEXT_DEBUG)        += gen550_dbg.o
 endif
index 7fb0b41a241c455c41dfd730400bc2c98d8ff097..cfac3ab654f86d3f3101ee5e6b680fa15ce98bf2 100644 (file)
@@ -17,6 +17,8 @@
  */
 
 #include <linux/config.h>
+#include <linux/types.h>
+#include <linux/serial.h>
 #include <linux/tty.h>         /* For linux/serial_core.h */
 #include <linux/serial_core.h>
 #include <linux/serialP.h>
index 4171b50bde51565ff3f81df07c17112f0ed9a8d7..232044cdbe038c9c3e7628a0e57de326a63ae407 100644 (file)
@@ -77,7 +77,7 @@ void putDebugString(char* str)
  * to use.
  */
 void
-kgdb_map_scc(void)
+gen550_kgdb_map_scc(void)
 {
        printk(KERN_DEBUG "kgdb init\n");
        kgdb_debugport = serial_init(KGDB_PORT, NULL);
index 13e09287cae675882bce06cf9f650f37aec53aac..1d3c927ce62626a81c5f9f6ee98841f8232598d9 100644 (file)
 #define _PPC_KGDB_H
 
 #ifndef __ASSEMBLY__
-/* To initialize the serial, first thing called */
+
+/* Things specific to the gen550 backend. */
+struct uart_port;
+
+extern void gen550_progress(char *, unsigned short);
+extern void gen550_kgdb_map_scc(void);
+extern void gen550_init(int, struct uart_port *);
+
+/* Things specific to the pmac backend. */
 extern void zs_kgdb_hook(int tty_num);
+
 /* To init the kgdb engine. (called by serial hook)*/
 extern void set_debug_traps(void);
 
index 01ffbcd3cdbf8805461bba7483e299df657c9083..54cb5a93d50854dc9b95ea4014d31d98cbff8f7c 100644 (file)
@@ -53,6 +53,7 @@ struct machdep_calls {
        void            (*setup_io_mappings)(void);
 
        void            (*progress)(char *, unsigned short);
+       void            (*kgdb_map_scc)(void);
 
        unsigned char   (*nvram_read_val)(int addr);
        void            (*nvram_write_val)(int addr, unsigned char val);