Re: [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-10-21 Thread Wolfram Sang
> V4 was supposed to go in during the merge window. But I haven't heard > anything from David (and I didn't pursue it either). Unless David > objects, I'll put it into either my -merge or my -next tree; depending > on what Ben and Linus prefer. I wondered if there was going to be a V5 as you sa

Re: [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-10-21 Thread Grant Likely
On Wed, Oct 21, 2009 at 10:17 PM, Wolfram Sang wrote: > Hi Grant, > > On Wed, Jun 17, 2009 at 08:55:01PM -0600, Grant Likely wrote: >> From: Grant Likely >> >> Adds support for the dedicated SPI device on the Freescale MPC5200(b) >> SoC. >> >> Signed-off-by: Grant Likely > > do you have an updat

Re: [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-10-21 Thread Wolfram Sang
Hi Grant, On Wed, Jun 17, 2009 at 08:55:01PM -0600, Grant Likely wrote: > From: Grant Likely > > Adds support for the dedicated SPI device on the Freescale MPC5200(b) > SoC. > > Signed-off-by: Grant Likely do you have an updated version to share? Or is V4 still 'status quo'? Genki de ;)

Re: [spi-devel-general] [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-07-03 Thread Grant Likely
On Thu, Jun 18, 2009 at 8:26 AM, Wolfram Sang wrote: >> There used to be a sysfs interface for dumping these, but it was an >> ugly misuse.  I'd like to leave these in.  I still have the sysfs bits >> in a private patch and I'm going to rework them for debugfs. > > Okay. Maybe a comment stating the

Re: [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-06-23 Thread Grant Likely
On Tue, Jun 23, 2009 at 10:31 AM, Kári Davíðsson wrote: > Lowered my SPI clock down to 1MHz (from 50MHz (in steps of 10MHz). > At 1Mhz the driver stops starving the rest of the kernel. > > What is interesting is that due to the low duty cycle of the SPI port > the transfer rate at 1MHz and 50Mhz is

Re: [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-06-23 Thread Kári Davíðsson
Lowered my SPI clock down to 1MHz (from 50MHz (in steps of 10MHz). At 1Mhz the driver stops starving the rest of the kernel. What is interesting is that due to the low duty cycle of the SPI port the transfer rate at 1MHz and 50Mhz is almost the same. I suggest that the driver simply limits max f

Re: [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-06-23 Thread Grant Likely
On Tue, Jun 23, 2009 at 8:40 AM, Kári Davíðsson wrote: > Hi, > > I have been testing this driver a little bit (on 2.6.29.3) > > What happens for me is that the driver starves the system while sending > data over the SPI interface. > > I think the problem is in the function (interrupt handler) > mpc

Re: [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-06-23 Thread Kári Davíðsson
-EINVAL; + + if (spi->chip_select >= spi->master->num_chipselect) + return -EINVAL; + + return 0; +} + +static int mpc52xx_spi_transfer(struct spi_device *spi, struct spi_message *m) +{ + struct mpc52xx_spi *ms = spi_master_get_devdata(spi->m

Re: [spi-devel-general] [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-06-18 Thread Wolfram Sang
Hi Grant, > The double spaces at the end of sentences are intentional. It is > perhaps a bit quaint and old fashioned, but it is my writing style. Ah, okay. > >> + > >> +     /* Statistics */ > >> +     int msg_count; > >> +     int wcol_count; > >> +     int wcol_ticks; > >> +     u32 wcol_tx_

Re: [spi-devel-general] [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-06-18 Thread Grant Likely
On Thu, Jun 18, 2009 at 12:58 AM, Wolfram Sang wrote: > Hi Grant, > > some comments below: Hi Wolfram. Thanks for the review. > On Wed, Jun 17, 2009 at 08:55:01PM -0600, Grant Likely wrote: >> +#include > > Is this still needed? See last comment... No, not needed at all. Will remove. >> +#in

Re: [spi-devel-general] [PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-06-17 Thread Wolfram Sang
rc = ms->state(irq, ms, status, data); > + } > + > + if (rc == FSM_POLL) > + schedule_work(&ms->work); > +} > + > +/** > + * mpc52xx_spi_irq - IRQ handler > + */ > +static irqreturn_t mpc52xx_spi_irq(int irq, void *_ms) > +{ > +

[PATCH v4] powerpc/5200: Add mpc5200-spi (non-PSC) device driver

2009-06-17 Thread Grant Likely
return -EINVAL; + + return 0; +} + +static int mpc52xx_spi_transfer(struct spi_device *spi, struct spi_message *m) +{ + struct mpc52xx_spi *ms = spi_master_get_devdata(spi->master); + unsigned long flags; + + m->actual_length = 0; + m->statu

MPC5200 SPI

2009-03-17 Thread Gary Thomas
I'm trying to use the PSC/SPI driver on my MPC5200 board 'drivers/spi/mpc52xx_psc_spi.c' My kernel is 2.6.28, but I don't see any changes in this area in the latest ones. Cribbing from the Lite5200, I put this in my DTS file: // PSC6 => SPI s...@2c00 { /

Re: mpc5200 spi + mmc support

2008-12-30 Thread Anton Vorontsov
On Tue, Dec 30, 2008 at 03:17:55PM -0500, Jon Smirl wrote: > Grant, is your mpc5200 spi support going in this round? If so, there > is a small amount of dependent code to get mmc working. > > Anton's of_mmc_spi.c patch is also needed. I'm not sure of the status > fo

mpc5200 spi + mmc support

2008-12-30 Thread Jon Smirl
Grant, is your mpc5200 spi support going in this round? If so, there is a small amount of dependent code to get mmc working. Anton's of_mmc_spi.c patch is also needed. I'm not sure of the status for that patch, it has gone through a lot of revisions. -- Jon Smirl jonsm...

Re: [PATCH v3 4/4] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-27 Thread David Brownell
mp(name, "msg_count") == 0) > + return &ms->msg_count; > + if (strcmp(name, "byte_count") == 0) > + return &ms->byte_count; > + if (strcmp(name, "wcol_count") == 0) > + return &ms->wcol_count

Re: [PATCH v3 5/5] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-26 Thread Grant Likely
On Mon, Jul 14, 2008 at 09:21:08AM -0400, Jon Smirl wrote: > On 7/12/08, Grant Likely <[EMAIL PROTECTED]> wrote: > > From: Grant Likely <[EMAIL PROTECTED]> > > > > Adds support for the dedicated SPI device on the Freescale MPC5200(b) > > SoC. > > Can you adjust the existing PSC based SPI driver

Re: [PATCH v3 4/4] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-25 Thread Grant Likely
On Sat, Jul 26, 2008 at 12:47 AM, Daniel Walker <[EMAIL PROTECTED]> wrote: > On Fri, 2008-07-25 at 22:45 -0400, Grant Likely wrote: >> On Fri, Jul 25, 2008 at 2:19 PM, Daniel Walker <[EMAIL PROTECTED]> wrote: >> > On Fri, 2008-07-25 at 03:33 -0400, Grant Likely wrote: >> > >> >> + if (status &&

Re: [PATCH v3 4/4] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-25 Thread Daniel Walker
On Fri, 2008-07-25 at 22:45 -0400, Grant Likely wrote: > On Fri, Jul 25, 2008 at 2:19 PM, Daniel Walker <[EMAIL PROTECTED]> wrote: > > On Fri, 2008-07-25 at 03:33 -0400, Grant Likely wrote: > > > >> + if (status && (irq != NO_IRQ)) > >> + dev_err(&ms->master->dev, "spurious irq, sta

Re: [PATCH v3 4/4] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-25 Thread Grant Likely
On Fri, Jul 25, 2008 at 2:19 PM, Daniel Walker <[EMAIL PROTECTED]> wrote: > On Fri, 2008-07-25 at 03:33 -0400, Grant Likely wrote: > >> + if (status && (irq != NO_IRQ)) >> + dev_err(&ms->master->dev, "spurious irq, status=0x%.2x\n", >> + status); >> + >> + /*

Re: [PATCH v3 4/4] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-25 Thread Daniel Walker
On Fri, 2008-07-25 at 03:33 -0400, Grant Likely wrote: > + if (status && (irq != NO_IRQ)) > + dev_err(&ms->master->dev, "spurious irq, status=0x%.2x\n", > + status); > + > + /* Check if there is another transfer waiting */ > + if (list_empty(&ms->queue))

[PATCH v3 4/4] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-25 Thread Grant Likely
struct spi_master *master = container_of(dev, struct spi_master, dev); + struct mpc52xx_spi *ms = spi_master_get_devdata(master); + int *counter; + int value = simple_strtoul(buf, NULL, 0); + + counter = mpc52xx_spi_sysfs_get_counter(ms, attr->attr.name); + i

Re: [PATCH v3 5/5] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-14 Thread Jon Smirl
On 7/12/08, Grant Likely <[EMAIL PROTECTED]> wrote: > From: Grant Likely <[EMAIL PROTECTED]> > > Adds support for the dedicated SPI device on the Freescale MPC5200(b) > SoC. Can you adjust the existing PSC based SPI driver to use this device tree code? It will be confusing if there are two diffe

[PATCH v3 5/5] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-12 Thread Grant Likely
ttr.name); + if (counter) + *counter = value; + return count; +} + +DEVICE_ATTR(msg_count, 0644, mpc52xx_spi_show_count, mpc52xx_spi_set_count); +DEVICE_ATTR(byte_count, 0644, mpc52xx_spi_show_count, mpc52xx_spi_set_count); +DEVICE_ATTR(wcol_count, 0644, mpc52xx_spi_sho

[PATCH v2 5/5] powerpc/mpc5200: Add mpc5200-spi (non-PSC) device driver

2008-07-02 Thread Grant Likely
ttr.name); + if (counter) + *counter = value; + return count; +} + +DEVICE_ATTR(msg_count, 0644, mpc52xx_spi_show_count, mpc52xx_spi_set_count); +DEVICE_ATTR(byte_count, 0644, mpc52xx_spi_show_count, mpc52xx_spi_set_count); +DEVICE_ATTR(wcol_count, 0644, mpc52xx_spi_sho

[PATCH v2 0/5] SPI OF bindings and mpc5200-spi driver

2008-07-02 Thread Grant Likely
I think I've addressed all the comments I've received. This series adds OpenFirmware device tree bindings for SPI devices. SPI master drivers which make use of of_spi.c can retrieve the set of spi devices from the device tree and automatically create them. This series depends on previously poste

Re: [RFC PATCH 0/4] Describe SPI devices in the OF device tree and add mpc5200-spi driver

2008-05-16 Thread Grant Likely
(dropping spi and linux-kernel mailing lists as this is a mpc5200 specific discussion; everyone else probably doesn't care). On Fri, May 16, 2008 at 3:42 PM, Jon Smirl <[EMAIL PROTECTED]> wrote: > I need to talk to my hardware guy. He is using PSC3 for the boot > console with the assumption that

Re: [RFC PATCH 0/4] Describe SPI devices in the OF device tree and add mpc5200-spi driver

2008-05-16 Thread Jon Smirl
On 5/16/08, Grant Likely <[EMAIL PROTECTED]> wrote: > On Fri, May 16, 2008 at 3:25 PM, Jon Smirl <[EMAIL PROTECTED]> wrote: > > On 5/16/08, Grant Likely <[EMAIL PROTECTED]> wrote: > >> On Fri, May 16, 2008 at 2:27 PM, Jon Smirl <[EMAIL PROTECTED]> wrote: > >> > On 5/16/08, Grant Likely <[EMAIL

Re: [RFC PATCH 0/4] Describe SPI devices in the OF device tree and add mpc5200-spi driver

2008-05-16 Thread Grant Likely
On Fri, May 16, 2008 at 3:25 PM, Jon Smirl <[EMAIL PROTECTED]> wrote: > On 5/16/08, Grant Likely <[EMAIL PROTECTED]> wrote: >> On Fri, May 16, 2008 at 2:27 PM, Jon Smirl <[EMAIL PROTECTED]> wrote: >> > On 5/16/08, Grant Likely <[EMAIL PROTECTED]> wrote: >> >> This series is a set of changes to al

Re: [RFC PATCH 0/4] Describe SPI devices in the OF device tree and add mpc5200-spi driver

2008-05-16 Thread Jon Smirl
On 5/16/08, Grant Likely <[EMAIL PROTECTED]> wrote: > On Fri, May 16, 2008 at 2:27 PM, Jon Smirl <[EMAIL PROTECTED]> wrote: > > On 5/16/08, Grant Likely <[EMAIL PROTECTED]> wrote: > >> This series is a set of changes to allow the slaves on an SPI bus to be > >> described in the OF device tree (

Re: [RFC PATCH 0/4] Describe SPI devices in the OF device tree and add mpc5200-spi driver

2008-05-16 Thread Grant Likely
On Fri, May 16, 2008 at 2:27 PM, Jon Smirl <[EMAIL PROTECTED]> wrote: > On 5/16/08, Grant Likely <[EMAIL PROTECTED]> wrote: >> This series is a set of changes to allow the slaves on an SPI bus to be >> described in the OF device tree (useful in arch/powerpc) and adds a driver >> that uses it (the

Re: [RFC PATCH 0/4] Describe SPI devices in the OF device tree and add mpc5200-spi driver

2008-05-16 Thread Jon Smirl
On 5/16/08, Grant Likely <[EMAIL PROTECTED]> wrote: > This series is a set of changes to allow the slaves on an SPI bus to be > described in the OF device tree (useful in arch/powerpc) and adds a driver > that uses it (the Freescale MPC5200 SoC's SPI device). Right now we have SPI hooked up to P

Re: [PATCH 4/4] [CSB] Add new mpc5200-spi (non-psc) device driver

2008-05-16 Thread Grant Likely
On Fri, May 16, 2008 at 1:36 PM, Grant Likely <[EMAIL PROTECTED]> wrote: > From: Grant Likely <[EMAIL PROTECTED]> > > Unlike the old CSB driver, this driver uses the SPI infrastructure. er, this comment is *obviously* wrong. I'll fix it in the next version. Cheers, g. -- Grant Likely, B.Sc.,

[PATCH 4/4] [CSB] Add new mpc5200-spi (non-psc) device driver

2008-05-16 Thread Grant Likely
ainer_of(dev, struct spi_master, dev); + struct mpc52xx_spi *ms = spi_master_get_devdata(master); + int *counter; + int value = strict_strtoul(buf, NULL, 0); + + counter = mpc52xx_spi_sysfs_get_counter(ms, attr->attr.name); + if (counter) + *counter = value; + return

[RFC PATCH 0/4] Describe SPI devices in the OF device tree and add mpc5200-spi driver

2008-05-16 Thread Grant Likely
This series is a set of changes to allow the slaves on an SPI bus to be described in the OF device tree (useful in arch/powerpc) and adds a driver that uses it (the Freescale MPC5200 SoC's SPI device). Please review and comment. David, I've included in this series my earlier patch to change modal