Here is an optimized version of mmc.c.
* Transfer bandwidth is now 850KB/s for WRITE and 450KB/s for READ on my WRT54GSv4@200Mhz + Sandisk 1GB SD.
* Best of all, it let the router usable while doing transfers from/to the card.
* More SD cards are now working, especially >=2GB cards.
* real MMCs should work now.
v1.3.2 binary (old) :
mmc driver v1.3.2 compiled for whiterussian GPIO2 (md5sum: 44dff17b051cae27eafdcb13dce53092)
mmc driver v1.3.2 compiled for whiterussian GPIO5 (md5sum: 854f0743e8fa4f455ede89a2bc1fd0be)
mmc driver v1.3.2 compiled for whiterussian buffalos (md5sum: fb6fbd378951d45c72a0a856ef097316)
v1.3.3 binary (stable) :
mmc driver v1.3.3 compiled for whiterussian GPIO2 (md5sum: fdf5ea0b3baf172e51ec8a7fc7c7be32)
mmc driver v1.3.3 compiled for whiterussian GPIO5 (md5sum: 195d8de0bb8797ff5b59fa04b558f001)
mmc driver v1.3.3 compiled for whiterussian buffalos (md5sum: 5bb6da4b650e5bb68d5d18747239326e)
v1.3.4 binary (current) :
mmc driver v1.3.4 compiled for whiterussian GPIO2 (md5sum: 4fe21d26f688315d5cfe01a94c019a2a)
mmc driver v1.3.4 compiled for whiterussian GPIO5 (md5sum: 0a17362d802ddf8d4d67815847836023)
mmc driver v1.3.4 compiled for whiterussian buffalos (md5sum: 74bffc93d999d8a502dce9589a270432)
* version v1.1: can write at 700KB/s. The trick is to use SPI's multi-block write.
* version v1.1.1: correcting a write bug introduced in v1.1. Sorry. Write speed now 800KB/s !
* version v1.2: introduces read speed at 450KB/s and write speed at 850KB/s.
* version v1.3:
- now uses byte access to gpio control addresses (it was a long word access). Don't know if it can speedup things.
- log functions to support log level/log to a file in the future
- the module param: mp_max_init_tries can now be used to handle cards with long init time (bigger cards tends to have slower init time). Default value: 10000
* version v1.3.1:
- corrections to support 4GB cards. Don't know if it works now cause I dont have such a card. Please test and PM me.
- more SD cards now work : example : my Sandisk Ultra II 512MB didn't work and now is ok.
* version v1.3.2:
- changed all printk to better messages in dmesg
- new parameter that controls the number of clocks being sent to the card to power it on : mp_max_pwr_on_clocks
Default value: 80. You can try to raise it if your card does not init correctly and the message 'card not inited after xxxx tries' is not shown in dmesg.
- default value for parameter mp_max_init_tries is now 20000
- Card ID register is shown in dmesg (code from rcichielo. Thanks)
* version v1.3.3:
- mp_max_init_tries increased to 30000 as users stated that some cards needs such a high number.
- GPIO #defines works again. It is now possible to compile this version to other GPIOs just by changing values in config.h . Generated code is as fast as 1_3_2.
- Contributions (hardware and software) by Marc Denty :
+ his kingston 2GB card now works (maybe others and 4GB - please report)
+ code comments / CID parsing to show card name in dmesg.
* version v1.3.4:
- MMC init backward compatibility (frequency limited to 380KHz). A lot of SD/MMC previously not working will now certainly work.
- MMC CID register parsing. It now shows product serial number, product manufacturer, product name, product version, and product release date in the dmesg.
(Last edited by Cyril on 24 Mar 2007, 23:21)