[OpenBIOS] r406 - in openbios-devel: arch/ppc/qemu drivers

svn at openbios.org svn at openbios.org
Tue Jan 13 21:24:52 CET 2009


Author: laurent
Date: 2009-01-13 21:24:52 +0100 (Tue, 13 Jan 2009)
New Revision: 406

Modified:
   openbios-devel/arch/ppc/qemu/init.c
   openbios-devel/drivers/escc.c
Log:
CONFIG_SERIAL_PORT to 0 select ch-a (0x20 offset), other value select ch-b (0x00 offset). Idea from Blue Swirl

Modified: openbios-devel/arch/ppc/qemu/init.c
===================================================================
--- openbios-devel/arch/ppc/qemu/init.c	2009-01-13 20:07:43 UTC (rev 405)
+++ openbios-devel/arch/ppc/qemu/init.c	2009-01-13 20:24:52 UTC (rev 406)
@@ -148,7 +148,7 @@
 
 	isa_io_base = arch->io_base;
 
-	uart_init(0x80013000ULL + CONFIG_SERIAL_PORT * 0x20,
+	uart_init(0x80013000ULL + (CONFIG_SERIAL_PORT ? 0 : 0x20),
 		  CONFIG_SERIAL_SPEED);
 
 	printk("\n");

Modified: openbios-devel/drivers/escc.c
===================================================================
--- openbios-devel/drivers/escc.c	2009-01-13 20:07:43 UTC (rev 405)
+++ openbios-devel/drivers/escc.c	2009-01-13 20:24:52 UTC (rev 406)
@@ -443,6 +443,6 @@
     escc_add_channel(buf, "b", addr, 0);
 
     serial_dev = (unsigned char *)addr + IO_ESCC_OFFSET +
-                 0x20 * CONFIG_SERIAL_PORT;
+                 (CONFIG_SERIAL_PORT ? 0 : 0x20);
 }
 #endif




More information about the OpenBIOS mailing list