linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/pmac: Fix internal modem IRQ on Wallstreet PowerBook
@ 2009-03-31  3:34 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2009-03-31  3:34 UTC (permalink / raw)
  To: linuxppc-dev

The (relatively) new pmac_zilog driver doesn't use the pre-munged
IRQ numbers from the macio_dev unlike other macio things, it
directly maps it off the OF device-tree.

It does that because it can be initialized much earlier than the
registration of the macio devices, in order to get a serial
console early.

Unfortunately, that means that it "misses" some fixups done
by the macio layer to work around missing interrupt descriptions
in the device-tree of the Wallstreet machines.

This patch brings the necessary workaround into the pmac_zilog
driver itself to bring it back to working condition.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---


 drivers/serial/pmac_zilog.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

--- linux-work.orig/drivers/serial/pmac_zilog.c	2009-03-31 14:15:13.000000000 +1100
+++ linux-work/drivers/serial/pmac_zilog.c	2009-03-31 14:31:34.000000000 +1100
@@ -1538,6 +1538,21 @@ no_dma:
 	uap->port.type = PORT_PMAC_ZILOG;
 	uap->port.flags = 0;
 
+	/*
+	 * Fixup for the port on Gatwick for which the device-tree has
+	 * missing interrupts. Normally, the macio_dev would contain
+	 * fixed up interrupt info, but we use the device-tree directly
+	 * here due to early probing so we need the fixup too.
+	 */
+	if (uap->port.irq == NO_IRQ &&
+	    np->parent && np->parent->parent &&
+	    of_device_is_compatible(np->parent->parent, "gatwick")) {
+		/* IRQs on gatwick are offset by 64 */
+		uap->port.irq = irq_create_mapping(NULL, 64 + 15);
+		uap->tx_dma_irq = irq_create_mapping(NULL, 64 + 4);
+		uap->rx_dma_irq = irq_create_mapping(NULL, 64 + 5);
+	}
+
 	/* Setup some valid baud rate information in the register
 	 * shadows so we don't write crap there before baud rate is
 	 * first initialized.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-31  3:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-31  3:34 [PATCH] powerpc/pmac: Fix internal modem IRQ on Wallstreet PowerBook Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).