Mercurial > hg > aboriginal
annotate sources/patches/linux-revertppcserial.patch @ 979:88b354c0eee1
Tweak mercurial repo entry and add link to current snapshot.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 16 Feb 2010 06:57:14 -0600 |
parents | e6fd6f4fe67d |
children |
rev | line source |
---|---|
951
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
1 It seems that in qemu, we can see an interrupt in R3 despite the |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
2 fact that it's masked in W1. The chip doesn't actually issue an |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
3 interrupt, but we can "see" it when taking an interrupt for the |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
4 other channel. This may be a qemu bug ... or not, so let's be |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
5 safe and avoid calling into the UART layer when that happens which |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
6 woulc cause a crash. |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
7 |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
8 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
9 --- |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
10 |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
11 David: This would affect sunzilog as well I believe. I'm not sure |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
12 if it's a bug in qemu emulation of the ESCC or if a real ESCC can |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
13 show it so I decided to be safe :-) The ESCC doc I have doesn't |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
14 appear to specify whether the interrupt status bits in R3 are |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
15 prior or post masking by W1. I can reproduce that by having the |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
16 kernel low level "udbg" debug console on channel B and the main |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
17 console on channel A (which is itself an uncommon setup). |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
18 |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
19 diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
20 index 0700cd1..683e66f 100644 |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
21 --- a/drivers/serial/pmac_zilog.c |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
22 +++ b/drivers/serial/pmac_zilog.c |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
23 @@ -411,6 +411,17 @@ static void pmz_transmit_chars(struct uart_pmac_port *uap) |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
24 goto ack_tx_int; |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
25 } |
857
eee8e9fcb1dd
Fix powerpc target to work with current qemu release. (The g3beige target switched around to more closely match hardware, so needed new kernel config. This meant it was using a serial driver broken in the kernel, so revert patch that broke it.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
26 |
951
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
27 + /* Under some circumstances, we see interrupts reported for |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
28 + * a closed channel. The interrupt mask in R1 is clear, but |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
29 + * R3 still signals the interrupts and we see them when taking |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
30 + * an interrupt for the other channel (this could be a qemu |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
31 + * bug but since the ESCC doc doesn't specify precsiely whether |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
32 + * R3 interrup status bits are masked by R1 interrupt enable |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
33 + * bits, better safe than sorry). --BenH. |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
34 + */ |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
35 + if (!ZS_IS_OPEN(uap)) |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
36 + goto ack_tx_int; |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
37 + |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
38 if (uap->port.x_char) { |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
39 uap->flags |= PMACZILOG_FLAG_TX_ACTIVE; |
e6fd6f4fe67d
Improved zilog serial fix from the ppc guys.
Rob Landley <rob@landley.net>
parents:
923
diff
changeset
|
40 write_zsdata(uap, uap->port.x_char); |