SPI low level driver for Virtex

Thomas Doerfler Thomas.Doerfler at embedded-brains.de
Fri Feb 22 19:35:12 UTC 2008


Robert,

Robert S. Grimes schrieb:
> Hi Thomas,
> 
> How was the skiing?!

oh, what a question it seems SOOOOO long ago, sigh.

But it was fantastic. We really had a very nice week together and the 
kids used the available WLAN more often than I :-)
>>   
> Okay, I'm starting by grabbing the updated libi2c, which probably is 
> straightforward enough.
> 
> Then, I copied the "read" driver from libcpu/mpc83xx/spi and 
> libbsp/powerpc/gen83xx into libbsp/powerpc/virtex/spi.  Next I will 
> adapt these files for the Virtex 4 chip. This shouldn't be too hard, 
> what with an RTEMS driver example and the Xilinx programming example to 
> work from.

right, the most difficult thing might be to not get confused with the 
slightly unusual names of some SPI driver functions. Remember: I2C was 
there first, therefore some SPI function names are derived from the I2C 
stuff.

> 
> I'm almost certainly going to need help with the automake stuff.  Should 
> I just diff before and after your SPI additions, and try to recreate?

- in cpukit/*, automake should already be fine.

- for libchip, if you pulled the more or less current version from CVS, 
things should be fine aswell (hopefully you do not merge Makefile.am 
from different CVS versions, this MIGHT cause trouble)

- for the virtex BSP: You will have to add the spi driver in a similar 
way as the spi (spi_init) stuff in libbsp/powerpc/gen83xx. If you grep 
for spi (and SPI) there, you should find the relevant portions.

> 
> And I'm not sure what I will need to do to build the thing.  Will I just 
> type make, or do I need to run configure first?  (I have previously 
> specified --enable-maintainer-mode, if that helps).  If I do have to 
> configure, can (and how can) I run it just on the libbsp/powerpc/virtex 
> tree?

Enabling the "maintainer-mode" should do most of the stuff. In the past, 
some "preinstall.am" files (responsible to copy header files and stuff 
in place) were not always regenerated, if neccesary, so it might be 
usefull to run "../../../bootstrap -p" in your BSP directory.

>> The EEPROM driver has more or less a standard rtems driver API.
>>   
> I'm going to adapt the same approach here - copy, rename, and edit.  I'm 
> not sure (again) how I get it built - another reconfig?

The same applies here.

By the way: You wrote you would need a driver for a SPI Ramtron memory. 
I actually "virtualized" the spi-flash*.c driver to be adaptable to 
memory devices with similar interface, I already use it for a FM24L256. 
So I would recommend to write the the ADC driver first, and wait 'til I 
can update the CVS...)

wkr,
Thomas.


> 
> Thanks,
> -Bob


-- 
--------------------------------------------
embedded brains GmbH
Thomas Doerfler           Obere Lagerstr. 30
D-82178 Puchheim          Germany
Tel. : +49-89-18 90 80 79-2
Fax  : +49-89-18 90 80 79-9
email: Thomas.Doerfler at embedded-brains.de
PGP public key available on request

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list