* Failure of request_irq() for MPC8313 using arch=powerpc
@ 2008-07-16 0:58 Duy-Ky Nguyen
2008-07-16 2:09 ` Liu Dave
0 siblings, 1 reply; 5+ messages in thread
From: Duy-Ky Nguyen @ 2008-07-16 0:58 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]
Hello,
I had no problem in using request_irq() for MPC8272 with arch=ppc from Montavista Linux
But I have failure for MPC8313 with arch=powerpc from FreeScale LTIB Linux with error code -38
I found its header file mpc83xx.h under include/asm-ppc, while it's supposed to be under include/asm-powerpc.
I did try to copy the header file to directory asm-powerpc
>From MPC8313 datasheet, I have
GPIO_IRQ = 74
and I use
DEVICE_NAME = "ppc"
IRQ_FLAG = IRQF_SHARED // use new flag
here my function call
request_irq (GPIO_IRQ,
ppc_ISR,
IRQ_FLAG,
DEVICE_NAME,
NULL);
I'd appreciate any help on this problem.
Best Regards,
Duy-Kyng
[-- Attachment #2: Type: text/html, Size: 2511 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: Failure of request_irq() for MPC8313 using arch=powerpc 2008-07-16 0:58 Failure of request_irq() for MPC8313 using arch=powerpc Duy-Ky Nguyen @ 2008-07-16 2:09 ` Liu Dave 2008-07-16 3:43 ` Duy-Ky Nguyen 0 siblings, 1 reply; 5+ messages in thread From: Liu Dave @ 2008-07-16 2:09 UTC (permalink / raw) To: Duy-Ky Nguyen, linuxppc-embedded [-- Attachment #1: Type: text/plain, Size: 1335 bytes --] Hi Nguyen, If current PowerPC linux is using the virq to request_irq, you need do the irq_of_parse_and_map(np, 0) to get the virq. like. virq = irq_of_parse_and_map(np, 0) request_irq(virq,...); Hope it can help you. Thanks, Dave ________________________________ From: linuxppc-embedded-bounces+daveliu=freescale.com@ozlabs.org [mailto:linuxppc-embedded-bounces+daveliu=freescale.com@ozlabs.org] On Behalf Of Duy-Ky Nguyen Sent: 2008?7?16? 8:59 AM To: linuxppc-embedded@ozlabs.org Subject: Failure of request_irq() for MPC8313 using arch=powerpc Hello, I had no problem in using request_irq() for MPC8272 with arch=ppc from Montavista Linux But I have failure for MPC8313 with arch=powerpc from FreeScale LTIB Linux with error code -38 I found its header file mpc83xx.h under include/asm-ppc, while it's supposed to be under include/asm-powerpc. I did try to copy the header file to directory asm-powerpc From MPC8313 datasheet, I have GPIO_IRQ = 74 and I use DEVICE_NAME = "ppc" IRQ_FLAG = IRQF_SHARED // use new flag here my function call request_irq (GPIO_IRQ, ppc_ISR, IRQ_FLAG, DEVICE_NAME, NULL); I'd appreciate any help on this problem. Best Regards, Duy-Kyng [-- Attachment #2: Type: text/html, Size: 5122 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Failure of request_irq() for MPC8313 using arch=powerpc 2008-07-16 2:09 ` Liu Dave @ 2008-07-16 3:43 ` Duy-Ky Nguyen 2008-07-22 17:55 ` Scott Wood 0 siblings, 1 reply; 5+ messages in thread From: Duy-Ky Nguyen @ 2008-07-16 3:43 UTC (permalink / raw) To: Liu Dave, linuxppc-embedded [-- Attachment #1: Type: text/plain, Size: 3292 bytes --] Hi Dave, I've just tried it and it failed. Before I had tried using the function int virq = of_irq_to_resource(GPIO_IRQ, 0, NULL); and it failed the same way I call request_irq() in the operation init and open, it behaves the same I greatky appreciate your help, Dave. Best Regards, Duy-Ky ////////////////////////////////////////////////////////////////////////// // Start of capture Unable to handle kernel paging request for data at address 0x0000005e Faulting instruction address: 0xc000d1e8 Oops: Kernel access of bad area, sig: 11 [#1] Modules linked in: ppc_drv NIP: C000D1E8 LR: C000D274 CTR: C0006088 REGS: c7883d20 TRAP: 0300 Not tainted (2.6.20) MSR: 00009032 <EE,ME,IR,DR> CR: 22000448 XER: 00000000 DAR: 0000005E, DSISR: 20000000 TASK = c053a810[767] 'rrgg' THREAD: c7882000 GPR00: C000D274 C7883DD0 C053A810 0000004A C0282BA8 C7883E08 C7FD9440 C0273EEC GPR08: 00000000 00000000 00000100 C0006088 22000448 10018D00 07FFD000 28000422 GPR16: 10090000 100B0000 100B7328 00000000 00000000 00000000 100C8968 100C89A8 GPR24: 100BDFE8 00000000 00000000 C7FD9440 FFFFFFEA C7883E08 C0282BA8 0000004A Call Trace: [C7883DD0] [C7FD5EE8] (unreliable) [C7883DF0] [C000D274] [C7883E00] [C0009FC8] [C7883E30] [C000609C] [C7883E60] [C9072030] [C7883E70] [C0063E5C] [C7883EA0] [C005FFAC] [C7883EC0] [C0060244] [C7883F20] [C00602B8] [C7883F40] [C000F540] --- Exception: c01Instruction dump: 409effc8 80030024 900b0020 4e800020 7d800026 9421ffe0 7c0802a6 bfa10014 7c9e2378 7cbd2b78 91810010 90010024 <83e30014> 2f9f0000 419e0028 2e050000 Segmentation fault // End of Capture ----- Original Message ----- From: Liu Dave To: Duy-Ky Nguyen ; linuxppc-embedded@ozlabs.org Sent: Tuesday, July 15, 2008 7:09 PM Subject: RE: Failure of request_irq() for MPC8313 using arch=powerpc Hi Nguyen, If current PowerPC linux is using the virq to request_irq, you need do the irq_of_parse_and_map(np, 0) to get the virq. like. virq = irq_of_parse_and_map(np, 0) request_irq(virq,...); Hope it can help you. Thanks, Dave ---------------------------------------------------------------------------- From: linuxppc-embedded-bounces+daveliu=freescale.com@ozlabs.org [mailto:linuxppc-embedded-bounces+daveliu=freescale.com@ozlabs.org] On Behalf Of Duy-Ky Nguyen Sent: 2008年7月16日 8:59 AM To: linuxppc-embedded@ozlabs.org Subject: Failure of request_irq() for MPC8313 using arch=powerpc Hello, I had no problem in using request_irq() for MPC8272 with arch=ppc from Montavista Linux But I have failure for MPC8313 with arch=powerpc from FreeScale LTIB Linux with error code -38 I found its header file mpc83xx.h under include/asm-ppc, while it's supposed to be under include/asm-powerpc. I did try to copy the header file to directory asm-powerpc From MPC8313 datasheet, I have GPIO_IRQ = 74 and I use DEVICE_NAME = "ppc" IRQ_FLAG = IRQF_SHARED // use new flag here my function call request_irq (GPIO_IRQ, ppc_ISR, IRQ_FLAG, DEVICE_NAME, NULL); I'd appreciate any help on this problem. Best Regards, Duy-Kyng [-- Attachment #2: Type: text/html, Size: 9137 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Failure of request_irq() for MPC8313 using arch=powerpc 2008-07-16 3:43 ` Duy-Ky Nguyen @ 2008-07-22 17:55 ` Scott Wood 2008-07-23 1:54 ` Duy-Ky Nguyen 0 siblings, 1 reply; 5+ messages in thread From: Scott Wood @ 2008-07-22 17:55 UTC (permalink / raw) To: Duy-Ky Nguyen; +Cc: Liu Dave, linuxppc-embedded On Tue, Jul 15, 2008 at 08:43:59PM -0700, Duy-Ky Nguyen wrote: > Hi Dave, > > I've just tried it and it failed. Could you elaborate on exactly what you tried? Did you pass the GPIO device tree node? > Before I had tried using the function > int virq = of_irq_to_resource(GPIO_IRQ, 0, NULL); > and it failed the same way The first argument of of_irq_to_resource is a device node pointer, not an IRQ number. Surely the compiler warned you about this. -Scott ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Failure of request_irq() for MPC8313 using arch=powerpc 2008-07-22 17:55 ` Scott Wood @ 2008-07-23 1:54 ` Duy-Ky Nguyen 0 siblings, 0 replies; 5+ messages in thread From: Duy-Ky Nguyen @ 2008-07-23 1:54 UTC (permalink / raw) To: Scott Wood; +Cc: Liu Dave, linuxppc-embedded Hello Scott, I forgot to mention that I have less error if I use the existing device node "spi" in the DTS file # Start of error capture Got device node from device tree Got Virtual IRQ PPC : interrupt hook failed (-22) # End of capture So it's able to access the device node and to map "virq" while I had total failure in using "gpio" I put into DTS I must make mistake in creating the node "gpio" in the DTS file I'm using FreeScale Eva board MPC8313ERDB Thanks, Duy-Ky ----- Original Message ----- From: "Scott Wood" <scottwood@freescale.com> To: "Duy-Ky Nguyen" <duykynguyen@hotmail.com> Cc: "Liu Dave" <DaveLiu@freescale.com>; <linuxppc-embedded@ozlabs.org> Sent: Tuesday, July 22, 2008 10:55 AM Subject: Re: Failure of request_irq() for MPC8313 using arch=powerpc > On Tue, Jul 15, 2008 at 08:43:59PM -0700, Duy-Ky Nguyen wrote: >> Hi Dave, >> >> I've just tried it and it failed. > > Could you elaborate on exactly what you tried? Did you pass the GPIO > device > tree node? > >> Before I had tried using the function >> int virq = of_irq_to_resource(GPIO_IRQ, 0, NULL); >> and it failed the same way > > The first argument of of_irq_to_resource is a device node pointer, not an > IRQ number. Surely the compiler warned you about this. > > -Scott > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-23 1:54 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-16 0:58 Failure of request_irq() for MPC8313 using arch=powerpc Duy-Ky Nguyen 2008-07-16 2:09 ` Liu Dave 2008-07-16 3:43 ` Duy-Ky Nguyen 2008-07-22 17:55 ` Scott Wood 2008-07-23 1:54 ` Duy-Ky Nguyen
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).