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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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
_______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded