Hi Dirk,

> > This is actually a forward port of the SD/MMC driver from the latest
> > LSP, melded into linux-2.6.23-git.
> 
> Many thanks!
> 
> I had a quick look to it. It applies and compiles cleany. And if it
> works for you, maybe it works for others as well ;)
> 
> This is a big improvement against the driver currently in git, so IMHO
> we should apply it.

Well, I'm not a big fan of the busy waiting that's been introduced on each
request, and I couldn't convince myself that it really was handling
scatter-gather DMA properly (at least not from looking at the code, although
functionally it seems to work). 

Performance-wise, it chews up 100% of the CPU in order to sustain 3MB/s
writes (about 30% of that I think is in the busy-wait loop in
mmc_davinci_request).

I don't understand the driver well enough yet to fix it. (Presumably the
busy-waiting was put there for a reason).

> > --- a/drivers/mmc/host/davinci_mmc.h
> > +++ b/drivers/mmc/host/davinci_mmc.h
> > @@ -132,6 +132,7 @@ #define DAVINCI_MMC_DATADIR_WRITE       2
> >     int power_pin;
> >
> >     int use_dma;
> > +   int do_dma;
> >     struct completion dma_completion;
> 
> Only one thing that confused me: Additionally to use_dma there is now
> do_dma. At some places in the patch use_dma is replaced by do_dma. But
> at some places use_dma is still used and do_dma is used additionally.
> What's the difference between use_dma and do_dma?

AIUI, do_dma indicates whether DMA is being used for the current request (it
only performs DMA for transfers that are multiples of 32-bytes). use_dma is
a global flag to indicate whether or not to use DMA at all.

> Sorry, I'm no MMC/DMA expert.

Neither, which was why it was an RFC patch :)

If Kevin's willing to merge it, great! But I've no doubt that it still need
some work before it goes further.

Best wishes,
Bernard.


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

Reply via email to