> On Wednesday 25 February 2009, Kumar, Purushotam wrote:
> > I tried with both iowrite8_32_align_rep and directly
> > calling iowrite32_rep but none of these work properly
> > when I tested with SD card in PIO mode after removing
> > asm code.
> 
> Did you try just using iowrite8_rep()?  If that doesn't
> work, there's something pretty strange going on.
Yes, I have used just iowrite8_rep() and also tried with incrementing buffer 
pointer (p) latter by n which was not done in the original patch. I had some 
crazy observation. MMC card has been detected if I add any printk statement 
before iowrite8_rep. In the absence of printk before, card was not even 
detected. I am not sure whether MMC FIFO will allow reading 1 bytes at time 
when ACCWD is set 4 bytes. This might be reason why I am facing issue.

Another point, in the case of DMA mode, only SCR register 8 bytes are read in 
PIO mode and latter it uses DMA for all operation. iowrite8_rep() was 
successful when 8 bytes was read in PIO mode when use_dma is set to 1.

So, in case  buffer being read/write is not multiple of 4 bytes, readl/writel 
will be used for reading part of buffer which is multiple of 3 and remaining 
bytes( 1 to 3) will be read/write using ioread8_rep /iowrite8_rep. In this case 
it should support SDIO also.

I will submit patch for this today.
 
> > It has failed to mount. In stead of using either
> > iowrite8_32_align_rep or iowrite32_rep, I wrote directly
> > to MMCDRR and MMCDXR in the PIO mode and it has worked properly.
> 
> That's pretty much what iowrite32_rep() will do.
> 
> (What's iowrite8_32_align_rep ??)
> 
> The problem is that you're assuming the buffer being
> written is a multiple of 4 bytes.  I'm fairly sure
> that's not guaranteed ... e.g. SDIO can write any
> number of bytes, and even some MMC/SD operations
> will do so.  (I just checked ... providing a 16-byte
> password uses an 18-byte block; that's an example.)
> 
> 
> > I will submit this as patch in next 1-2 days. This also
> > assumes that it will work if access width is 4 bytes.
> > I feel there is no point in spending time for making
> > generic enough so that it will support all access width
> > in the PIO mode.
> 
> Right, which is why I had suggested iowrite8_rep(),
> annd ioread8_rep().
> 
> - Dave

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to