I have found the solution to the problem. The Davinci SD/MMC document "sprue30b.pdf" states that DCLR( b15 ) bit in MMCCMD(command) register should be set for every read and write command. But in case of write command you have to fill Fifo before writing command, and when one writes to command register with DCLR set after filling FIFO it causes two bytes kick off from FIFO (Might be from shift register). So initial two bytes are not written for the write data transaction. One can avoid this by not setting the DCLR bit in data write command and do it before the writing command i.e. in status checking command. The said document should be corrected to reflect correct behaviour.
regards, Sarfraz Ahmed ----- Original Message ---- From: Sarfraz Ahmed <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: [email protected] Sent: Wednesday, July 11, 2007 8:24:44 PM Subject: Re: Davinci SD/MMC FAT corruption Hi, Ivan, Thanks for replying. I have used non-cached memory for EDMA. EDMA has some issue with cache but I am not looking into that matter right now. Currently I am trying to run driver for Davinci MMC/SD controller in Interrupt and polling mode using uncached memory. Do respond If you have solution for either of problems. Thanks in advance. Sarfraz ----- Original Message ---- From: Ivan Tonchev <[EMAIL PROTECTED]> To: Sarfraz Ahmed <[EMAIL PROTECTED]> Cc: [email protected] Sent: Wednesday, July 11, 2007 2:14:34 PM Subject: Re: Davinci SD/MMC FAT corruption Hi Sarfraz, Are you sure your EDMA part has no Cache issues? Check out this thread: http://linux.omap.com/pipermail/linux-omap-open-source/2005-June/004349.html BR, Ivan Sarfraz Ahmed wrote: > Hi, > I am writting the driver for SD/MMC from scratch. I have been > able to run and test the driver using EDMA based reads and writes > but when I use CPU based read/write (Interrupt and polling) , > reading data works fine but writing something e.g. create > directory, file write, delete operations etc. causes FAT corruption. The > file system is FAT32 and I have tested with MMC and SD cards and > found same problem with both types of cards. I have also varified procedures > for CPU > based reading and writing from "sprue30b.pdf" document. I am using > Davinci DM6446 EVM. > > can anybody help me out? > > > regards, > Sarfraz > > > > ____________________________________________________________________________________ > Need a vacation? Get great deals > to amazing places on Yahoo! Travel. > http://travel.yahoo.com/ > _______________________________________________ > Davinci-linux-open-source mailing list > [email protected] > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source > ____________________________________________________________________________________ Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. http://mobile.yahoo.com/go?refer=1GNXIC ____________________________________________________________________________________ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
