If you're writing a driver I thought you have to link your device with the spi-device in your probe function. So there would be no need for a /dev/spi.
I also wanted to write a driver for my devices but didn't find the time yet. Maybe things can be taken from drivers like rtc-rs5c348.c or from a spi-flash driver. Currently I'm still using spidev and therefore have devices in /dev for user access. (http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/current/msg00016.html)
Carsten.
De: owner-microblaze-uclinux@xxxxxxxxxxxxxx [mailto:owner-microblaze-uclinux@xxxxxxxxxxxxxx] En nombre de Matt Staniszewski
Enviado el: lunes, 23 de febrero de 2009 9:47
Para: microblaze-uclinux@xxxxxxxxxxxxxx
Asunto: Re: [microblaze-uclinux] Adding SPI Driver causes Kernel to Hang
I found the functions listed in xspi_ioctl.h. I tried to write a sample script similar to a gpio test script my friend wrote. However, there's no /dev/spi to open a file descriptor for. I have the xilinx_spi device recognized in the boot up, how do I map it to /dev/spi? Thanks.
MattOn Sun, Feb 22, 2009 at 22:31, Matt Staniszewski <matt.staniszewski@xxxxxxxxx> wrote:
I've managed to get the xilinx_spi char driver to load at boot:
xilinx_spi 0: at 0x41600000 mapped to 0x41600000, irq=0
Now, I'm wondering if anyone could guide me to what functions I use to access SPI. I've been reading through all the mailings of people trying to use SPI, but I didn't see a good example of implementing the SPI char driver.
Also, another method we considered was writing one of our user apps using xio.h and xparameters.h and then accessing all the hardware directly using various BASEADDR entries. This hasn't worked so far, but from what I read online I get the impression that this isn't the proper way to go about it.
Again, any guidance on the char driver would be great Thanks!
Matt