This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / ppc / syslib / ppc4xx_setup.c
index 5385e76..735f3ae 100644 (file)
@@ -42,8 +42,6 @@
 #include <asm/pci-bridge.h>
 #include <asm/bootinfo.h>
 
-#include <syslib/gen550.h>
-
 /* Function Prototypes */
 extern void abort(void);
 extern void ppc4xx_find_bridges(void);
@@ -58,16 +56,8 @@ bd_t __res;
 void __init
 ppc4xx_setup_arch(void)
 {
-#if !defined(CONFIG_BDI_SWITCH)
-       /*
-        * The Abatron BDI JTAG debugger does not tolerate others
-        * mucking with the debug registers.
-        */
-        mtspr(SPRN_DBCR0, (DBCR0_IDM));
-       mtspr(SPRN_DBSR, 0xffffffff);
-#endif
-
        /* Setup PCI host bridges */
+
 #ifdef CONFIG_PCI
        ppc4xx_find_bridges();
 #endif
@@ -199,6 +189,34 @@ ppc4xx_calibrate_decr(void)
        /* Set the PIT reload value and just let it run. */
        mtspr(SPRN_PIT, tb_ticks_per_jiffy);
 }
+#ifdef CONFIG_SERIAL_TEXT_DEBUG
+
+/* We assume that the UART has already been initialized by the
+   firmware or the boot loader */
+static void
+serial_putc(u8 * com_port, unsigned char c)
+{
+       while ((readb(com_port + (UART_LSR)) & UART_LSR_THRE) == 0) ;
+       writeb(c, com_port);
+}
+
+static void
+ppc4xx_progress(char *s, unsigned short hex)
+{
+       char c;
+#ifdef SERIAL_DEBUG_IO_BASE
+       u8 *com_port = (u8 *) SERIAL_DEBUG_IO_BASE;
+
+       while ((c = *s++) != '\0') {
+               serial_putc(com_port, c);
+       }
+       serial_putc(com_port, '\r');
+       serial_putc(com_port, '\n');
+#else
+       printk("%s\r\n");
+#endif
+}
+#endif                         /* CONFIG_SERIAL_TEXT_DEBUG */
 
 /*
  * IDE stuff.
@@ -301,9 +319,13 @@ ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.setup_io_mappings = ppc4xx_map_io;
 
 #ifdef CONFIG_SERIAL_TEXT_DEBUG
-       ppc_md.progress = gen550_progress;
+       ppc_md.progress = ppc4xx_progress;
 #endif
 
+/*
+**   m8xx_setup.c, prep_setup.c use
+**     defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
+*/
 #if defined(CONFIG_PCI) && defined(CONFIG_IDE)
        ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports;
 #endif /* defined(CONFIG_PCI) && defined(CONFIG_IDE) */