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

2009-06-01 Thread Benjamin Herrenschmidt
On Tue, 2009-06-02 at 06:38 +0200, Wolfram Sang wrote: > I fully agree that the proper way is using the device tree. I can't recall > exactly why this wasn't an option to me a year ago, but I assume it had > something to do with this ugly out-of-tree-driver. I wouldn't really argue > about this pat

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

2009-06-01 Thread Wolfram Sang
> I would object that you wouldn't have this problem if you weren't hard > wiring your interrupt number and were using the device-tree properly > instead. As to getting your patch merged, you'll have to argue with > Scott Wood who, I think, maintains the CPM2 stuff lately. I fully agree that the p

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

2009-06-01 Thread Benjamin Herrenschmidt
On Sat, 2009-05-30 at 22:22 +0200, Frank Svendsbøe wrote: > 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? > > An

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

2009-06-01 Thread Benjamin Herrenschmidt
On Thu, 2009-05-28 at 14:33 +0200, Wolfram Sang wrote: > > this is an example of how a simple 8313 Periodic Interval Timer (PIT) > > kernel driver > > registers for the PIT IRQ (Interrupt ID 65) > > > > #define PIT_IRQ 65 > > > > virq = irq_create_mapping(NULL, PIT_IRQ); > > set_irq_type(v

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

2009-06-01 Thread Benjamin Herrenschmidt
> > #define PIT_IRQ 65 In addition, the interrupt should be provided by the device-tree of course, in which case a single function will look it up for you -and- do the appropriate mapping. Cheers, Ben. > virq = irq_create_mapping(NULL, PIT_IRQ); > set_irq_type(virq, IRQ_TYPE_LEVEL_LO

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

2009-05-30 Thread Frank Svendsbøe
On Fri, May 29, 2009 at 7:18 PM, Scott Wood 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/m

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

2009-05-29 Thread Scott Wood
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 5d2d

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

2009-05-29 Thread Frank Svendsbøe
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/

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

2009-05-28 Thread Daniel Ng
On Thu, May 28, 2009 at 10:33 PM, Wolfram Sang wrote: >> this is an example of how a simple 8313 Periodic Interval Timer (PIT) kernel >> driver >> registers for the PIT IRQ (Interrupt ID 65) >> >> #define PIT_IRQ 65 >> >> virq = irq_create_mapping(NULL, PIT_IRQ); >> set_irq_type(virq, IRQ

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

2009-05-28 Thread Wolfram Sang
> this is an example of how a simple 8313 Periodic Interval Timer (PIT) kernel > driver > registers for the PIT IRQ (Interrupt ID 65) > > #define PIT_IRQ 65 > > virq = irq_create_mapping(NULL, PIT_IRQ); > set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); > > if(request_irq(virq, (irq_handler_t)t

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

2009-05-28 Thread Norbert van Bolhuis
Hi Daniel, "Ethos" driver... hmm. sounds familiar! (good to hear that it is still used in active development) About your question. Since almost 2 years (kernel 2.6.22 from july 2007) the rule is that you can't directly map a hardware irq number because the powerpc kernel keeps a mapping between

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

2009-05-28 Thread Daniel Ng
Hi, I'm attempting to port our Ethos HDLC driver from 2.6.14 to 2.6.27, on a MPC8272-based platform. So far, the kernel crashes when the driver tries to open (see below). It seems that the interrupt handler fails to register, with the following condition in setup_irq() in manage.c: desc->chip =