Virtex SPI driver - slave select specification
Thomas Doerfler
Thomas.Doerfler at embedded-brains.de
Fri Mar 21 22:30:39 UTC 2008
Hi Robert,
Robert S. Grimes schrieb:
> Hi Thomas,
>
> After being taken off-topic for the past 10 days, I'm back to the SPI
> driver. For my hardware, the FRAM device is one of seven slave devices
> on the SPI bus, and happens to be assigned SS6 (slave select). How do I
> communicate this to the SPI/I2C subsystem?
When you register the device to libi2c, the last parameter of the call
to rtems_libi2c_register_drv is the address of the device on the bus. It
will be merged into the "minor" code for this device. In you case, it
should be 6.
The function that your BSP should provide to select and address will
also get passed the address (6), so you should activate the
corresponding SPI select output.
wkr,
Thomas.
>
> Here is the (relevant) output during test startup:
>
> bsp_register_spi
> virtex_spi_init called...
> virtex_spi_install_irq_handler
> Found /dev/spi.fram device
> name: /dev/spi.fram
> major: 9
> minor: 8192
>
> Opening...
> open returned 4
> Okay, let's try to write...
> fram write
> bsp_spi_send_start_dummy
> virtex_spi_set_tfr_mode
> virtex_spi_char_mode
> bsp_spi_sel_addr: Selecting device 0, mask: FFFFFFFE
>
> Of course, much of this is output from my code, but it isn't terribly
> important. My question revolves around the last line shown; the values
> need to be 6 and FFFFFFBF. How does the driver get this information?
> Is it the minor number of the device (reported earlier as 8192)?
>
> Thanks!
> -Bob
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
--
--------------------------------------------
Embedded Brains GmbH
Thomas Doerfler Obere Lagerstr. 30
D-82178 Puchheim Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18908079-2
Fax: +49-89-18908079-9
More information about the users
mailing list