[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Building an SPI Driver
Hans and John,
Thanks for your help. I had to add an entry to the
uclinux-auto/Makefile to include the xiilnx_spi device to the dev file
... and get the major number correct.
The open write and read now send bits on the SPI.
On 3/22/07, Doug Gibbs <douggxlnx@xxxxxxxxx> wrote:
My most gracious thanks. I should have asked sooner. I am kicking
myself for spending 2 days doing what you had already done, and you
had it working.
The patch builds, and I see /dev/spi when I run the system.
My test program fails to open /dev/spi. Do you have a small test or
example you can share? Is there anything special about using the SPI?
On 3/22/07, Dr. Johann Pfefferl <j.pfefferl@xxxxxxxxx> wrote:
> I have already done the whole work. The driver uses the auto-config.in
> parameters. Take the attached patch and install it.
> Be careful if you use the SPI driver. The data block size has a hardcoded
> limit of approximately 8kB !!
> So if you want to dump for example the SPI flash contents you have to split
> the dump into smaller parts or modify the driver to allow larger sizes.
> John Williams <jwilliams@xxxxxxxxxxxxxx> wrote:
> > Hi Doug,
> > Doug Gibbs wrote:
> > >Thanks for any help in advance.
> > >I used the PPC SPI driver source found here:
> > >http://rsync.ppckernel.org/modules/linuxppc-2.4/drivers/char/xilinx_spi/
> > >
> > >I modified the make and configuration files to get this to build. Now
> > >I am running into compiler errors involving the xparameters.h file
> > >that the ppc driver uses.
> > >There are other messages on the mailing list about editing
> > >/include/asm-microblaze/xparameters.h.
> > >
> > >Would it be easier to copy the xparameters.h generated by the EDK into
> > >the kernel? There is no clear answer in the mailing list. The
> > >recommendation in one posting to change the MHS file before changing
> > >the xparameters.h has made me nervous.
> > No - xparameters.h is bad. Remove any #include references, and change
> > them to ensure that <linux/autoconf.h> is included instead.
> > Then change all XPAR_.... to equivalent CONFIG_XILINX_.... definitions.
> > you'll see these in the autoconf.h file for your SPI peripheral. It
> > will be something like
> > CONFIG_XILINX_SPI_0_BASEADDR... and so on.
> > The IRQ line will be CONFIG_XILINX_SPI_0_IRQ
> > Regards,
> > John
> > ___________________________
> > microblaze-uclinux mailing list
> > microblaze-uclinux@xxxxxxxxxxxxxx
> > Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> > Mailing List Archive :
> > http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
> Dr. Johann Pfefferl ------------ mailto j.pfefferl at eubus dot net
> Eubus GmbH http://www.eubus.net +++++ http://www.hydraxc.com
> Phone: +49 (0)89 45 22 578-67
> Fax: +49 (0)89 45 22 578-55
> -o) A computer program does what you tell it to do,
> /\\ not what you want it to do.
microblaze-uclinux mailing list
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/