SPI low level driver for Virtex

Robert S. Grimes rsg at alum.mit.edu
Fri Feb 22 22:21:06 UTC 2008


Thomas Doerfler wrote:
>> Okay, I'm starting by grabbing the updated libi2c, which probably is 
>> straightforward enough.
>>
>> Then, I copied the "real" 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.

Right!

>
>> 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.
>
I think I already figured that out, but thanks for the confirmation.

>>
>> 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.

Thanks for the tip!

>
>>> 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...)

Okay, thanks!  I do like those Ramtron FRAM chips!

Have a great weekend.
-Bob
>
> wkr,
> Thomas.
>
>
>>
>> Thanks,
>> -Bob
>
>




More information about the users mailing list