From: Gabriel Paubert <paubert@iram.es>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: pacman@kosh.dhis.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: Pegasos i8042 broken again
Date: Tue, 5 Apr 2011 00:49:22 +0200 [thread overview]
Message-ID: <20110404224922.GB8564@iram.es> (raw)
In-Reply-To: <1301956130.2549.93.camel@pasglop>
On Tue, Apr 05, 2011 at 08:28:50AM +1000, Benjamin Herrenschmidt wrote:
>
> > Ok, I got fed up about it. The patch referred above is obviously wrong since
> > it leaves interrupts at 0 when a device_type or name of 8042 is found,
> > so what about the following?
> >
> > I can ship it with a signed-off-by and proper comments a bit later if people agree.
> >
> > Compiled and tested, otherwise I couldn't even type this message :-)
>
> Shouldn't that be a pegasos specific quirk in chrp/setup.c ?
In this case I don't think so:
1) The code looks for the pnp id for the 8042 controllers and tries
to fill the interrupt fields from OF/DT, but falls back to defaults
1 and 12 if it does not get them.
2) Then it tries to find device_type of 8042 or node name of 8042
and returns success if it finds them, but in this case leaves
the interrupt numbers at zero. Note that in this case the code does
not even attempt to get interrupt information from OF/DT, this looks
like a fallback case where filling with defaults seems reasonable.
Actually, it is not filling with defaults which seems wrong since
the other case always provides interrupt information.
Regards,
Gabriel
> >
> > diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> > index 9d4882a..06865ac 100644
> > --- a/arch/powerpc/kernel/setup-common.c
> > +++ b/arch/powerpc/kernel/setup-common.c
> > @@ -599,6 +599,10 @@ int check_legacy_ioport(unsigned long base_port)
> > * name instead */
> > if (!np)
> > np = of_find_node_by_name(NULL, "8042");
> > + if (np) {
> > + of_i8042_kbd_irq = 1;
> > + of_i8042_aux_irq = 12;
> > + }
> > break;
> > case FDC_BASE: /* FDC1 */
> > np = of_find_node_by_type(NULL, "fdc");
>
next prev parent reply other threads:[~2011-04-04 22:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-10 1:37 Pegasos i8042 broken again pacman
2010-10-10 7:35 ` Benjamin Herrenschmidt
2010-10-10 12:26 ` Gerhard Pircher
2010-10-10 17:32 ` pacman
2011-04-04 22:26 ` Gabriel Paubert
2011-04-04 22:28 ` Benjamin Herrenschmidt
2011-04-04 22:49 ` Gabriel Paubert [this message]
2011-04-04 23:02 ` pacman
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=20110404224922.GB8564@iram.es \
--to=paubert@iram.es \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=pacman@kosh.dhis.org \
/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).