Point to sample SPI for MMC card driver?

Robert S. Grimes rsg at alum.mit.edu
Wed Oct 15 18:50:13 UTC 2008

Gene Smith wrote:
> I noticed that Robert S. Grimes seems to have finished his SPI driver 
> and he started with something in vertex BSP. The threads he started have 
> a lot of good information in them. Also, the README_libi2c is probably 
> the best and most thorough I have seen in RTEMS.
Yes, README_libi2c is very thorough; there were several times that, upon 
re-reading it, I understood things even better...

> I am looking for some code to use as a starting point for writing my SPI 
> driver, which does not correspond to any existing BSP. I see that often 
> the SPI driver is divided between libcpu and libbsp. 
Yes - the reasons being explained in earlier posting by Thomas Doerfler 
and, of course, the README_libi2c.

> However, I probably would want to put all the low level stuff in just my libbsp if possible. I found something under libbsp/m68k/gen68360/spi that appears to be the 
> complete driver(s) (files m360_spi.c and mc68360_spidrv.c). Would these be OK to use as a template? Or should I look somewhere else for a better example?
Sorry, can't help you here, but you do want to be fairly current.  The 
libi2c SPI support has matured somewhat since I started (around 4.8), 
and if you want to use the spi-sd-card driver, you'll need to make sure 
you're based on at least 4.9 libi2c.  In particular, you'll want to 
support the idle_char field of the transfer parameters structure 
rtems_libi2c_tfr_mode_t.  See my latest posts regarding "Card Specific 

FWIW - I started with the powerpc/mpc5566evb SPI driver, as Sebastian 
suggested - I think you know the thread...

Take care,

P.S. Feel free to ask questions - it's still pretty fresh in my mind...

> Thanks,
> -gene
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users

More information about the users mailing list