Re: mxc_spi producing kernel panic during spi_async

2011-11-28 Thread Baruch Siach
Hi Wayne, On Mon, Nov 28, 2011 at 09:03:09AM +, Wayne Tams wrote: > On Sun, Nov 27, 2011 at 10:22 AM, Baruch Siach wrote: > > On Sat, Nov 26, 2011 at 09:13:31PM +, Wayne Tams wrote: > >> On Sat, Nov 26, 2011 at 5:08 PM, Baruch Siach wrote: > >> > On Fri, No

Re: mxc_spi producing kernel panic during spi_async

2011-11-27 Thread Baruch Siach
Hi Wayne, On Sat, Nov 26, 2011 at 09:13:31PM +, Wayne Tams wrote: > On Sat, Nov 26, 2011 at 5:08 PM, Baruch Siach wrote: > > On Fri, Nov 25, 2011 at 04:38:10PM +, Wayne Tams wrote: > >> I am needing some help understanding a kernel panic when I try to load > >>

Re: mxc_spi producing kernel panic during spi_async

2011-11-26 Thread Baruch Siach
Hi Wayne, On Fri, Nov 25, 2011 at 04:38:10PM +, Wayne Tams wrote: > I am needing some help understanding a kernel panic when I try to load > the at25 eeprom driver, I have traced it to the spi_async function in > drivers/spi/spi.c but I do not know where to go to from here. I have > found some

Re: i.MX: GPIO based SPI chip selects question

2011-10-31 Thread Baruch Siach
Hi Wayne, On Mon, Oct 31, 2011 at 09:26:25AM +, Wayne Tams wrote: > On Sat, Oct 29, 2011 at 9:44 PM, Baruch Siach wrote: > > On Fri, Oct 28, 2011 at 02:06:16PM +0100, Wayne Tams wrote: > >> Can I use GPIO pins on my i.mx53 for SPI chip select, I have found little > &

Re: i.MX: GPIO based SPI chip selects question

2011-10-29 Thread Baruch Siach
Hi Wayne, On Fri, Oct 28, 2011 at 02:06:16PM +0100, Wayne Tams wrote: > Can I use GPIO pins on my i.mx53 for SPI chip select, I have found little > on the web that can help me, I am hoping that it is straight-forward enough > for me to implement it? Perhaps there is a macro that I can use in the >

Re: [PATCH/RFC 2/2] mtd: m25p80: Call a platform power method in the driver

2011-08-27 Thread Baruch Siach
Hi Stanimir, On Thu, Aug 25, 2011 at 04:29:12PM +0300, Stanimir Varbanov wrote: > On some devices the flash chip could be powered off when m25p driver > is probed. To avoid erroneous detection the power of the chip must be > turn on, add a power function in m25p_probe to switch on the power by > p

Re: [PATCH] spi: reorganize drivers

2011-06-05 Thread Baruch Siach
Hi Jassi, On Sun, Jun 05, 2011 at 01:13:28PM +0530, Jassi Brar wrote: > On Sun, Jun 5, 2011 at 12:48 PM, Grant Likely > wrote: > > [repost: I had a typo on the spi-devel-general mailing list address] > > > > Sort the SPI makefile and enforce the naming convention spi_*.c for > > spi drivers. [s

Re: Regd: SPI Slave Select

2011-02-01 Thread Baruch Siach
articular). baruch > On Fri, Jan 28, 2011 at 1:54 PM, Baruch Siach wrote: > > > Hi Tom, > > > > On Fri, Jan 28, 2011 at 01:28:54PM +0530, Tom wrote: > > > I have a SPI slave device which expects the slave select line to be > > active > > > (low) d

Re: Regd: SPI Slave Select

2011-01-28 Thread Baruch Siach
Hi Tom, On Fri, Jan 28, 2011 at 01:28:54PM +0530, Tom wrote: > I have a SPI slave device which expects the slave select line to be active > (low) during the entire message (e.g: say for a two byte transfer, the SS > should be low for until both the bytes have been written, and should not go > inac

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

2010-11-23 Thread Baruch Siach
Hi Alexis, On Tue, Nov 23, 2010 at 10:41:13AM +0100, Alexis RODET wrote: > Le 23/11/2010 10:36, Baruch Siach a écrit : > > Hi Alexis, > > > >> So Here is the patch: > > [snip] > > > >> -static struct flash_platform_data __initda

Re: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h

2010-11-23 Thread Baruch Siach
Hi Alexis, On Tue, Nov 23, 2010 at 10:30:46AM +0100, Alexis RODET wrote: > Le 22/11/2010 22:52, David Brownell a écrit : > > > > --- On Mon, 11/22/10, Alexis RODET wrote: > > > >>> And this patch doesn't touch machine or driver code, > >> so it's incomplete. > >> Look at the patch in previous mai

Re: [PATCH 1/6] spi-imx: add CSPI and eCSPI support for i.MX51 MCU

2010-09-02 Thread Baruch Siach
Hi Lothar, On Thu, Sep 02, 2010 at 05:11:56PM +0200, Lothar Waßmann wrote: > > > - if (cpu_is_mx25() || cpu_is_mx31() || cpu_is_mx35()) { > > > + /* i.MX51 has two eCSPI and one CSPI controllers, eCSPI controllers are > > > + * not compatible with existing SPI controllers on other i.MX platforms,

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-26 Thread Baruch Siach
Hi Anatolij, On Tue, Jul 27, 2010 at 12:59:38AM +0200, Anatolij Gustschin wrote: > Signed-off-by: Anatolij Gustschin > --- > drivers/spi/mpc512x_psc_spi.c | 10 +- > 1 files changed, 9 insertions(+), 1 deletions(-) You should CC Grant Likely on this. He is now the de-facto maintainer

Re: [spi-devel-general] general question: spi framework

2010-05-28 Thread Baruch Siach
Hi Dimitar, On Fri, May 28, 2010 at 03:40:18AM -0700, Dimitar Penev wrote: > I would like to use this API from another kernel module (so kernel space) > For me it is unclear however how to get pointer to spi_device from my kernel > module. In general is there somewhere an example for using of the

Re: [spi-devel-general] Purpose of the "msg->status"

2010-03-15 Thread Baruch Siach
field the SPI transfer has completed. This way you can avoid a context switch. Just a guess. baruch > -Original Message- > From: Baruch Siach [mailto:bar...@tkos.co.il] > Sent: Monday, March 15, 2010 2:18 PM > To: Centelles, Sylvain > Cc: spi-devel-general@lists.source

Re: [spi-devel-general] Purpose of the "msg->status"

2010-03-15 Thread Baruch Siach
status = message->actual_length; } baruch > -Original Message- > From: Baruch Siach [mailto:bar...@tkos.co.il] > Sent: Monday, March 15, 2010 12:06 PM > To: Centelles, Sylvain > Cc: spi-devel-general@lists.sourceforge.net > Subject: Re: [spi-devel-general] Pu

Re: [spi-devel-general] Purpose of the "msg->status"

2010-03-15 Thread Baruch Siach
Hi Sylvain, On Mon, Mar 15, 2010 at 10:13:52AM +, Centelles, Sylvain wrote: > I'm currently working on a spi driver for Intel platform, and when reading > the various other spi drivers available in the kernel, I saw the msg->status > was often updated (EINPROGRESS for example), but could not

Re: [spi-devel-general] [PATCH] spi_board_info_cmdline.c: unknown command line options are ignored and all options have a name instead of being anonymous

2010-02-03 Thread Baruch Siach
On Tue, Feb 02, 2010 at 04:08:57PM +0100, Pietrek, Markus wrote: > Hi Barauch, > > as requested a more open approach for the command line options Thanks. You should also update the cs_high option in the Kconfig help text. baruch > > Signed-off-by: Markus Pietrek > --- > drivers/spi/Kconfig

Re: [spi-devel-general] [PATCH] added drivers/spi/spi_board_info_cmdline for setting up an spi_board_info structure on commandline

2010-01-30 Thread Baruch Siach
Hi Pietrek, On Fri, Jan 29, 2010 at 02:48:29PM +0100, Pietrek, Markus wrote: [snip] > + else if (!strcmp(opt, "cs")) > + info->mode |= SPI_CS_HIGH; The name of this option should be "cs_high" in my opinion. > +

Re: [spi-devel-general] [RFC][PATCH] serial: spi: add spi-uart driver for Maxim 3110

2009-12-29 Thread Baruch Siach
Hi Feng, On Tue, Dec 29, 2009 at 10:20:06PM +0800, Feng Tang wrote: > Here is a driver for Maxim 3110 SPI-UART device, please help to review. Is this 3110 device so significantly different from the MAX3100 driver that's already in the mainline kernel (drivers/serial/max3100.c), to require a whol

Re: [spi-devel-general] Questions in spi_mpc83xx.c

2009-07-09 Thread Baruch Siach
Hi Mark, On Thu, Jul 09, 2009 at 02:16:48PM -0400, Mark Bishop wrote: > I haven't seen this before - the '##' in the function name. This is ANCII C? Of course. See pp. 90-91 in "The C Programming Language" second edition. > > #define MPC83XX_SPI_TX_BUF(type) \ > u3

[spi-devel-general] [PATCH v4] spi: driver for the Synopsys DesignWare SPI controller

2009-06-23 Thread Baruch Siach
Signed-off-by: Baruch Siach --- Changes in v4: - Add release_mem_region() in the remove method Changes in v3: - Address the comments of Linus Walleij Changes in v2: - printk -> dev_err - indentation fix - documentation file for BSP writers ad

Re: [spi-devel-general] [PATCH] SST25L (non JEDEC) SPI Flash driver

2009-06-21 Thread Baruch Siach
Hi Ryan, On Mon, Jun 22, 2009 at 03:58:51PM +1200, Ryan Mallon wrote: > +static int sst25l_erase_block(struct sst25l_flash *flash, u32 offset) > +{ > + u8 command[4]; > + int err; > + > + err = sst25l_write_enable(flash, 1); Is this enable/disable strictly required for each write/eras

Re: [spi-devel-general] [PATCH 0/2] spi: add driver for SPI controller of Intel Moorestown platform

2009-06-15 Thread Baruch Siach
Hi Feng, On Mon, Jun 15, 2009 at 05:38:45PM +0800, Feng Tang wrote: > This patch series adds driver for SPI controller of Intel Moorestown > platform. > > This driver has been tested with Maxim's Max3110 UART device and > Option's 3G modem GTM501L, both PIO and DMA works fine, and these > 2 slav

Re: [spi-devel-general] [PATCH] This adds support for SPI slave controller drivers

2009-06-11 Thread Baruch Siach
Hi Ken, Your patches are very interesting. Unfortunately, your email client (Evolution?) has broken long lines in your patches. Please resend them. You may consult Documentation/email-clients.txt. baruch On Mon, Jun 01, 2009 at 08:51:37PM -0700, Ken Mills wrote: > This patch adds a new API to

Re: [spi-devel-general] [PATCH v3] spi: driver for the Synopsys DesignWare SPI controller

2009-06-04 Thread Baruch Siach
Hi Linus, On Thu, Jun 04, 2009 at 10:30:23AM +0200, Linus Walleij wrote: > 2009/6/4 Baruch Siach : > > > +static int __devexit designware_spi_remove(struct platform_device *dev) > > +{ > > +       struct designware_spi *dwspi; > > +       struct spi_master *ma

[spi-devel-general] [PATCH v3] spi: driver for the Synopsys DesignWare SPI controller

2009-06-03 Thread Baruch Siach
Signed-off-by: Baruch Siach --- Changes in v3: - Address the comments of Linus Walleij Changes in v2: - printk -> dev_err - indentation fix - documentation file for BSP writers added Documentation/spi/designware | 88 + drivers/spi/Kconfig|

Re: [spi-devel-general] [PATCH] Freescale STMP spi driver

2009-06-02 Thread Baruch Siach
Hi dmitry, On Tue, Jun 02, 2009 at 11:40:38PM +0400, dmitry pervushin wrote: > Hello David, > > Here is the patch for SSP/SPI on STMP3xxx boards; could you please apply > it? Any comments are appreciated. > = > > ... > > +/*

Re: [spi-devel-general] [PATCH] spi: driver for the Synopsys DesignWare SPI controller

2009-05-31 Thread Baruch Siach
very much for your review. > 2009/5/26 Baruch Siach : > > > > Signed-off-by: Baruch Siach > > --- > > > > The first posted version of this patch from last week didn't get any > > response. > > Is there anything that I'm doing wrong here? >

[spi-devel-general] [PATCH] spi: driver for the Synopsys DesignWare SPI controller

2009-05-26 Thread Baruch Siach
Signed-off-by: Baruch Siach --- The first posted version of this patch from last week didn't get any response. Is there anything that I'm doing wrong here? Changes in V2: - printk -> dev_err - indentation fix - documentation file for BSP writers added

Re: [spi-devel-general] [PATCH] spi: fix m25p80 when the cs_change hint is honored

2009-05-19 Thread Baruch Siach
Hi David, On Tue, May 19, 2009 at 10:09:19PM -0700, David Brownell wrote: > On Tuesday 19 May 2009, Baruch Siach wrote: > > If so would a clarification of the relevant text at > > include/linux/spi/spi.h be accepted? > > In what way is the existing language unclear? There

Re: [spi-devel-general] [PATCH] spi: fix m25p80 when the cs_change hint is honored

2009-05-19 Thread Baruch Siach
Hi David, On Tue, May 19, 2009 at 09:34:14PM -0700, David Brownell wrote: > Normal behavior of a spi_message is to keep the chipselect active > during the entire message, then deactivate it after the last transfer. > Setting the cs_change flag *changes* that behavior ... allowing either > (a) brie

[spi-devel-general] [PATCH] spi: fix m25p80 when the cs_change hint is honored

2009-05-19 Thread Baruch Siach
cs_change hint may not deactivate the chip select after the transaction when cs_change == 0, leading to data corruption. Other SPI devices may also be affected by this behaviour. Fix this issue, and while at it, also make spi_read() do the same for consistency. Signed-off-by: Baruch Siach

[spi-devel-general] [PATCH] spi: driver for the Synopsys DesignWare SPI controller

2009-05-19 Thread Baruch Siach
Signed-off-by: Baruch Siach --- drivers/spi/Kconfig|6 + drivers/spi/Makefile |1 + drivers/spi/designware_spi.c | 719 include/linux/spi/designware.h | 10 + 4 files changed, 736 insertions(+), 0 deletions(-) create

[spi-devel-general] [PATCH, RFC] Driver for the Synopsys DesignWare SPI master

2009-01-05 Thread Baruch Siach
This is a driver for the Synopsys DesignWare SPI master. This driver was tested with an SPI flash device (m25p32), and an SPI Ethernet interface (enc28j60), using their mainline drivers. spidev was also tested with a custom SPI device. Signed-off-by: Baruch Siach --- drivers/spi/Kconfig

Re: [spi-devel-general] [patch 2.6.28-rc9] spi: spi_write_then_read() regression fix

2008-12-24 Thread Baruch Siach
Hi David, On Wed, Dec 24, 2008 at 12:39:31AM -0800, David Brownell wrote: > I've certainly seen a couple drivers that handled the > full duplex behavior incorrectly, until they fixed that > bug. As in, they wrote the tx_buf *then* read rx_buf > (a half-duplex model) instead of doing them concurre

[spi-devel-general] [PATCH, RFC] enc28j60: use only one spi_message per register access

2008-12-22 Thread Baruch Siach
the round trip time for a simple ping test. The system I used for these test is a ARM926EJ-S based chip, clocked at 112MHz, with 8KB I-cache and 8KB D-cache. Signed-off-by: Baruch Siach --- --- drivers/net/enc28j60.c-git 2008-12-22 13:58:40.0 +0200 +++ drivers/net/enc28j60.c 2008

Re: [spi-devel-general] [PATCH] enc28j60: Fix sporadic packet loss (correction)

2008-12-02 Thread Baruch Siach
HI David, On Tue, Dec 02, 2008 at 02:44:02PM -0800, David Brownell wrote: > On Tuesday 02 December 2008, Baruch Siach wrote: > > Our on-chip SPI master is the Synopsys DesignWare one. I wrote a driver > > for this SPI master. This driver is somewhat usable, but not complete yet.

Re: [spi-devel-general] [PATCH] enc28j60: Fix sporadic packet loss (correction)

2008-12-02 Thread Baruch Siach
Hi David, On Tue, Dec 02, 2008 at 01:05:05PM -0800, David Brownell wrote: > Seems plausible to me, but network patches should be submitted > to the netdev list. :) So I did after Claudio suggested the same (and acked the patch). > p.s. Just for info ... what kind of Linux system are you using >

[spi-devel-general] [PATCH] enc28j60: Fix sporadic packet loss

2008-12-02 Thread Baruch Siach
Packet data read from the RX buffer the when the RSV is at the end of the RX buffer does not warp around. This causes packet loss, as the actual data is never read. Fix this by calculating the right packet data location. Thanks to Shachar Shemesh for suggesting the fix. Signed-off-by: Baruch

[spi-devel-general] [PATCH] enc28j60: Fix sporadic packet loss (correction)

2008-12-02 Thread Baruch Siach
Packet data read from the RX buffer the when the RSV is at the end of the RX buffer does not warp around. This causes packet loss, as the actual data is never read. Fix this by calculating the right packet data location. Thanks to Shachar Shemesh for suggesting the fix. Signed-off-by: Baruch