linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Frank Svendsbøe" <frank.svendsboe@gmail.com>
To: Scott Wood <scottwood@freescale.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
	Daniel Ng <daniel.ng1234@gmail.com>,
	Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
Subject: Re: MPC8272- Porting HDLC driver from 2.6.14 to 2.6.27- "no_irq_chip" error
Date: Sat, 30 May 2009 22:22:08 +0200	[thread overview]
Message-ID: <1ba63b520905301322n72fa165ds7e2eb3af4475f109@mail.gmail.com> (raw)
In-Reply-To: <20090529171835.GB22066@b07421-ec1.am.freescale.net>

On Fri, May 29, 2009 at 7:18 PM, Scott Wood <scottwood@freescale.com> wrote=
:
> On Fri, May 29, 2009 at 12:56:13PM +0200, Frank Svendsb=F8e wrote:
>> FYI. The same applies to mpc8xx targets: No default host interrupt contr=
oller.
>> The following patch was needed for our target:
>> ---
>> diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8=
xx_pic.c
>> index 5d2d552..92b2b66 100644
>> --- a/arch/powerpc/sysdev/mpc8xx_pic.c
>> +++ b/arch/powerpc/sysdev/mpc8xx_pic.c
>> @@ -186,6 +186,7 @@ int mpc8xx_pic_init(void)
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ret =3D -ENOMEM;
>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto out;
>> =A0 =A0 =A0 =A0 }
>> + =A0 =A0 =A0 =A0irq_set_default_host(mpc8xx_pic_host);
>> =A0 =A0 =A0 =A0 return 0;
>
> This patch is whitespace mangled.
>
>>
>> =A0out:
>> ---
>> Maybe setting a default host ought to be mandatory? Or is doing the
>> mapping manually
>> (without device tree descriptions) considered being a hack?
>
> I consider it a hack -- not so much doing it manually (though the device
> tree is better), but relying on a default interrupt controller when doing
> so. =A0IRQ numbers only make sense in the context of a specific
> controller. =A0It's especially misleading on 8xx, which has separate
> regular and CPM PICs.
>
> -Scott
>

I agree, and was the reason I mentioned "hack". The patch wasn't meant
for commit,
just for reference (sorry for whitemangling ;-)

Regarding doing manual mapping: Is there another way to retrieve the
host controller
from a driver module without modifying kernel source? In case not, do you t=
hink
exporting the mpc8xx_pic_host symbol is a better solution?

Anyway, now that I'm beginning to understand dts I guess I might as
well just do it properly.

- Frank

  reply	other threads:[~2009-05-30 20:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28  7:37 MPC8272- Porting HDLC driver from 2.6.14 to 2.6.27- "no_irq_chip" error Daniel Ng
2009-05-28 10:33 ` Norbert van Bolhuis
2009-05-28 12:33   ` Wolfram Sang
2009-05-29  0:46     ` Daniel Ng
2009-05-29  8:31       ` [PATCH] powerpc/cpm2: make cpm2_pic the default host Wolfram Sang
2009-05-29 10:56     ` MPC8272- Porting HDLC driver from 2.6.14 to 2.6.27- "no_irq_chip" error Frank Svendsbøe
2009-05-29 17:18       ` Scott Wood
2009-05-30 20:22         ` Frank Svendsbøe [this message]
2009-06-02  0:48           ` Benjamin Herrenschmidt
2009-06-02  0:47     ` Benjamin Herrenschmidt
2009-06-02  4:38       ` Wolfram Sang
2009-06-02  4:42         ` Benjamin Herrenschmidt
2009-06-02  0:46   ` Benjamin Herrenschmidt

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=1ba63b520905301322n72fa165ds7e2eb3af4475f109@mail.gmail.com \
    --to=frank.svendsboe@gmail.com \
    --cc=daniel.ng1234@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=nvbolhuis@aimvalley.nl \
    --cc=scottwood@freescale.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).