<HTML dir=ltr><HEAD><TITLE>Re: [PATCH] MTD: atmel_nand: Add DMA support to access Nandflash</TITLE>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT size=5 face="Courier New">Hi Ryan,</FONT></o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><o:p><FONT size=5 face="Courier New"></FONT></o:p></SPAN> </P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><o:p><FONT size=5 face="Courier New">Thanks for your careful review.</FONT></o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><o:p> </o:p></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> -----Original Message-----</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> From: Ryan Mallon [mailto:ryan@bluewatersys.com]</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> Sent: Tuesday, January 18, 2011 11:08 AM</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> To: Xu, Hong</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> Cc: linux-mtd@lists.infradead.org; linux-arm-kernel@lists.infradead.org;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> linux-kernel@vger.kernel.org; jamie@jamieiles.com; jacmet@sunsite.dk;</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> Ferre, Nicolas</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> Subject: Re: [PATCH] MTD: atmel_nand: Add DMA support to access Nandflash</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> </FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> On 01/18/2011 03:56 PM, Hong Xu wrote:</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> > Some SAM9 chips have the ability to perform DMA between CPU and SMC</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> controller.</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> > This patch adds DMA support for SAM9RL, SAM9G45, SSAM9G46,AM9M10, SAM9M11.</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> ></FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> > Signed-off-by: Hong Xu <hong.xu@atmel.com></FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> </FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> Couple more notes below. I think the normal exit path for</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> atmel_nand_dma_op needs to call dma_unmap_single. The other suggestions</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> below are just stylistic.</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> </FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> Also, you still need a change to Kconfig to add the dependency on the</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> AT_HDMAC driver otherwise users without that option selected will get</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> build errors.</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">> </FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New"></FONT></SPAN> </P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">Not all SAM9 chips have AT_HDMAC. I tried building the system successfully without</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">AT_HDMAC and even without DMADEVICES :-)</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New"></FONT></SPAN> </P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">A new patch will be sent soon regarding to your other comments.</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New"></FONT></SPAN> </P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">BR,</FONT></SPAN></P>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoPlainText><SPAN lang=EN-US><FONT size=5 face="Courier New">Hong</FONT></SPAN></P></BODY></HTML>