From: Andrew Morton <akpm@linux-foundation.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Alan Curry <pacman@theworld.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: Pegasos keyboard detection
Date: Thu, 26 Jul 2007 18:48:00 -0700 [thread overview]
Message-ID: <20070726184800.0bb3b9fb.akpm@linux-foundation.org> (raw)
In-Reply-To: <1185347565.5439.310.camel@localhost.localdomain>
On Wed, 25 Jul 2007 17:12:45 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Tue, 2007-07-24 at 21:28 -0400, Alan Curry wrote:
> > As of 2.6.22 the kernel doesn't recognize the i8042 keyboard/mouse controller
> > on the PegasosPPC. This is because of a feature/bug in the OF device tree:
> > the "device_type" attribute is an empty string instead of "8042" as the
> > kernel expects. This patch (against 2.6.22.1) adds a secondary detection
> > which looks for a device whose *name* is "8042" if there is no device whose
> > *type* is "8042".
> >
> > Signed-off-by: Alan Curry <pacman@world.std.com>
>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
> Note, if there's a volunteer, we could probably turn that code into a
> nice table lookup.
Did this get merged, or otherwise fixed? Even though the code in there has
changed quite a bit, it looks to my untrained eye like the fix is still
applicable?
From: Alan Curry <pacman@TheWorld.com>
As of 2.6.22 the kernel doesn't recognize the i8042 keyboard/mouse
controller on the PegasosPPC. This is because of a feature/bug in the OF
device tree: the "device_type" attribute is an empty string instead of
"8042" as the kernel expects. This patch (against 2.6.22.1) adds a
secondary detection which looks for a device whose *name* is "8042" if
there is no device whose *type* is "8042".
Signed-off-by: Alan Curry <pacman@world.std.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/kernel/setup-common.c | 6 ++++++
1 file changed, 6 insertions(+)
diff -puN /dev/null /dev/null
diff -puN arch/powerpc/kernel/setup-common.c~powerpc-pegasos-keyboard-detection arch/powerpc/kernel/setup-common.c
--- a/arch/powerpc/kernel/setup-common.c~powerpc-pegasos-keyboard-detection
+++ a/arch/powerpc/kernel/setup-common.c
@@ -496,6 +496,12 @@ int check_legacy_ioport(unsigned long ba
break;
}
np = of_find_node_by_type(NULL, "8042");
+ /*
+ * Pegasos has no device_type on its 8042 node, look for the
+ * name instead
+ */
+ if (!np)
+ np = of_find_node_by_name(NULL, "8042");
break;
case FDC_BASE: /* FDC1 */
np = of_find_node_by_type(NULL, "fdc");
_
And ALan says that 2.6.22 is bust, but this patch no won't apply there so
if we want to fix 2.6.22.x then Alan's original patch would be needed.
next prev parent reply other threads:[~2007-07-27 1:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200707230616.l6N6GaPg1212004@shell01.TheWorld.com>
2007-07-25 1:28 ` [PATCH] powerpc: Pegasos keyboard detection Alan Curry
2007-07-25 6:22 ` Benjamin Herrenschmidt
2007-07-25 6:45 ` Alan Curry
2007-07-25 7:12 ` Benjamin Herrenschmidt
2007-07-27 1:48 ` Andrew Morton [this message]
2007-07-27 3:00 ` Benjamin Herrenschmidt
2007-07-27 4:22 ` Andrew Morton
2007-07-27 4:48 ` Alan Curry
2007-07-27 7:15 ` Benjamin Herrenschmidt
2007-07-31 21:26 ` Segher Boessenkool
2007-08-01 7:25 ` Matt Sealey
2007-08-01 7:28 ` Matt Sealey
2007-08-02 4:40 ` Alan Curry
2007-08-06 18:45 ` Segher Boessenkool
2007-08-06 21:40 ` Matt Sealey
2007-08-06 21:57 ` Segher Boessenkool
2007-08-07 16:21 ` Matt Sealey
2007-08-09 16:30 ` Segher Boessenkool
2007-08-09 16:46 ` Matt Sealey
2007-08-07 4:16 ` Alan Curry
2007-08-07 16:27 ` Matt Sealey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070726184800.0bb3b9fb.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=pacman@theworld.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).