Skip to contentSkip to conversation

linuxppc_2_4_devel patch to add KGDB support to gt64260 MPSC

PATCH Mark A. Greer 1 participant 1 message May 22, 2003

lore
Share & tools
lore
#0 lore raw

Patch that:

- Removes polled putc routine from arch/ppc/kernel/gt64260_common.c
- Creates arch/ppc/kernel/gt64260_dbg.c file that contains progress routine and kgdb interface routine for gt64260 MPSC.
- Does some compiler warning cleanups on arch/ppc/kernel/gt64260_pic.c

Mark

===== arch/ppc/kernel/gt64260_common.c 1.15 vs edited =====

arch/ppc/kernel/gt64260_common.c +0 -63
@@ -1819,68 +1819,5 @@
     	memcpy(gt64260_mac_addrs[port], mac_addr, 6);
 }
 
-
-#if defined(CONFIG_SERIAL_TEXT_DEBUG)
-/*
- *****************************************************************************
- *
- *	Low-level MPSC/UART I/O routines
- *
- *****************************************************************************
- */
-
-/*
- * gt64260_putc()
- *
- * Dump a character out the MPSC port for gt64260_mpsc_progress
- * this assumes the baud rate has already been set up and the
- * MPSC initialized by the bootloader or firmware.
- */
-
-static inline void
-gt_putc(char c)
-{
-	mb();
-	gt_write(GT64260_MPSC_0_CHR_1, c);
-	mb();
-	gt_write(GT64260_MPSC_0_CHR_2, 0x200);
-	mb();
-
-	udelay(10000);
-}
-
-void
-puthex(unsigned long val)
-{
-
-        int i;
-
-        for (i = 7;  i >= 0;  i--) {
-		gt_putc("0123456789ABCDEF"[(val>>28) & 0x0f]);
-		val <<= 4;
-	}
-	gt_putc('\r');
-	gt_putc('\n');
-
-}
-
-void
-gt64260_mpsc_progress(char *s, unsigned short hex)
-{
-	/* spit stuff out the 64260 mpsc */
-
-	volatile char	c;
-	while ((c = *s++) != 0){
-		gt_putc(c);
-		if ( c == '\n' ) gt_putc('\r');
-	}
-	gt_putc('\n');
-	gt_putc('\r');
-
-	return;
-}
-
-#endif /* CONFIG_DEBUG_TEXT */
-
 EXPORT_SYMBOL(gt64260_set_base);
 EXPORT_SYMBOL(gt64260_get_base);

===== arch/ppc/kernel/gt64260_dbg.c 1.1 vs edited =====

arch/ppc/kernel/gt64260_dbg.c +105 -0

105 lines not on this page · raw message

===== arch/ppc/kernel/gt64260_pic.c 1.12 vs edited =====

arch/ppc/kernel/gt64260_pic.c +3 -3
@@ -172,13 +172,13 @@
 #else /* !CONFIG_SMP */
 
 static inline void
-gt_write_intr_mask_lo()
+gt_write_intr_mask_lo(void)
 {
 	gt_write(gt64260_intr_mask_reg_offset[0][0], ppc_cached_irq_mask[0]);
 }
 
 static inline void
-gt_write_intr_mask_hi()
+gt_write_intr_mask_hi(void)
 {
 	gt_write(gt64260_intr_mask_reg_offset[0][1], ppc_cached_irq_mask[1]);
 }
@@ -362,7 +362,7 @@
  *  void
  */
 
-void
+static void
 gt64260_unmask_irq(unsigned int irq)
 {
 	irq -= gt64260_irq_base;

===== arch/ppc/kernel/Makefile 1.131 vs edited =====

arch/ppc/kernel/Makefile +4 -0
@@ -51,6 +51,10 @@
 obj-$(CONFIG_KGDB)		+= gen550_kgdb.o gen550_dbg.o
 obj-$(CONFIG_SERIAL_TEXT_DEBUG)	+= gen550_dbg.o
 endif
+ifeq ($(CONFIG_GT64260_CONSOLE),y)
+obj-$(CONFIG_KGDB)		+= gt64260_dbg.o
+obj-$(CONFIG_SERIAL_TEXT_DEBUG)	+= gt64260_dbg.o
+endif
 ifeq ($(CONFIG_4xx),y)
 obj-$(CONFIG_4xx)		+= todc_time.o idle_4xx.o
 obj-$(CONFIG_40x)		+= ppc4xx_setup.o ocp.o