On Thu, 2007-07-12 at 08:03 +0200, S. Fricke wrote:
> How should I proceed?
> 
> Do I have to write a SPI Master Controller Driver for the 5200 first (or I
> use mpc52xx_psc_spi) and than a specific device driver for my FPGA?

I think yes, if this the spi master for you platform.

> that exactly will this master driver "export" to the specific device driver
> for my FPGA?  I cannot figure out, after registering the master driver how
> to "bind" the device driver to the master.

Master driver exports spi_transfer, spi_setup etc APIs to the spi
subsystem, which the spi subsystem will use to export spi_sync,
spi_async, and similar APIs to spi protocol drivers.

So the overall picture is 
                                        
           |----->|__________|-------------->|________________________| 
Spi master |      | Spi core |               |Spi device/protocol drv |
           |<-----|__________|<--------------|________________________|

For your spi_device to be paired with a particular master, you need to
register using a spi_board_info_register call, so that, the
spi_sync/asnyc calls from the driver gets transferred to the
corresponding spi master driver. Generally device-master area paired
comparing "name" fields of spi_board_info and spi_master structures
registered with spi subsystem.

cheers,
sandeep



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to