2010-11-30 03:28:36     SD Card Over SPI

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

2010-11-30 03:28:36     SD Card Over SPI

Eric Toh (SINGAPORE)

Message: 96329   

 

Hi,

 

As my SDIO was already used by wifi, I need my SD Card to work over SPI. I was following the guide on this link   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:spi_mmc&s[]=sd&s[]=card.

 

However, I m not sure on how to Add SPI device configure in bfin_spi_board_info[] structure in board file. After I follow exact on what is stated there, when I do 'make clean' follow by make, it keep showing me that there are lots of missing function undefined.

 

I need detailed help here on how to Add SPI device configure in bfin_spi_board_info[] structure in board file.

 

Fyi, I m using bf518f processor. Thanks.

 

Regards,

 

Eric

QuoteReplyEditDelete

 

 

2010-11-30 14:30:35     Re: SD Card Over SPI

Mike Frysinger (UNITED STATES)

Message: 96339   

 

you'll need to post the actual errors you're seeing.  the documentation should be up to date.

 

also, what version of software exactly are you using ?  post your kernel .config too.

QuoteReplyEditDelete

 

 

2010-12-10 01:48:48     Re: SD Card Over SPI

Eric Toh (SINGAPORE)

Message: 96602   

 

Hi,

 

Sorry for late reply, was busy with other things and just got back to work on this again.

 

Think I made some mistake previously when copying the stuff from bf537 stamp.c file, currently I m able to compile without any error. I have set the chip select to PF7 & interrupt to PH4. However, after boot up, this is what i get

 

[snip]

 

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

 

bfin-spi bfin-spi.0: cs7 >= max 5

 

bfin-spi bfin-spi.0:SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

 

bfin-spi bfin-spi.0:SPI Controller Driver, Version 1.0, regs_base@ffc03400, dma channel@5

 

[snip]

 

From the guide, I guess I m expecting to see the following two lines, but unfortunately I don't see any.

 

mmc_spi spi0.4: ASSUMING 3.2-3.4 V slot power

mmc_spi spi0.4: SD/MMC host mmc0, no DMA, no WP, no poweroff

 

Where did I go wrong? Is there anything else that I have miss out? Please help, thanks in advance.

 

 

 

Regards,

 

Eric

QuoteReplyEditDelete

 

 

2010-12-10 01:53:53     Re: SD Card Over SPI

Mike Frysinger (UNITED STATES)

Message: 96603   

 

you need to fix this first:

bfin-spi bfin-spi.0: cs7 >= max 5

 

set the max field of the bfin-spi.0 platform resources to a higher value.  like MAX_BLACKFIN_GPIOS + MAX_CTRL_CS.

QuoteReplyEditDelete

 

 

2010-12-16 05:27:07     Re: SD Card Over SPI

Eric Toh (SINGAPORE)

Message: 96807   

 

Hi,

 

Yes, problem resolved. It's now working. Thanks a lot!

 

Regards,

 

Eric

Attachments

    Outcomes