Re: Re: [H2200-port] MMC/SD now works on h2200

From: Pierre TARDY <ptar01_at_freescale.com>
Date: Mon, 25 Apr 2005 11:43:18 +0200

Hi all,
Koen Kooi wrote:

> Matthew Reimer wrote:
>
>> I just got MMC/SD working on h2200, starting from the DMA driver from
>> the S3C2410 port and the opentom MMC/SD driver. I successfully
>> mounted my ancient 8MB MMC card, played an MP3 from it, copied a file
>> to it and verified its md5dum, and umounted it without error.
>
> Great work!
>
>>
>> As for speed, my lame benchmark ('date; dd if=/dev/mmcblk0
>> of=/dev/null bs=16k; date'), I'm getting about 490KB/s. I'm curious
>> how fast SD cards will be. The driver uses HAMCOP's DMA controller to
>> read the data into HAMCOP's SRAM, and then memcpy (via
>> dma_unmap_sg()) to its final destination, so it should be pretty
>> fast. If I'm understanding the PXA/HAMCOP configuration correctly, it
>> may be possible to use PXA's DMA to copy from SRAM to SDRAM; would
>> that be worthwhile? I suppose it would free up the processor some.
>
>
> DMA is almost always worthwhile, but I remember Pierre saying that it
> won't matter much. He wrote a dma and a non-dma driver for samcop a
> while ago for Freescale. He couldn't publish the sources, but he could
> say dma was slightly faster.

Hmm, I can't say DMA is faster, AFAIK, it is often the case. Here, it
will certainly be slower. The fact is that you have to setup the hamcop
dma first to transfer a little amount of memory to samcop's internal
sram, then you have to setup the PXA dma to transfer from hamcop sram to
PXA sdram. If you had done this with PXA polling, you would have done
only one memory access and would not have been delayed by interrupt
latencies.
Then, the fact is that in polling mode, the PXA wont have enough time to
play the mp3, cause it will be waiting for SDIO transfer all the time..

I only know the samcop from h5400, but I can say you wont gain much by
using DMA from sram to sdram. It is always a little transfer (the sram
is not very big, and shared with USB). I ve done some bench with a quite
slow sdcard and all the time was spend from sdhc to sram, the other
transfer is negligible. Then setting up dma transfer from sram to sdram
will add you several synchronisations problem ( you set up PXA dma,
while hamcop dma is transfering the next block, etc..)
I ve always been disapointed by sdcards performances, but I had even
less perfs with WinCE, so..

best regards,

-- 
Pierre Tardy
Received on Mon Apr 25 2005 - 05:47:07 EDT

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:20:11 EDT