[#3902] spi_mmc bug
Submitted By: Phil Wilshire
Open Date
2008-02-17 01:01:42 Close Date
2009-03-02 05:45:53
Priority:
Medium Assignee:
Graf Yang
Status:
Closed Fixed In Release:
N/A
Found In Release:
snaps Release:
2008r1
Category:
N/A Board:
STAMP
Processor:
BF537 Silicon Revision:
0.2
Is this bug repeatable?:
Yes Resolution:
Out of Date
Uboot version or rev.:
Toolchain version or rev.:
2008r1
App binary format:
N/A
Summary: spi_mmc bug
Details:
Hi
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
Phil Wilshire
Follow-ups
--- 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
Hi Vivi,
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
details.
Resetting the speed to SPI_CLOCK_INIT_HZ make the system detect the cards
initially.
(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.
Thanks
Phil
--- 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
SD adaptor.
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
tracker:
blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_id=141&tracker_item_id=3713
I will post information there.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
spi_mmc_2008r1.patch text/x-patch 472 Phil Wilshire