<br><br><div class="gmail_quote">On Sat, Jun 19, 2010 at 10:25 PM, John Ogness <span dir="ltr">&lt;<a href="mailto:john.ogness@linutronix.de">john.ogness@linutronix.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 2010-06-18, Sascha Hauer &lt;<a href="mailto:s.hauer@pengutronix.de">s.hauer@pengutronix.de</a>&gt; wrote:<br>
&gt;&gt; This patch reverts the driver to enabling/disabling the NFC interrupt<br>
&gt;&gt; mask rather than enabling/disabling the system interrupt. This cleans<br>
&gt;&gt; up the driver so that it doesn&#39;t rely on interrupts being disabled<br>
&gt;&gt; within the interrupt handler.<br>
&gt;<br>
&gt; This behaviour was introduced in<br>
&gt; a47bfd2eb66837653dc3b42541dfe4283dd41251 mxc_nand: support i.MX21<br>
&gt;<br>
&gt; I guess this won&#39;t work on i.MX21.<br>
<br>
</div>I just downloaded the i.MX21 reference manual and its NFC interrupts can<br>
also be masked with INT_MASK (bit 4) of NFC_Flash_Config1 (0xdf003e1a).<br>
<br>
IMHO we should revert the driver to masking the NFC interrupts. The<br>
current linux-next version with nosync irq disabling within the<br>
interrupt handler is a bit silly. Especially since the interrupt handler<br>
does nothing except signal a wait queue.<br>
<font color="#888888"><br>
John Ogness<br></font></blockquote><div><br>Yes, on i.MX21, NFC interrupts can be masked using NFC_CONFIG1:NFC_INT_MSK. But I observed that as long as NFC_INT_MSK is set, NFC_CONFIG2:NFC_INT will always read out 0 on i.MX21, even if the operation is completed.<br>
<br>So the driver will remain stuck at:<br>
<br>
                        wait_event(host-&gt;irq_waitq,<br>
                                readw(host-&gt;regs + NFC_CONFIG2) &amp;
 NFC_INT);<br><br>This behavior is not documented by Freescale (Freescale&#39;s (linux 2.4) i.MX21 reference kernel avoid this by always using polling).  <br><br>Ivo.<br><br></div></div><br>