[parisc-linux-cvs] linux-2.5 tausq

Randolph Chung Randolph Chung <randolph@tausq.org>
Mon, 2 Sep 2002 00:04:38 -0700


> Log message:
> drivers/serial/8250_pci.c
> drivers/serial/core.c
> fix some typos in core.c so pci serial gets detected properly
> HACK for pci serial support

the core.c changes has also been sent to upstream...

comments on the serial console hack are welcome... it's obviously
not a good solution :-( just carrying forward what we had before.

tested on a500

Index: drivers/serial/8250_pci.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/serial/8250_pci.c,v
retrieving revision 1.2
diff -u -p -r1.2 8250_pci.c
--- drivers/serial/8250_pci.c	30 Aug 2002 19:59:58 -0000	1.2
+++ drivers/serial/8250_pci.c	2 Sep 2002 06:54:36 -0000
@@ -1186,7 +1186,14 @@ static struct pci_driver serial_pci_driv
 
 static int __init serial8250_pci_init(void)
 {
-	return pci_module_init(&serial_pci_driver);
+	int ret;
+	ret = pci_module_init(&serial_pci_driver);
+
+#if defined(__hppa__) && defined(CONFIG_SERIAL_8250_CONSOLE)
+	serial8250_console_init();
+#endif
+
+	return ret;
 }
 
 static void __exit serial8250_pci_exit(void)
Index: drivers/serial/core.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/serial/core.c,v
retrieving revision 1.2
diff -u -p -r1.2 core.c
--- drivers/serial/core.c	30 Aug 2002 19:59:59 -0000	1.2
+++ drivers/serial/core.c	2 Sep 2002 06:54:36 -0000
@@ -1860,8 +1860,13 @@ void __init uart_console_init(void)
 	sa1100_rs_console_init();
 #endif
 #ifdef CONFIG_SERIAL_8250_CONSOLE
+	/* HACK: this hack (together with stuff in 8250_pci.c
+	 * are needed to get pci serial console working 
+	 */
+#ifndef __hppa__
 	serial8250_console_init();
 #endif
+#endif
 #ifdef CONFIG_SERIAL_UART00_CONSOLE
 	uart00_console_init();
 #endif
@@ -1990,7 +1995,7 @@ uart_report_port(struct uart_driver *drv
 		printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6);
 		break;
 	case UPIO_MEM:
-		printk("MMIO 0x%lx", port->mapbase);
+		printk("MMIO 0x%lx", port->membase);
 		break;
 	}
 	printk(" (irq = %d) is a %s\n", port->irq, uart_type(port));
@@ -2012,7 +2017,7 @@ __uart_register_port(struct uart_driver 
 	/*
 	 * If there isn't a port here, don't do anything further.
 	 */
-	if (!port->iobase && !port->mapbase)
+	if (!port->iobase && !port->membase)
 		return;
 
 	/*

--  
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/