[#3902] spi_mmc bug
Submitted By: Phil Wilshire
2008-02-17 01:01:42 Close Date
Closed Fixed In Release:
Found In Release:
BF537 Silicon Revision:
Is this bug repeatable?:
Out of Date
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
Summary: spi_mmc bug
spi_mmc_core.c sets the speed to SPI_CLOCK_MAX_HZ and not SPI_CLOCK_INIT_HZ
As a result the spi_mmc system does not seem to want to work.
Resetting it to SPI_CLOCK_INIT_HZ seems to make things work a little better.
Trivial Patch Attached
--- Vivi Li 2008-02-17 23:25:45
Now we are testing spi mmc with spi frame work and speed is set to
SPI_CLOCK_MAX_HZ. It works here.
Could you give a detailed process to reproduce your bug? Or your config file?
--- Phil Wilshire 2008-02-29 06:30:08
The BF537 STAMP V1.3 with a Rubico SD card adaptor failed to detect
any of my 1G cards
(kodak, polariod, and brand X ?? ).
I do not have the actual board running at the moment so I cannot give you more
Resetting the speed to SPI_CLOCK_INIT_HZ make the system detect the cards
(This is Probably a different bug)
In order to detect the card change I had to remove and re install the module
(It looks like PF5 was being held low and could not act as a card detect).
TO test this we also need to consider a test set up with concurrent aceess to
another device on the spi bus.
This would high light the major SPI-MMC problem we still have today.
NOte that work is going on to resolve this particular problem.
--- Graf Yang 2008-03-06 00:02:16
We tried 512M MMC (Transend, Kingmax, Kingstone), 256M SD (two SanDisk cards),
1G SD (Transend), 2G SD (Transcend). All these cards can be detected, and we
needn't remove/reinstall spi_mmc module. We use latest trunk code and a Rubico
When make menuconfig, I selected MMC/SD card support --> MMC/SD for SPI
support and choiced the "SPI driver (SPI framework master)". I tried
seting the SPI clock to 400K and 20M HZ, both are OK.
As I have not such environment that with several devices concurrent access the
SPI bus, I can't duplicate the issue -- PF5 was being held low and could not act
as a card detect, at this moment.
--- Hans Eklund 2008-03-06 03:01:54
Yes. As phil pointed out the concurrency problem goes deep into the spi
framework and the spi_mmc driver needs to be rewritten slightly. Whenever a
"fix" is found I will try to incorporate it into the mainline mmc_spi
driver(another driver). I pointed out that issue earlier and can be found as a
I will post information there.
File Name File Type File Size Posted By
spi_mmc_2008r1.patch text/x-patch 472 Phil Wilshire