2011-05-25 05:09:09     SD card at Asynchronous Memory Interface

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

2011-05-25 05:09:09     SD card at Asynchronous Memory Interface

Morten Kvistgaard (DENMARK)

Message: 100830   

 

Hello there,

 

We seek a driver for SD cards atttached to the Asynchronous Memory Interface. (Memory Bank 3) (We use a custom BF526 ezbrd, if it makes a difference.)

 

It's the last approach in the Analog doc, if in doubt:

 

  www.analog.com/static/imported-files/application_notes/EE335_rev1.pdf

 

Performance is not an issue, so the 1-bit protocol will be fine. Any driver implementing the 1-bit or 4-bit protocol will be of interest. PPI-drivers are also of interest. (Seeing that they also implement the 1-bit and/or 4-bit.)

 

 

 

Anyone knows of such? I cannot seem to find any.

QuoteReplyEditDelete

 

 

2011-05-25 07:55:51     Re: SD card at Asynchronous Memory Interface

Mike Frysinger (UNITED STATES)

Message: 100833   

 

i'm not aware of any driver being written for Linux like this

QuoteReplyEditDelete

 

 

2011-06-14 07:49:55     Re: SD card at Asynchronous Memory Interface

Morten Kvistgaard (DENMARK)

Message: 101252   

 

Btw, we've now successfully implemented the above driver.

 

It wasn't that difficult actually.

QuoteReplyEditDelete

 

 

2011-06-14 11:57:58     Re: SD card at Asynchronous Memory Interface

Mike Frysinger (UNITED STATES)

Message: 101255   

 

would you post it to the forums for us/others to see ?

QuoteReplyEditDelete

 

 

2011-06-15 03:21:07     Re: SD card at Asynchronous Memory Interface

Morten Kvistgaard (DENMARK)

Message: 101275   

 

Sure.

 

Beware though that it's still a very experimental and untrimmed version. (I suspect that the read delays are too long among others.)

 

mmc_mem_async.c

QuoteReplyEditDelete

 

 

2011-06-16 23:46:34     Re: SD card at Asynchronous Memory Interface

Mike Frysinger (UNITED STATES)

Message: 101329   

 

yes, this needs work, but i think we can look at getting it merged.  but we dont have hardware atm, so it'll probably be hard to test.

 

random thoughts:

- use platform_driver_register and not platform_driver_probe

- the platform resources should declare IORESOURCE_MEM for the region rather than hardcoding ASYNC_BANK3_BASE

- use inw()/outw()/mmiowb() instead of bfin_{read,write}16/SSYNC() ... the former are designed for the async bank while the latter might not work correctly if interrupted

- style obviously needs changing to LKML:

    - "if (" and not "if("

    - "if (...) {" and not "if (...)\n{"

    - wrap long lines

QuoteReplyEditDelete

 

 

2011-06-17 02:53:52     Re: SD card at Asynchronous Memory Interface

Morten Kvistgaard (DENMARK)

Message: 101336   

 

Nice, thank you,

 

I'll bear that in mind when we take it up again.

QuoteReplyEditDelete

 

 

2011-07-07 18:20:55     Re: SD card at Asynchronous Memory Interface

Mike Frysinger (UNITED STATES)

Message: 102222   

 

forgive my ignorance when it comes to SD, but would the sdhci.c / sdhci-pltfm.c code work for you ?

Attachments

Outcomes