<br><br><div class="gmail_quote">On Sat, Jun 19, 2010 at 10:25 PM, John Ogness <span dir="ltr"><<a href="mailto:john.ogness@linutronix.de">john.ogness@linutronix.de</a>></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 <<a href="mailto:s.hauer@pengutronix.de">s.hauer@pengutronix.de</a>> wrote:<br>
>> This patch reverts the driver to enabling/disabling the NFC interrupt<br>
>> mask rather than enabling/disabling the system interrupt. This cleans<br>
>> up the driver so that it doesn't rely on interrupts being disabled<br>
>> within the interrupt handler.<br>
><br>
> This behaviour was introduced in<br>
> a47bfd2eb66837653dc3b42541dfe4283dd41251 mxc_nand: support i.MX21<br>
><br>
> I guess this won'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->irq_waitq,<br>
readw(host->regs + NFC_CONFIG2) &
NFC_INT);<br><br>This behavior is not documented by Freescale (Freescale's (linux 2.4) i.MX21 reference kernel avoid this by always using polling). <br><br>Ivo.<br><br></div></div><br>