Hi, Shawn Guo writes: > Hi Lothar, > > On Wed, Feb 09, 2011 at 08:46:18AM +0100, Lothar WaÃmann wrote: > > Hi Shawn, > > > > Shawn Guo writes: > > > This adds the mmc host driver for Freescale MXS-based SoC i.MX23/28. > > > The driver calls into mxs-dma via generic dmaengine api for both pio > > > and data transfer. > > > > > > Signed-off-by: Shawn Guo <shawn.guo@xxxxxxxxxxxxx> > > > --- > > > arch/arm/mach-mxs/include/mach/mmc.h | 15 + > > > drivers/mmc/host/Kconfig | 9 + > > > drivers/mmc/host/Makefile | 1 + > > > drivers/mmc/host/mxs-mmc.c | 884 ++++++++++++++++++++++++++++++++++ > > > 4 files changed, 909 insertions(+), 0 deletions(-) > > > create mode 100644 arch/arm/mach-mxs/include/mach/mmc.h > > > create mode 100644 drivers/mmc/host/mxs-mmc.c > > > > > I've run the mmc-test kernel module with this driver on our TX28 > > module which fails in the following tests: > > |mmc0: Test case 15. Correct xfer_size at write (start failure)... > > |mmc0: Result: ERROR (-110) > > |mmc0: Test case 16. Correct xfer_size at read (start failure)... > > |mmc0: Result: ERROR (-110) > > |mmc0: Test case 17. Correct xfer_size at write (midway failure)... > > |mmc0: Result: ERROR (-110) > > |mmc0: Test case 18. Correct xfer_size at read (midway failure)... > > |mmc0: Result: ERROR (-110) > > > > Could you try the test on your hardware? > > > I'm new to this test. I enabled MMC_TEST but did not see "test" > under /sys for mmc. Can you please elaborate how to launch this > test? Thanks. > You need debugfs mounted and the mmc-test module loaded. An inserted card will normally be grabbed by the mmc-block driver. You can 'unbind' the driver and 'bind' it to the mmc-test driver using the corresponding entries in sysfs. The mmc-test driver can be controlled via debugfs. The following script steals an inserted card from the mmc-block driver and performs all mmc-test testcases (TRASHING THE CONTENTS OF THE CARD!). <-------- #!/bin/bash drv_path=/sys/bus/mmc/drivers dbg_path=/sys/kernel/debug testdrv=mmc_test shopt -s nullglob card="" cleanup() { if [ -n "$card" -a -n "$driver" -a "$driver" != "$testdrv" ];then echo "Restoring driver $driver" echo "$card" > "$drv_path/$testdrv/unbind" echo "$card" > "$drv_path/$driver/bind" fi } trap cleanup 0 set -e cd "$drv_path" for d in *;do for l in "$d/"*;do [ -h "$l" ] || continue card="$(basename "$l")" driver="$(dirname "$l")" break done [ -n "$card" ] && break done if [ -z "$card" ];then echo "No MMC/SD card found" exit 1 fi if [ "$driver" != "$testdrv" ];then echo "Trying to claim card $card from driver $driver" echo "$card" > "$drv_path/$driver/unbind" echo "$card" > "$drv_path/$testdrv/bind" fi echo "WARNING: Card $card will be overwritten!" echo "Hit <ENTER> to continue; <CTRL-C> to abort" read # perform all testcases (> 0 for individual tests) echo 0 > "$dbg_path/${card%:*}/$card/test" >-------- Lothar WaÃmann -- ___________________________________________________________ Ka-Ro electronics GmbH | PascalstraÃe 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 GeschÃftsfÃhrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | info@xxxxxxxxxxxxxxxxxxx ___________________________________________________________ -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html