Commit ca2e9b2f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fixes / Enhancements for PPC_GEN550

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.
parent dc25f7ba
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -103,12 +103,10 @@
#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
......
......@@ -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
......
......@@ -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>
......
......@@ -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);
......
......@@ -11,8 +11,17 @@
#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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment