[PATCH] pmac_zilog: initialize port spinlock on all init paths

From: David Eger
Date: Mon Jul 12 2004 - 19:40:47 EST


Dear Ben,

This patch fixes the Zilog driver so it doesn't freak on my TiBook.

( of course, it still spews diahrea of 'IN from bad port XXXXXXXX'
but then, I don't have the hardware.... still, seems weird that OF
would report that I do have said hardware :-/ )

Please look it over and send it on.

-dte

pmac_zilog: initialize the serial ports' spinlocks even if console over
serial is not enabled; disable this driver by default for ppc

This lock not being initialized was Oopsing my TiBook :-P

Signed-off-by: David Eger <eger@xxxxxxxxxxxxx>

diff -Nru a/arch/ppc/defconfig b/arch/ppc/defconfig
--- a/arch/ppc/defconfig 2004-07-13 02:30:37 +02:00
+++ b/arch/ppc/defconfig 2004-07-13 02:30:37 +02:00
@@ -689,7 +689,7 @@
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
@@ -724,8 +724,8 @@
#
# Non-8250 serial port support
#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_PMACZILOG=y
+# CONFIG_SERIAL_CORE is not set
+# CONFIG_SERIAL_PMACZILOG is not set
# CONFIG_SERIAL_PMACZILOG_CONSOLE is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
diff -Nru a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
--- a/drivers/serial/pmac_zilog.c 2004-07-13 02:30:37 +02:00
+++ b/drivers/serial/pmac_zilog.c 2004-07-13 02:30:37 +02:00
@@ -1490,6 +1490,7 @@
uap->port.ops = &pmz_pops;
uap->port.type = PORT_PMAC_ZILOG;
uap->port.flags = 0;
+ spin_lock_init(&uap->port.lock);

/* Setup some valid baud rate information in the register
* shadows so we don't write crap there before baud rate is
@@ -1985,8 +1986,6 @@
/* Probe ports */
pmz_probe();

-#ifdef CONFIG_SERIAL_PMACZILOG_CONSOLE
-#endif
/* TODO: Autoprobe console based on OF */
/* pmz_console.index = i; */
register_console(&pmz_console);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/