Re: [PATCH 1/4] spi: s3c64xx: modified error interrupt handling and init

2013-02-07 Thread Tomasz Figa
Hi Girish, On Wednesday 06 of February 2013 12:12:29 Girish KS wrote: > On Wed, Feb 6, 2013 at 2:26 AM, Grant Likely wrote: > > On Tue, 5 Feb 2013 15:09:41 -0800, Girish K S wrote: > >> The status of the interrupt is available in the status register, > >> so reading the clear pending register

Re: [PATCH 3/4] spi: s3c64xx: add gpio quirk for controller

2013-02-07 Thread Mark Brown
On Tue, Feb 05, 2013 at 03:09:43PM -0800, Girish K S wrote: > This patch adds support for spi controllers with > dedicated clk/miso/mosi/cs pins. It skips the gpio > parsing and initialization for controllers that > have dedicated pins. > if (sdd->tgl_spi != spi) { /* if last mssg on

[PATCH v2 0/7] spi: spi-fsl-spi: Make spi-fsl-spi usable in cpu mode outside of FSL SOC environments and add a grlib variant normally running on sparc

2013-02-07 Thread Andreas Larsson
This makes the cpu mode of the driver available outside of an FSL SOC and even powerpc environment. Furthermore, this adds support for the mostly register-compatible SPICTRL core from the GRLIB VHDL IP core library normally running on SPARC. This effort is split up in several patches for clarity o

[PATCH v2 2/7] spi: spi-fsl-spi: Make sure in spi_fsl_setup that chipselect becomes inactive

2013-02-07 Thread Andreas Larsson
This is needed for a device in SPI_CS_HIGH mode that otherwise could start out active for the first transaction. Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-spi.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fs

[PATCH v2 5/7] spi: spi-fsl-spi: Add support for setting a maximum number of bits per word

2013-02-07 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-lib.h |1 + drivers/spi/spi-fsl-spi.c |8 +++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/spi/spi-fsl-lib.h b/drivers/spi/spi-fsl-lib.h index 5a9c36c..d5c788b 100644 --- a/drivers/spi/spi-fsl-lib.h +++

[PATCH v2 1/7] spi: spi-fsl-spi: Make driver usable in CPU mode outside of an FSL_SOC environment

2013-02-07 Thread Andreas Larsson
This makes the spi-fsl-spi driver usable in CPU mode outside of an FSL_SOC and even an powerpc environment by moving CPM mode functionality to a separate file that is only compiled and linked in an FSL_SOC environment and adding some ifdefs to hide types and functions or provide alternatives. For

[PATCH v2 6/7] spi: spi-fsl-spi: Add support for Aeroflex Gaisler GRLIB cores normally running on SPARC

2013-02-07 Thread Andreas Larsson
This adds support for the mostly register-compatible SPICTRL cores from the GRLIB VHDL IP core library from Aeroflex Gaisler. They are normally running on SPARC. A different entry in of_fsl_spi_match matches this core and indicates a different hardware type that is used to set up different function

[PATCH v2 3/7] spi: spi-fsl-spi: Move setting non-zero tx and rx shifts to a function accessed by a function pointer

2013-02-07 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-lib.h |5 drivers/spi/spi-fsl-spi.c | 51 +++- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/drivers/spi/spi-fsl-lib.h b/drivers/spi/spi-fsl-lib.h index d785595..eae54b6 10

[PATCH v2 7/7] spi: spi-fsl-spi: Add support for gpio chipselects for GRLIB type cores

2013-02-07 Thread Andreas Larsson
This relies upon of_spi_register_master to find out which gpios to use. Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-lib.h |1 + drivers/spi/spi-fsl-spi.c | 53 +++- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/drivers/sp

[PATCH v2 4/7 RESEND] spi: spi-fsl-spi: Introduce a type for the driver

2013-02-07 Thread Andreas Larsson
For being able to distinguishing between the regular type of cores and others with different entries in of_fsl_spi_match. Signed-off-by: Andreas Larsson --- [Resent, as the mail for patch 4 seems to have been lost somehow] drivers/spi/spi-fsl-lib.h |2 ++ drivers/spi/spi-fsl-spi.c | 39 ++

[PATCH v2 4/7] spi: spi-fsl-spi: Introduce a type for the driver

2013-02-07 Thread Andreas Larsson
For being able to distinguishing between the regular type of cores and others with different entries in of_fsl_spi_match. Signed-off-by: Andreas Larsson --- drivers/spi/spi-fsl-lib.h |2 ++ drivers/spi/spi-fsl-spi.c | 39 --- 2 files changed, 34 insertio

Re: [PATCH v2 0/7] spi: spi-fsl-spi: Make spi-fsl-spi usable in cpu mode outside of FSL SOC environments and add a grlib variant normally running on sparc

2013-02-07 Thread Anton Vorontsov
On Thu, Feb 07, 2013 at 02:12:04PM +0100, Andreas Larsson wrote: > This makes the cpu mode of the driver available outside of an FSL SOC > and even powerpc environment. Furthermore, this adds support for the > mostly register-compatible SPICTRL core from the GRLIB VHDL IP core > library normally ru

Re: [PATCH v2 7/7] spi: spi-fsl-spi: Add support for gpio chipselects for GRLIB type cores

2013-02-07 Thread Anton Vorontsov
On Thu, Feb 07, 2013 at 02:12:11PM +0100, Andreas Larsson wrote: > This relies upon of_spi_register_master to find out which gpios to use. > > Signed-off-by: Andreas Larsson > --- > drivers/spi/spi-fsl-lib.h |1 + > drivers/spi/spi-fsl-spi.c | 53 +++

Re: [PATCH 1/4] spi: s3c64xx: modified error interrupt handling and init

2013-02-07 Thread Girish KS
On Thu, Feb 7, 2013 at 3:09 AM, Tomasz Figa wrote: > Hi Girish, > > On Wednesday 06 of February 2013 12:12:29 Girish KS wrote: >> On Wed, Feb 6, 2013 at 2:26 AM, Grant Likely > wrote: >> > On Tue, 5 Feb 2013 15:09:41 -0800, Girish K S > wrote: >> >> The status of the interrupt is available in t

Re: [PATCH 2/5] spi: pl022: use generic DMA slave configuration if possible

2013-02-07 Thread Linus Walleij
On Mon, Jan 28, 2013 at 6:57 PM, Arnd Bergmann wrote: > With the new OF DMA binding, it is possible to completely avoid the > need for platform_data for configuring a DMA channel. In cases where the > platform has already been converted, calling dma_request_slave_channel > should get all the nece

Re: [PATCH 2/5] spi: pl022: use generic DMA slave configuration if possible

2013-02-07 Thread Linus Walleij
On Tue, Jan 29, 2013 at 2:13 PM, Arnd Bergmann wrote: > On Tuesday 29 January 2013, Andy Shevchenko wrote: >> > + pl022->dummypage = kmalloc(PAGE_SIZE, GFP_KERNEL); >> >> Where this memory will be freed? >> In dependence of the answer could you consider to use >> devm_kmalloc or __get_free_page

Re: [PATCH 3/4] spi: s3c64xx: add gpio quirk for controller

2013-02-07 Thread Girish KS
On Thu, Feb 7, 2013 at 3:55 AM, Mark Brown wrote: > On Tue, Feb 05, 2013 at 03:09:43PM -0800, Girish K S wrote: >> This patch adds support for spi controllers with >> dedicated clk/miso/mosi/cs pins. It skips the gpio >> parsing and initialization for controllers that >> have dedicated pins. > >>

Re: [PATCH 2/5] spi: pl022: use generic DMA slave configuration if possible

2013-02-07 Thread Arnd Bergmann
On Thursday 07 February 2013, Linus Walleij wrote: > On Tue, Jan 29, 2013 at 2:13 PM, Arnd Bergmann wrote: > > On Tuesday 29 January 2013, Andy Shevchenko wrote: > > >> > + pl022->dummypage = kmalloc(PAGE_SIZE, GFP_KERNEL); > >> > >> Where this memory will be freed? > >> In dependence of the an

Re: [PATCH 2/5] spi: pl022: use generic DMA slave configuration if possible

2013-02-07 Thread Linus Walleij
On Thu, Feb 7, 2013 at 8:42 PM, Arnd Bergmann wrote: > On Thursday 07 February 2013, Linus Walleij wrote: >> Actually I once read about a feature where the kernel provides >> a static page full of zeroes or something like this, that would be >> ideal to use in cases like this, then all of this du

Re: [PATCH 2/5] spi: pl022: use generic DMA slave configuration if possible

2013-02-07 Thread Arnd Bergmann
On Thursday 07 February 2013 21:19:04 Linus Walleij wrote: > On Thu, Feb 7, 2013 at 8:42 PM, Arnd Bergmann wrote: > > On Thursday 07 February 2013, Linus Walleij wrote: > > >> Actually I once read about a feature where the kernel provides > >> a static page full of zeroes or something like this,

Re: [PATCH 1/4] spi: s3c64xx: modified error interrupt handling and init

2013-02-07 Thread Girish KS
On Wed, Feb 6, 2013 at 3:48 PM, Grant Likely wrote: > On Wed, Feb 6, 2013 at 8:12 PM, Girish KS wrote: >> On Wed, Feb 6, 2013 at 2:26 AM, Grant Likely >> wrote: >>> On Tue, 5 Feb 2013 15:09:41 -0800, Girish K S >>> wrote: The status of the interrupt is available in the status register,

Re: [PATCH v2 7/7] spi: spi-fsl-spi: Add support for gpio chipselects for GRLIB type cores

2013-02-07 Thread Andreas Larsson
On 2013-02-07 17:08, Anton Vorontsov wrote: > On Thu, Feb 07, 2013 at 02:12:11PM +0100, Andreas Larsson wrote: >> struct fsl_spi_reg *reg_base; >> -int retval; >> +int retval, desel; > > We don't usually place variable declarations on the same line, unless the > variables are closely r