Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-29 Thread Stephen Warren
On 10/29/2012 10:18 AM, Laxman Dewangan wrote: > On Monday 29 October 2012 08:47 PM, Stephen Warren wrote: >> On 10/26/2012 12:49 PM, Laxman Dewangan wrote: Why not just always set SLINK_FIFO_ERROR; does it have to be set in the write only if the status was previously asserted? If

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-29 Thread Laxman Dewangan
On Monday 29 October 2012 08:47 PM, Stephen Warren wrote: On 10/26/2012 12:49 PM, Laxman Dewangan wrote: Why not just always set SLINK_FIFO_ERROR; does it have to be set in the write only if the status was previously asserted? If that is true, how do you avoid a race condition where the bit

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-29 Thread Stephen Warren
On 10/26/2012 12:49 PM, Laxman Dewangan wrote: > Thanks Stephen for review. > I have taken care of almost all feedback. Some of having my below comments. > > On Tuesday 23 October 2012 01:32 AM, Stephen Warren wrote: >> On 10/18/2012 04:47 AM, Laxman Dewangan wrote: >>> Tegra20/Tegra30 supports

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-29 Thread Stephen Warren
On 10/26/2012 12:49 PM, Laxman Dewangan wrote: Thanks Stephen for review. I have taken care of almost all feedback. Some of having my below comments. On Tuesday 23 October 2012 01:32 AM, Stephen Warren wrote: On 10/18/2012 04:47 AM, Laxman Dewangan wrote: Tegra20/Tegra30 supports the spi

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-29 Thread Laxman Dewangan
On Monday 29 October 2012 08:47 PM, Stephen Warren wrote: On 10/26/2012 12:49 PM, Laxman Dewangan wrote: Why not just always set SLINK_FIFO_ERROR; does it have to be set in the write only if the status was previously asserted? If that is true, how do you avoid a race condition where the bit

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-29 Thread Stephen Warren
On 10/29/2012 10:18 AM, Laxman Dewangan wrote: On Monday 29 October 2012 08:47 PM, Stephen Warren wrote: On 10/26/2012 12:49 PM, Laxman Dewangan wrote: Why not just always set SLINK_FIFO_ERROR; does it have to be set in the write only if the status was previously asserted? If that is true,

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-26 Thread Laxman Dewangan
Thanks Stephen for review. I have taken care of almost all feedback. Some of having my below comments. On Tuesday 23 October 2012 01:32 AM, Stephen Warren wrote: On 10/18/2012 04:47 AM, Laxman Dewangan wrote: Tegra20/Tegra30 supports the spi interface through its SLINK controller. Add spi

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-26 Thread Laxman Dewangan
Thanks Stephen for review. I have taken care of almost all feedback. Some of having my below comments. On Tuesday 23 October 2012 01:32 AM, Stephen Warren wrote: On 10/18/2012 04:47 AM, Laxman Dewangan wrote: Tegra20/Tegra30 supports the spi interface through its SLINK controller. Add spi

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-23 Thread Mark Brown
On Mon, Oct 22, 2012 at 02:02:47PM -0600, Stephen Warren wrote: > On 10/18/2012 04:47 AM, Laxman Dewangan wrote: > > + /* Read back register to make sure that register writes completed */ > > + if (reg != SLINK_TX_FIFO) > > + readl(tspi->base + SLINK_MAS_DATA); > Is that really

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-23 Thread Mark Brown
On Mon, Oct 22, 2012 at 02:02:47PM -0600, Stephen Warren wrote: On 10/18/2012 04:47 AM, Laxman Dewangan wrote: + /* Read back register to make sure that register writes completed */ + if (reg != SLINK_TX_FIFO) + readl(tspi-base + SLINK_MAS_DATA); Is that really necessary on

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-22 Thread Stephen Warren
On 10/18/2012 04:47 AM, Laxman Dewangan wrote: > Tegra20/Tegra30 supports the spi interface through its SLINK > controller. Add spi driver for SLINK controller. > diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c > +static inline void tegra_slink_writel(struct

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-22 Thread Thierry Reding
On Mon, Oct 22, 2012 at 01:28:26PM +0100, Mark Brown wrote: > On Thu, Oct 18, 2012 at 04:17:13PM +0530, Laxman Dewangan wrote: [...] > > +static struct tegra_spi_platform_data *tegra_slink_parese_dt( > > + struct platform_device *pdev) > > +{ > > There doens't seem to be any binding

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-22 Thread Mark Brown
On Thu, Oct 18, 2012 at 04:17:13PM +0530, Laxman Dewangan wrote: > + udelay(1); > + wmb(); > + } > + tspi->dma_control_reg = val; > + val |= SLINK_DMA_EN; > + tegra_slink_writel(tspi, val, SLINK_DMA_CTL); > + return 0; > +} > +static int

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-22 Thread Mark Brown
On Thu, Oct 18, 2012 at 04:17:13PM +0530, Laxman Dewangan wrote: + udelay(1); + wmb(); + } + tspi-dma_control_reg = val; + val |= SLINK_DMA_EN; + tegra_slink_writel(tspi, val, SLINK_DMA_CTL); + return 0; +} +static int

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-22 Thread Thierry Reding
On Mon, Oct 22, 2012 at 01:28:26PM +0100, Mark Brown wrote: On Thu, Oct 18, 2012 at 04:17:13PM +0530, Laxman Dewangan wrote: [...] +static struct tegra_spi_platform_data *tegra_slink_parese_dt( + struct platform_device *pdev) +{ There doens't seem to be any binding

Re: [PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-22 Thread Stephen Warren
On 10/18/2012 04:47 AM, Laxman Dewangan wrote: Tegra20/Tegra30 supports the spi interface through its SLINK controller. Add spi driver for SLINK controller. diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c +static inline void tegra_slink_writel(struct

[PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-18 Thread Laxman Dewangan
Tegra20/Tegra30 supports the spi interface through its SLINK controller. Add spi driver for SLINK controller. Signed-off-by: Laxman Dewangan --- drivers/spi/Kconfig |6 + drivers/spi/Makefile|2 +- drivers/spi/spi-tegra20-slink.c | 1356

[PATCH] spi: tegra: add spi driver for SLINK controller

2012-10-18 Thread Laxman Dewangan
Tegra20/Tegra30 supports the spi interface through its SLINK controller. Add spi driver for SLINK controller. Signed-off-by: Laxman Dewangan ldewan...@nvidia.com --- drivers/spi/Kconfig |6 + drivers/spi/Makefile|2 +- drivers/spi/spi-tegra20-slink.c | 1356