2008-06-27 15:27:39     SD Card with the SPI Framework driver?

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-06-27 15:27:39     SD Card with the SPI Framework driver?

Frank Van Hooft (CANADA)

Message: 57973   

 

This has been perplexing me for a while now. On a BF537-STAMP board, running 2008R1, we've had the SD Card working fine for months, using the "Blackfin SPI bus directly" option in menuconfig. (The SD Card is the only device on the SPI bus.)

 

However for our next boards we want to add a second device to the SPI bus (a serial flash and associated MTD support) which means, as I understand it, that we must switch to the SPI framework driver.

 

So in preparation for this I enable the SPI driver in menuconfig (Device drivers --> SPI support) and in Device drivers --> MMC/SD card support I select the "SPI Framework master" instead of "Blackfin SPI bus directly".

 

After a rebuild (tried "make clean" even) the SD Card no longer works. Although /dev/spi_mmc is present, this is what we get:

 

root:/> sfdisk -l /dev/spi_mmc

/dev/spi_mmc: No such device

sfdisk: cannot open /dev/spi_mmc for reading

 

root:/> cat /proc/spi_mmc

Driver build date: Jun 27 2008

SCLK: 20000 KHz

SPISEL4 as chip select

Driver: SPI Framework master

No MMC/SD card found.

 

We've tried different chip select numbers as well (leaving the hardware alone - just changing the number in menuconfig).

 

What am I doing wrong?

 

Thanks!

 

 

QuoteReplyEditDelete

 

 

2008-06-27 21:55:24     Re: SD Card with the SPI Framework driver?

Frank Van Hooft (CANADA)

Message: 57976   

 

Might be a hardware problem - we're checking into it. Sorry to post prematurely - normally I try hard to avoid that. Hopefully it'll just be a silly hardware thing.

QuoteReplyEditDelete

 

 

2008-06-28 00:23:25     Re: SD Card with the SPI Framework driver?

Frank Van Hooft (CANADA)

Message: 57978   

 

Wasn't hardware - darn. We've confirmed it (again :-) with another board. We can talk to the SD card fine so long as we don't use the SPI Framework. Once we enable that, tell the MMC/SD driver in menuconfig to use that, we lose the card. /dev/spi_mmc is present, but we cannot access the card. Any ideas what we could be doing wrong?

QuoteReplyEditDelete

 

 

2008-07-01 13:23:34     Re: SD Card with the SPI Framework driver?

Mike Frysinger (UNITED STATES)

Message: 58162   

 

the spi mmc driver requires concurrency and atomic transactions that the SPI framework cannot guarantee

 

there is a tracker item or two open going into detail, but there really isnt a "fixed" driver

 

http://blackfin.uclinux.org/gf/tracker/3991

QuoteReplyEditDelete

 

 

2008-07-02 01:07:35     Re: SD Card with the SPI Framework driver?

Frank Van Hooft (CANADA)

Message: 58174   

 

Thanks Mike. OK, so it's a known bug; we'll find another way.

Attachments

    Outcomes