Skip to contentSkip to conversation

Use gen550 for PPC44x progress/ppc-stub

PATCH New Matt Porter 1 participant 1 message Oct 9, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use gen550 for PPC44x progress/ppc-stub

Use gen550 for early PPC progress messages and for the in-kernel ppc-stub.c on PPC44x.

===== arch/ppc/platforms/4xx/Kconfig 1.10 vs edited =====

arch/ppc/platforms/4xx/Kconfig +5 -0
@@ -184,6 +184,11 @@
 	depends on !STB03xxx && PPC4xx_DMA
 	default y
 
+config PPC_GEN550
+	bool
+	depends on 44x
+	default y
+
 config PM
 	bool "Power Management support (EXPERIMENTAL)"
 	depends on 4xx && EXPERIMENTAL

===== arch/ppc/platforms/4xx/ebony.c 1.5 vs edited =====

arch/ppc/platforms/4xx/ebony.c +18 -6
@@ -1,10 +1,10 @@
 /*
- * arch/ppc/platforms/ebony.c
+ * arch/ppc/platforms/4xx/ebony.c
  *
  * Ebony board specific routines
  *
- * Matt Porter <[email protected]>
- * Copyright 2002 MontaVista Software Inc.
+ * Matt Porter <[email protected]>
+ * Copyright 2002-2004 MontaVista Software Inc.
  *
  * Eugene Surovegin <[email protected]> or <[email protected]>
  * Copyright (c) 2003, 2004 Zultys Technologies
@@ -50,6 +50,10 @@
 #include <asm/bootinfo.h>
 #include <asm/ppc4xx_pic.h>
 
+#include <syslib/gen550.h>
+
+static struct ibm44x_clocks clocks __initdata;
+
 /*
  * Ebony IRQ triggering/polarity settings
  */
@@ -120,8 +124,6 @@
 	(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE),	/* 63: EMAC 1 WOL */
 };
 
-static struct ibm44x_clocks clocks __initdata;
-
 static void __init
 ebony_calibrate_decr(void)
 {
@@ -284,13 +286,24 @@
 		printk("Early serial init of port 0 failed\n");
 	}
 
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+	/* Configure debug serial access */
+	gen550_init(0, &port);
+#endif
+
 	port.membase = ioremap64(PPC440GP_UART1_ADDR, 8);
 	port.irq = 1;
+	port.uartclk = clocks.uart1;
 	port.line = 1;
 
 	if (early_serial_setup(&port) != 0) {
 		printk("Early serial init of port 1 failed\n");
 	}
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+	/* Configure debug serial access */
+	gen550_init(1, &port);
+#endif
 }
 
 static void __init
@@ -378,7 +391,6 @@
 
 	ppc_md.nvram_read_val = todc_direct_read_val;
 	ppc_md.nvram_write_val = todc_direct_write_val;
-
 #ifdef CONFIG_KGDB
 	ppc_md.early_serial_map = ebony_early_serial_map;
 #endif

===== arch/ppc/platforms/4xx/ocotea.c 1.6 vs edited =====

arch/ppc/platforms/4xx/ocotea.c +14 -4
@@ -1,11 +1,11 @@
 /*
- * arch/ppc/platforms/ocotea.c
+ * arch/ppc/platforms/4xx/ocotea.c
  *
  * Ocotea board specific routines
  *
- * Matt Porter <[email protected]>
+ * Matt Porter <[email protected]>
  *
- * Copyright 2003 MontaVista Software Inc.
+ * Copyright 2003-2004 MontaVista Software Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
@@ -49,6 +49,7 @@
 #include <asm/ppc4xx_pic.h>
 #include <asm/ppcboot.h>
 
+#include <syslib/gen550.h>
 #include <syslib/ibm440gx_common.h>
 
 /*
@@ -263,6 +264,11 @@
 		printk("Early serial init of port 0 failed\n");
 	}
 
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+	/* Configure debug serial access */
+	gen550_init(0, &port);
+#endif
+
 	port.membase = ioremap64(PPC440GX_UART1_ADDR, 8);
 	port.irq = UART1_INT;
 	port.uartclk = clocks.uart1;
@@ -271,6 +277,11 @@
 	if (early_serial_setup(&port) != 0) {
 		printk("Early serial init of port 1 failed\n");
 	}
+
+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
+	/* Configure debug serial access */
+	gen550_init(1, &port);
+#endif
 }
 
 static void __init
@@ -355,7 +366,6 @@
 
 	ppc_md.nvram_read_val = todc_direct_read_val;
 	ppc_md.nvram_write_val = todc_direct_write_val;
-
 #ifdef CONFIG_KGDB
 	ppc_md.early_serial_map = ocotea_early_serial_map;
 #endif

===== arch/ppc/syslib/gen550_kgdb.c 1.3 vs edited =====

arch/ppc/syslib/gen550_kgdb.c +4 -2
@@ -9,9 +9,9 @@
  *
  * Adapted from ppc4xx_kgdb.c.
  *
- * Author: Matt Porter <[email protected]>
+ * Author: Matt Porter <[email protected]>
  *
- * 2002-2003 (c) MontaVista Software, Inc.  This file is licensed under
+ * 2002-2004 (c) MontaVista Software, Inc.  This file is licensed under
  * the terms of the GNU General Public License version 2.  This program
  * is licensed "as is" without any warranty of any kind, whether express
  * or implied.
@@ -80,5 +80,7 @@
 gen550_kgdb_map_scc(void)
 {
 	printk(KERN_DEBUG "kgdb init\n");
+	if (ppc_md.early_serial_map)
+		ppc_md.early_serial_map();
 	kgdb_debugport = serial_init(KGDB_PORT, NULL);
 }

===== arch/ppc/syslib/ibm44x_common.c 1.2 vs edited =====

arch/ppc/syslib/ibm44x_common.c +9 -42

84 lines not on this page · raw message

===== include/asm-ppc/machdep.h 1.23 vs edited =====

include/asm-ppc/machdep.h +1 -0
@@ -56,6 +56,7 @@
 	unsigned long	(*find_end_of_memory)(void);
 	void		(*setup_io_mappings)(void);
 
+	void		(*early_serial_map)(void);
   	void		(*progress)(char *, unsigned short);
 	void		(*kgdb_map_scc)(void);