Re: [U-Boot-Users] [RFC/PATCH] SPI API improvements

2008-05-13 Thread Haavard Skinnemoen
On Tue, 13 May 2008 17:06:35 +0200 (CEST) Guennadi Liakhovetski <[EMAIL PROTECTED]> wrote: > Appropriate or not from the esthetic PoV, I don't see another chance to > make it useful - either make it run-time configurable either via command > parameters, or environment varables, ot at least compi

Re: [U-Boot-Users] [RFC/PATCH] SPI API improvements

2008-05-13 Thread Guennadi Liakhovetski
On Tue, 13 May 2008, Haavard Skinnemoen wrote: > On Tue, 13 May 2008 13:20:22 +0200 (CEST) > Guennadi Liakhovetski <[EMAIL PROTECTED]> wrote: > > > > + /* FIXME: Make these parameters configurable */ > > > + slave = spi_setup_slave(0, device, 100, SPI_MODE_0); > > > > Until it is configurabl

Re: [U-Boot-Users] [RFC/PATCH] SPI API improvements

2008-05-13 Thread Haavard Skinnemoen
On Tue, 13 May 2008 13:20:22 +0200 (CEST) Guennadi Liakhovetski <[EMAIL PROTECTED]> wrote: > > static int device; > > static int bitlen; > > static uchar dout[MAX_SPI_BYTES]; > > static uchar din[MAX_SPI_BYTES]; > > +static struct spi_slave *slave; > > Don't think this is needed... Right

Re: [U-Boot-Users] [RFC/PATCH] SPI API improvements

2008-05-13 Thread Guennadi Liakhovetski
Hi Haavard, On Fri, 9 May 2008, Haavard Skinnemoen wrote: > diff --git a/common/cmd_spi.c b/common/cmd_spi.c > index 7604422..b0e7db1 100644 > --- a/common/cmd_spi.c > +++ b/common/cmd_spi.c > @@ -38,19 +38,13 @@ > #endif > > /* > - * External table of chip select functions (see the appropria

Re: [U-Boot-Users] [RFC/PATCH] SPI API improvements

2008-05-11 Thread Mike Frysinger
On Sunday 11 May 2008, HŒaavard Skinnemoen wrote: > Mike Frysinger wrote: > > On Friday 09 May 2008, Haavard Skinnemoen wrote: > >> This patch hasn't been tested on all the boards involved, so there are > >> probably a few issues. For now, I'd like some comments on the new > >> interface -- if it l

Re: [U-Boot-Users] [RFC/PATCH] SPI API improvements

2008-05-11 Thread HŒaavard Skinnemoen
Mike Frysinger wrote: > On Friday 09 May 2008, Haavard Skinnemoen wrote: >> This patch hasn't been tested on all the boards involved, so there are >> probably a few issues. For now, I'd like some comments on the new >> interface -- if it looks good, we should spend some additional effort >> to vali

Re: [U-Boot-Users] [RFC/PATCH] SPI API improvements

2008-05-09 Thread Mike Frysinger
On Friday 09 May 2008, Haavard Skinnemoen wrote: > This patch hasn't been tested on all the boards involved, so there are > probably a few issues. For now, I'd like some comments on the new > interface -- if it looks good, we should spend some additional effort > to validate that it doesn't introdu

[U-Boot-Users] [RFC/PATCH] SPI API improvements

2008-05-09 Thread Haavard Skinnemoen
From: Haavard Skinnemoen <[EMAIL PROTECTED]> This patch gets rid of the spi_chipsel table and adds a handful of new functions that makes the SPI layer cleaner and more flexible. Instead of the spi_chipsel table, each board that wants to use SPI gets to implement three hooks: * spi_cs_activate()