mmc/sd driver testing.

Luiz Otavio O Souza lists.br at gmail.com
Thu Apr 16 22:32:06 UTC 2015


On 16 April 2015 at 18:41, Alexander Fedorov wrote:
> Hello!
>
> If it helps, I've updated my patch to CURRENT r281599.
>
> These are the changes from the previous version:
> - Style fixes, suggested by Ian.
> - Speed improovment (reading from 2 MB/s to 5-6 MB/s, writing from 0.8
> to 1.5 MB/s).
> - Use bus_space_write_multi_4/bus_space_read_multi_4 for large blocks.
> - Multiblock I/O support.

I did a few changes to your driver and now I need some help with
testing (I have tested only on Cubieboard2 so far).

The changes include:

 - better error handling on mmc_acquire_host();
 - Removed the busy loops from interrupt handler;
 - Use PLL6 as the clock source for MMC/SD (from netbsd);
 - Simplified interrupt handling - always unmasked and enabled (from netbsd);
 - Style(9) fixes.

Please, try it and report if you find a bug, they are certainly there!

Luiz

http://loos.com.br/allwinner/a10_mmc.diff
http://loos.com.br/allwinner/files.allwinner.diff
http://loos.com.br/allwinner/kernel-conf.diff
http://loos.com.br/allwinner/sunxi-dts.diff

>
> Some simple tests:

# dd if=/dev/mmcsd0s2 of=/dev/null bs=32k count=4k
4096+0 records in
4096+0 records out
134217728 bytes transferred in 9.150424 secs (14667924 bytes/sec)

# dd if=/dev/zero of=test bs=16k count=1k
1024+0 records in
1024+0 records out
16777216 bytes transferred in 3.984687 secs (4210423 bytes/sec)


>
> ### Read test ####
> # dd if=/dev/mmcsd0s2 of=/dev/null bs=4k count=4k
> 4096+0 records in
> 4096+0 records out
> 16777216 bytes transferred in 4.438201 secs (3780184 bytes/sec)
> root@:~ # dd if=/dev/mmcsd0s2 of=/dev/null bs=8k count=4k
> 4096+0 records in
> 4096+0 records out
> 33554432 bytes transferred in 5.514032 secs (6085281 bytes/sec)
> root@:~ # dd if=/dev/mmcsd0s2 of=/dev/null bs=16k count=4k
> 4096+0 records in
> 4096+0 records out
> 67108864 bytes transferred in 10.341467 secs (6489299 bytes/sec)
> root@:~ # dd if=/dev/mmcsd0s2 of=/dev/null bs=32k count=4k
> 4096+0 records in
> 4096+0 records out
> 134217728 bytes transferred in 19.956929 secs (6725370 bytes/sec)
> root@:~ #
>
> ### Write test ####
> root@:~ # dd if=/dev/zero of=test bs=8k count=4k
> 4096+0 records in
> 4096+0 records out
> 33554432 bytes transferred in 21.556914 secs (1556551 bytes/sec)
> root@:~ # dd if=/dev/zero of=test bs=32k count=1k
> 1024+0 records in
> 1024+0 records out
> 33554432 bytes transferred in 26.035960 secs (1288773 bytes/sec)
> root@:~ # dd if=/dev/zero of=test bs=4k count=1k
> 1024+0 records in
> 1024+0 records out
> 4194304 bytes transferred in 4.173082 secs (1005085 bytes/sec)
> root@:~ # rm test
> root@:~ # dd if=/dev/zero of=test bs=16k count=1k
> 1024+0 records in
> 1024+0 records out
> 16777216 bytes transferred in 8.148621 secs (2058902 bytes/sec)
> root@:~ #
>


More information about the freebsd-arm mailing list