<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1611" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=317245801-16072008><FONT face=Arial
color=#0000ff size=2>Hi Nguyen,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=317245801-16072008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=317245801-16072008><FONT face=Arial
color=#0000ff size=2>If current PowerPC linux is using the virq to
request_irq,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=317245801-16072008><FONT face=Arial
color=#0000ff size=2>you need do the irq_of_parse_and_map(np, 0) to get the
virq.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=317245801-16072008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=317245801-16072008><FONT face=Arial
color=#0000ff size=2>like.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=317245801-16072008><FONT face=Arial
color=#0000ff size=2>virq = irq_of_parse_and_map(np, 0)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=317245801-16072008><FONT face=Arial
color=#0000ff size=2>request_irq(virq,...);</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=317245801-16072008></SPAN><FONT face=Arial><FONT
color=#0000ff><FONT size=2>H<SPAN class=317245801-16072008>ope it can help
you.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT color=#0000ff><FONT size=2><SPAN
class=317245801-16072008></SPAN></FONT></FONT></FONT><SPAN
class=317245801-16072008></SPAN><FONT face=Arial><FONT color=#0000ff><FONT
size=2>T<SPAN class=317245801-16072008>hanks,</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT color=#0000ff><FONT size=2><SPAN
class=317245801-16072008></SPAN></FONT></FONT></FONT><SPAN
class=317245801-16072008></SPAN><FONT face=Arial><FONT color=#0000ff><FONT
size=2>D<SPAN class=317245801-16072008>ave</SPAN></FONT></FONT></FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
linuxppc-embedded-bounces+daveliu=freescale.com@ozlabs.org
[mailto:linuxppc-embedded-bounces+daveliu=freescale.com@ozlabs.org] <B>On
Behalf Of </B>Duy-Ky Nguyen<BR><B>Sent:</B> 2008年7月16日 8:59 AM<BR><B>To:</B>
linuxppc-embedded@ozlabs.org<BR><B>Subject:</B> Failure of request_irq() for
MPC8313 using arch=powerpc<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I had no problem in using request_irq() for
MPC8272 with arch=ppc from Montavista Linux</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>But I have failure for MPC8313 with arch=powerpc
from FreeScale LTIB Linux with error code -38</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I found its header file mpc83xx.h under
include/asm-ppc, while it's supposed to be under
include/asm-powerpc.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I did try to copy the header file to directory
asm-powerpc</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>From MPC8313 datasheet, I have </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>GPIO_IRQ = 74</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and I use</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>DEVICE_NAME = "ppc"</FONT></DIV>
<DIV><FONT face=Arial size=2>IRQ_FLAG = IRQF_SHARED // use
new flag</FONT></DIV>
<DIV><FONT face=Arial size=2>here my function call</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>request_irq (GPIO_IRQ,</FONT></DIV>
<DIV><FONT face=Arial
size=2> ppc_ISR, </FONT></DIV>
<DIV><FONT face=Arial
size=2> IRQ_FLAG,<BR> DEVICE_NAME, <BR> NULL); <BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I'd appreciate any help on this
problem.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Best Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Duy-Kyng</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2> </DIV></BLOCKQUOTE></FONT></BODY></HTML>