MPC8272- Porting HDLC driver from 2.6.14 to 2.6.27- "no_irq_chip" error

Frank Svendsbøe frank.svendsboe at gmail.com
Sun May 31 06:22:08 EST 2009


On Fri, May 29, 2009 at 7:18 PM, Scott Wood <scottwood at freescale.com> wrote:
> On Fri, May 29, 2009 at 12:56:13PM +0200, Frank Svendsbře wrote:
>> FYI. The same applies to mpc8xx targets: No default host interrupt controller.
>> The following patch was needed for our target:
>> ---
>> diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_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)
>>                 ret = -ENOMEM;
>>                 goto out;
>>         }
>> +        irq_set_default_host(mpc8xx_pic_host);
>>         return 0;
>
> This patch is whitespace mangled.
>
>>
>>  out:
>> ---
>> 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.  IRQ numbers only make sense in the context of a specific
> controller.  It'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 think
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



More information about the Linuxppc-dev mailing list