spi-imx race condition

2013-11-24 Thread Marek Vasut
to master mode. Any ideas please? Thank you! Best regards, Marek Vasut -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software

Re: [PATCH 01/13] spi: spi-mxs: Always set LOCK_CS

2013-10-18 Thread Marek Vasut
Dear Trent Piepho, On Thu, Oct 17, 2013 at 9:33 PM, Marek Vasut ma...@denx.de wrote: Dear Mark Brown, On Tue, Oct 01, 2013 at 01:14:25PM -0700, Trent Piepho wrote: There are two bits which control the CS line in the CTRL0 register: LOCK_CS and IGNORE_CRC. The latter would be better

Re: [PATCH 01/13] spi: spi-mxs: Always set LOCK_CS

2013-10-18 Thread Marek Vasut
Hi Mark, On Fri, Oct 18, 2013 at 08:23:21AM +0200, Marek Vasut wrote: SPI flashes are the most significant users of this IP block on the MX23/MX28, that's why I'm unhappy patches that might break them were pulled in without any Tested-by/Reviewed-by/Acked-by . If the patches aren't

Re: [PATCH 01/13] spi: spi-mxs: Always set LOCK_CS

2013-10-18 Thread Marek Vasut
Dear Trent Piepho, On Thu, Oct 17, 2013 at 11:23 PM, Marek Vasut ma...@denx.de wrote: Dear Trent Piepho, On Thu, Oct 17, 2013 at 9:33 PM, Marek Vasut ma...@denx.de wrote: Dear Mark Brown, On Tue, Oct 01, 2013 at 01:14:25PM -0700, Trent Piepho wrote: There are two bits which

Re: [PATCH 01/13] spi: spi-mxs: Always set LOCK_CS

2013-10-18 Thread Marek Vasut
Dear Mark Brown, On Fri, Oct 18, 2013 at 04:38:52PM +0200, Marek Vasut wrote: I don't quite understand this, is it OK to merge untested patches? I have them in my review queue, but I was simply busy so I didn't get to them for a while. Fabio is unfortunatelly also N/A now, so things

Re: [PATCH 01/13] spi: spi-mxs: Always set LOCK_CS

2013-10-17 Thread Marek Vasut
of testing? I was busy so I couldn't even review them yet, sorry. Best regards, Marek Vasut -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI

Re: [PATCH 01/13] spi: spi-mxs: Always set LOCK_CS

2013-10-03 Thread Marek Vasut
to the hardware FIFO fill level. The code can be simplified by just setting LOCK_CS once and then not needing to deal with it at all in the PIO and DMA transfer functions. Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com

Re: [PATCH V2 01/12] spi/mxs: Always set LOCK_CS

2013-04-14 Thread Marek Vasut
up if you want to do this, as the hardware doesn't appear to do this in any sane manner. The code can be simplified by just setting LOCK_CS once and then not needing to deal with it in the PIO and DMA transfer functions. Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma

Re: [PATCH] mxs/spi: Add SPI slave mode operation DT prop

2013-04-14 Thread Marek Vasut
Dear Trent Piepho, On Wed, Mar 20, 2013 at 4:35 PM, Marek Vasut ma...@denx.de wrote: On Thu, Aug 23, 2012 at 7:42 PM, Marek Vasut + - The DMA has to wait indefinitelly for the arriving data. Is there a reason that this must be done? I'd guess that after the SSP

Re: [PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-03 Thread Marek Vasut
Dear Trent Piepho, On Apr 2, 2013 7:27 PM, Marek Vasut ma...@denx.de wrote: The only useful thing mxs_spi_setup_transfer() (which is no longer called) did in this instance was make that check. btw. I was under the impression the MXS SSP block can handle other word-widths than 8

Re: [PATCH 1/5] spi/mxs: Fix extra CS pulses and read mode in multi-transfer messages

2013-04-02 Thread Marek Vasut
Dear Trent Piepho, On Mon, Apr 1, 2013 at 9:22 PM, Marek Vasut ma...@denx.de wrote: On Mon, Apr 1, 2013 at 4:11 PM, Marek Vasut ma...@denx.de wrote: +#define TXRX_WRITE 1 /* This is a write */ +#define TXRX_DEASSERT_CS 2 /* De-assert CS at end of txrx

Re: [PATCH V2 01/12] spi/mxs: Always set LOCK_CS

2013-04-02 Thread Marek Vasut
with it in the PIO and DMA transfer functions. Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c |8 ++-- 1 file changed, 2 insertions(+), 6

Re: [PATCH V2 03/12] spi/mxs: Change flag arguments in txrx functions to bit flags

2013-04-02 Thread Marek Vasut
is the last we need to know but rather the transfers which after which CS should be de-asserted. This also extends the driver to not ignore cs_change when setting the DEASSERT_CS nee last flag. Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam

Re: [PATCH V2 05/12] spi/mxs: Fix chip select control bits in DMA mode

2013-04-02 Thread Marek Vasut
that worked and one for DMA that didn't. Change the code to set the CS bits in the message transfer function once. Now the DMA and PIO txrx functions don't need to care about CS at all. Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este

Re: [PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-02 Thread Marek Vasut
will corrupt those transfers. So fix mxs_spi_setup() to not call mxs_spi_setup_transfer(). Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c | 11

Re: [PATCH V2 10/12] spi/mxs: Clean up setup_transfer function

2013-04-02 Thread Marek Vasut
fills it in from the spi_device. However, the spi core does not check if spi_device's speed is zero so we have to do that still. Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org Ok

Re: [PATCH V2 11/12] spi/mxs: Don't set clock for each xfer

2013-04-02 Thread Marek Vasut
KB/sec. Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/spi

Re: [PATCH 1/5] spi/mxs: Fix extra CS pulses and read mode in multi-transfer messages

2013-04-02 Thread Marek Vasut
Dear Trent Piepho, On Tue, Apr 2, 2013 at 3:32 AM, Marek Vasut ma...@denx.de wrote: Don't see anything in CodingStyle that one should be preferred over the other. There ain't any I'm aware of, but to paraphrase you, let's keep the format that's already used in the driver

Re: [PATCH V2 08/12] spi/mxs: Fix race in setup method

2013-04-02 Thread Marek Vasut
Dear Trent Piepho, On Tue, Apr 2, 2013 at 4:31 PM, Marek Vasut ma...@denx.de wrote: static int mxs_spi_setup(struct spi_device *dev) { - int err = 0; - if (!dev-bits_per_word) dev-bits_per_word = 8; if (dev-mode ~(SPI_CPOL

Re: [PATCH 1/5] spi/mxs: Fix extra CS pulses and read mode in multi-transfer messages

2013-04-01 Thread Marek Vasut
works, getting the CS to automatically turn off when a different slave is addressed might not work. Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c | 86

Re: [PATCH 2/5] spi/mxs: Fix chip select control bits in DMA mode

2013-04-01 Thread Marek Vasut
on each turn? Did you actually test this? Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c | 40 +++- 1 file changed, 15

Re: [PATCH 4/5] spi/mxs: Remove bogus setting of ssp clk rate field

2013-04-01 Thread Marek Vasut
-ssp.c then? Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi

Re: [PATCH 5/5] spi/mxs: Fix multiple slave bug and don't set clock for each xfer

2013-04-01 Thread Marek Vasut
are not clear. Please clean up and resubmit with only the relevant changes. Signed-off-by: Trent Piepho tpie...@gmail.com Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c | 54

Re: [PATCH 2/5] spi/mxs: Fix chip select control bits in DMA mode

2013-04-01 Thread Marek Vasut
Dear Trent Piepho, On Mon, Apr 1, 2013 at 4:13 PM, Marek Vasut ma...@denx.de wrote: Change the code to set the CS bits in the message transfer function once. Now the DMA and PIO txrx functions don't need to care about CS at all. Ok, lemme ask this one more time -- will the DMA work

Re: [PATCH 4/5] spi/mxs: Remove bogus setting of ssp clk rate field

2013-04-01 Thread Marek Vasut
Dear Trent Piepho, On Mon, Apr 1, 2013 at 4:16 PM, Marek Vasut ma...@denx.de wrote: The ssp struct has a clock rate field, to provide the actual value, in Hz, of the SSP output clock (the rate of SSP_SCK) after mxs_ssp_set_clk_rate() is called. It should be read-only, except

Re: [PATCH 2/5] spi/mxs: Fix chip select control bits in DMA mode

2013-04-01 Thread Marek Vasut
Dear Trent Piepho, On Mon, Apr 1, 2013 at 4:30 PM, Marek Vasut ma...@denx.de wrote: -static uint32_t mxs_spi_cs_to_reg(unsigned cs) +static u32 mxs_spi_cs_to_reg(unsigned cs) { - uint32_t select = 0; + u32 select = 0; I'll make it a separate patch

Re: [PATCH 4/5] spi/mxs: Remove bogus setting of ssp clk rate field

2013-04-01 Thread Marek Vasut
Dear Trent Piepho, On Mon, Apr 1, 2013 at 4:37 PM, Marek Vasut ma...@denx.de wrote: On Mon, Apr 1, 2013 at 4:16 PM, Marek Vasut ma...@denx.de wrote: The ssp struct has a clock rate field, to provide the actual value, in Hz, of the SSP output clock (the rate of SSP_SCK) after

Re: [PATCH 1/5] spi/mxs: Fix extra CS pulses and read mode in multi-transfer messages

2013-04-01 Thread Marek Vasut
Dear Trent Piepho, On Mon, Apr 1, 2013 at 4:11 PM, Marek Vasut ma...@denx.de wrote: +#define TXRX_WRITE 1 /* This is a write */ +#define TXRX_DEASSERT_CS 2 /* De-assert CS at end of txrx */ New flags? I'm sure the GCC can optimize function parameters pretty

Re: [PATCH] mxs/spi: Add SPI slave mode operation DT prop

2013-03-20 Thread Marek Vasut
Dear Trent Piepho, On Thu, Aug 23, 2012 at 7:42 PM, Marek Vasut marex-ynqeqjns...@public.gmane.org wrote: This allows user to select the slave mode of operation of the controller. This is by no means standard, see the binding documentation for details, there is plenty of them. Sadly

Re: [PATCH V2] mxs: spi: clear XFER_COUNT in ctrl0 field in DMA descriptor

2013-01-07 Thread Marek Vasut
(SSP_TIMEOUT) to happen in the processing of the last DMA descriptor, and thus reads and writes were failing. This is a fix for the problem, by clearing XFER_COUNT bytes in ctrl0 before setting the new XFER_COUNT for DMA descriptor. Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este

Re: [PATCH] mxs: spi: clear XFER_LEN in CTRL0 register during DMA

2012-12-25 Thread Marek Vasut
for the issue. , by clearing the XFER_LEN bytes always before reading the new size for XFER_LEN. before setting new XFER_COUNT into the ctrl0 field of DMA control transfer. Cc: Marek Vasut ma...@denx.de Cc: Fabio Estevam fabio.este...@freescale.com Cc: Shawn Guo shawn@linaro.org Signed-off

Re: [PATCH 1/2] spi: mxs: Assign message status after transfer finished

2012-10-26 Thread Marek Vasut
Dear Mark Brown, On Sun, Oct 14, 2012 at 04:32:55AM +0200, Marek Vasut wrote: In the current code implementing the MXS SPI driver, every transferred message had assigned status = 0, which is not correct. Properly assign status returned from the I/O functions. Applied both, thanks

Re: [PATCH 1/2] spi: mxs: Assign message status after transfer finished

2012-10-26 Thread Marek Vasut
Dear Mark Brown, On Fri, Oct 26, 2012 at 02:31:53PM +0200, Marek Vasut wrote: Dear Mark Brown, Applied both, thanks. Will they hit 3.7 please? I hadn't been going to do that, no - nothing about them seemed especially urgent? They're fixes, I'd be glad if you could slip them

[PATCH 1/2] spi: mxs: Assign message status after transfer finished

2012-10-13 Thread Marek Vasut
In the current code implementing the MXS SPI driver, every transferred message had assigned status = 0, which is not correct. Properly assign status returned from the I/O functions. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Fabio Estevam fabio.este

[PATCH 2/2] spi: mxs: Terminate DMA in case of DMA timeout

2012-10-13 Thread Marek Vasut
In case the SPI DMA times out, the DMA might still be in some kind of inconsistent state. Issue dmaengine_terminate_all() on the particular channel to kill off all operations before continuing. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Fabio Estevam fabio.este

Re: [PATCH V4] MXS: Implement DMA support into mxs-i2c

2012-10-08 Thread Marek Vasut
Dear Wolfram Sang, On Fri, Aug 24, 2012 at 05:44:31AM +0200, Marek Vasut wrote: This patch implements DMA support into mxs-i2c. DMA transfers are now enabled via DT. The DMA operation is enabled by default. Signed-off-by: Marek Vasut ma...@denx.de Thanks, applied to -next. I am

Re: [PATCH V4] MXS: Implement DMA support into mxs-i2c

2012-09-26 Thread Marek Vasut
Dear Wolfram Sang, [...] Didn't you claim you're adding this DMA patch into next some time ago finally? ;-) Subject: Re: I2C_FUNC_SMBUS_QUICK on i2c-mxs Message-ID: 20120830135612.gj27...@pengutronix.de Best regards, Marek Vasut

Re: [PATCH V4] MXS: Implement DMA support into mxs-i2c

2012-09-16 Thread Marek Vasut
Dear Wolfram Sang, On Fri, Aug 24, 2012 at 05:44:31AM +0200, Marek Vasut wrote: This patch implements DMA support into mxs-i2c. DMA transfers are now enabled via DT. The DMA operation is enabled by default. Signed-off-by: Marek Vasut ma...@denx.de Unsurprisingly, I also couldn't get

Re: [PATCH V4] MXS: Implement DMA support into mxs-i2c

2012-09-16 Thread Marek Vasut
simply forget to add the binding, you'd need to print a warning. ? It is on by default because of the entry in the dtsi. And the status of DMA will be printed. + dev_info(dev, registered. DMA: %s\n, i2c-dma_mode ? on : off); dev_debug() ? Yup. Best regards, Marek Vasut

Re: [PATCH 0/4] mxs/spi: Fixes and improvements

2012-09-05 Thread Marek Vasut
Dear Mark Brown, On Tue, Sep 04, 2012 at 04:40:14AM +0200, Marek Vasut wrote: I humbly present fixes for further issues found in the SPI driver for i.MX23/i.MX28. Applied all, thanks. Thanks Mark, sorry for pulling the bugs in. Best regards, Marek Vasut

[PATCH 4/4] mxs/spi: Rework the mxs_ssp_timeout to be more readable

2012-09-03 Thread Marek Vasut
pointless. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Mark Brown broo...@opensource.wolfsonmicro.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c | 20

[PATCH 3/4] mxs/spi: Decrement the DMA/PIO border

2012-09-03 Thread Marek Vasut
flash clocked at 40MHz. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Mark Brown broo...@opensource.wolfsonmicro.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c

[PATCH 0/4] mxs/spi: Fixes and improvements

2012-09-03 Thread Marek Vasut
and fixes for minor details. Marek Vasut (4): mxs/spi: Fix issues when doing long continuous transfer mxs/spi: Increment the transfer length only if transfer succeeded mxs/spi: Decrement the DMA/PIO border mxs/spi: Rework the mxs_ssp_timeout to be more readable drivers/spi/spi-mxs.c

[PATCH 1/4] mxs/spi: Fix issues when doing long continuous transfer

2012-09-03 Thread Marek Vasut
again. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Mark Brown broo...@opensource.wolfsonmicro.com Cc: Shawn Guo shawn@linaro.org --- drivers/spi/spi-mxs.c | 141

[PATCH 2/4] mxs/spi: Increment the transfer length only if transfer succeeded

2012-09-03 Thread Marek Vasut
The transfer function incremented (struct spi_message)-actual_length unconditionally, even if the transfer failed. Rectify this by incrementing this only if transfer succeeded. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Fabio Estevam fabio.este...@freescale.com Cc

Re: [PATCH] spi/mxs: Fix device remove function

2012-08-24 Thread Marek Vasut
driver data to NULL. Remove the unnecessaary calls to platform_set_drvdata(). Cc: Marek Vasut ma...@denx.de Signed-off-by: Guenter Roeck li...@roeck-us.net Damn, I thought this was fixed, apparently not. Thanks! Reviewed-by: Marek Vasut ma...@denx.de --- Applies to -next (as of 8/24/12

Re: [PATCH] spi/mxs: Fix device remove function

2012-08-24 Thread Marek Vasut
Dear Guenter Roeck, On Fri, Aug 24, 2012 at 10:10:12PM +0200, Marek Vasut wrote: Dear Guenter Roeck, The call sequence spi_alloc_master/spi_register_master/spi_unregister_master is complete; it reduces the device reference count to zero, which results in device memory being

[PATCH V2] mxs/spi: Fix misuse of init_completion

2012-08-23 Thread Marek Vasut
the mxs_spi_txrx_dma(), since whole this section is protected by mutex in SPI core. This by no means allows this issue to exit though. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Shawn Guo shawn@linaro.org Cc: Mark Brown broo...@opensource.wolfsonmicro.com Cc: Fabio Estevam

[PATCH] mxs/spi: Restart the block after unsuccessful transfer

2012-08-23 Thread Marek Vasut
Restart the SSP block in case the SSP transfer failed in any way. The block hung in some cases otherwise. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Shawn Guo shawn@linaro.org Cc: Mark Brown broo...@opensource.wolfsonmicro.com Cc: Fabio Estevam fabio.este

[PATCH] mxs/spi: Add SPI slave mode operation DT prop

2012-08-23 Thread Marek Vasut
for people who do know very well what they are doing, otherwise this should never be touched. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Shawn Guo shawn@linaro.org Cc: Mark Brown broo...@opensource.wolfsonmicro.com Cc: Fabio Estevam fabio.este...@freescale.com

Re: [PATCH V2] mxs/spi: Fix misuse of init_completion

2012-08-23 Thread Marek Vasut
Dear Chris Ball, Hi Marek, On Thu, Aug 23 2012, Marek Vasut wrote: The init_completion() call does reinit not only the variable carrying the flag that the completion finished, but also initialized the waitqueue associated with the completion. On the contrary, the INIT_WAITQUEUE() call

[PATCH V3] mxs/spi: Fix misuse of init_completion

2012-08-23 Thread Marek Vasut
the mxs_spi_txrx_dma(), since whole this section is protected by mutex in SPI core. This by no means allows this issue to exit though. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Shawn Guo shawn@linaro.org Cc: Mark Brown broo...@opensource.wolfsonmicro.com Cc: Fabio Estevam

[PATCH 1/2] ARM: mx28: Add SPI pinmux into imx28.dtsi

2012-08-23 Thread Marek Vasut
Add this SSP pin multiplexing configuration into the imx28.dtsi file. This covers pinmux for all four SSP ports available on the i.MX28. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Fabio Estevam fabio.este...@freescale.com Cc: Mark Brown broo

[PATCH 2/2] ARM: mxs: Update DENX M28 machine and dts file

2012-08-23 Thread Marek Vasut
Update the mach-mxs machine by removing the enet_clkout(). The new revision of the board doesn't need that. Also, update the DTS file with all the new drivers pulled in the mainline recently, that is, SPI, LRADC, USB. Also, remove bogus AUART3. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris

[PATCH V4] MXS: Implement DMA support into mxs-i2c

2012-08-23 Thread Marek Vasut
This patch implements DMA support into mxs-i2c. DMA transfers are now enabled via DT. The DMA operation is enabled by default. Signed-off-by: Marek Vasut ma...@denx.de CC: Fabio Estevam fabio.este...@freescale.com Cc: linux-...@vger.kernel.org CC: Shawn Guo shawn@linaro.org Cc: Wolfram Sang

[PATCH] spi/mxs: Make the SPI block clock speed configurable via DT

2012-08-22 Thread Marek Vasut
Add clock-frequency property, which allows configuring the SPI block's base speed. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Shawn Guo shawn@linaro.org Cc: Mark Brown broo...@opensource.wolfsonmicro.com --- Documentation/devicetree/bindings/spi/mxs-spi.txt

[PATCH] mxs/spi: Fix misuse of init_completion

2012-08-22 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Shawn Guo shawn@linaro.org Cc: Mark Brown broo...@opensource.wolfsonmicro.com Cc: Fabio Estevam fabio.este...@freescale.com --- drivers/spi/spi-mxs.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

Re: [PATCH] mxs/spi: Fix misuse of init_completion

2012-08-22 Thread Marek Vasut
Dear Chris Ball, Hi, On Wed, Aug 22 2012, Marek Vasut wrote: Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Shawn Guo shawn@linaro.org Cc: Mark Brown broo...@opensource.wolfsonmicro.com Cc: Fabio Estevam fabio.este...@freescale.com

Re: [PATCH 06/10 V2] spi: Add SPI driver for mx233/mx28

2012-08-03 Thread Marek Vasut
with submission :) I'll fix it in a bit and resubmit in the evening. Thanks, Fabio Estevam Best regards, Marek Vasut -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security

Re: [PATCH 06/10 V2] spi: Add SPI driver for mx233/mx28

2012-08-03 Thread Marek Vasut
the chip-select lines (nCS pins). */ I hope it'll suffice. Recycling bits in registers is really crazy practice and I'd like to avoid these getting out of scope of this flaw's location. Thanks, Fabio Estevam Best regards, Marek Vasut

[PATCH 00/10 V3] MXS SPI driver

2012-08-03 Thread Marek Vasut
This patchset adds SPI master support for Freescale i.MX233/i.MX28. This is rebased on top of next-20120713. Please consider applying, bugs shall now be squashed during the previous two review rounds. Marek Vasut (10): mmc: spi: Move SSP register definitions into separate file mmc: spi

[PATCH 01/10] mmc: spi: Move SSP register definitions into separate file

2012-08-03 Thread Marek Vasut
-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux ARM kernel linux-arm-ker...@lists.infradead.org Cc: Mark Brown broo...@opensource.wolfsonmicro.com CC: Shawn Guo

[PATCH 08/10 V2] spi: Add DMA support into SPI driver

2012-08-03 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux ARM kernel linux-arm-ker...@lists.infradead.org Cc

[PATCH 06/10 V3] spi: Add SPI driver for mx233/mx28

2012-08-03 Thread Marek Vasut
This is slightly reworked version of the SPI driver. Support for DT has been added and it's been converted to queued API. Based on previous attempt by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Marek Vasut ma...@denx.de Cc

[PATCH 02/10] mmc: spi: Rename IMX2[38]_MMC to IMX2[38]_SSP

2012-08-03 Thread Marek Vasut
Since the SSP controller can act as both SPI and MMC host, renaming the enum to properly reflect the naming seems appropriate. Based on previous attempt by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Marek Vasut ma...@denx.de

[PATCH 03/10] mmc: spi: Add necessary bits into mxs-spi.h

2012-08-03 Thread Marek Vasut
Add missing register bits and registers into mxs-spi.h . These will be used by the SPI driver. Based on previous attempt by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att

[PATCH 05/10] mmc: spi: Pull out the SSP clock configuration function

2012-08-03 Thread Marek Vasut
Pull out the MMC clock configuration function and make it into SSP clock configuration function, so it can be used by the SPI driver too. Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio

[PATCH 09/10 V2] spi: Add SSP/SPI device tree documentation

2012-08-03 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux ARM kernel linux-arm-ker...@lists.infradead.org Cc

[PATCH 07/10] mmc: spi: Pull out common DMA parts from MXS MMC

2012-08-03 Thread Marek Vasut
These parts will be used by the MXS SPI driver too. Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux

[PATCH 10/10] ARM: mx28: Add SPI pinmux into imx28.dtsi

2012-08-03 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux ARM kernel linux-arm-ker...@lists.infradead.org Cc

Re: [PATCH 06/10 V2] spi: Add SPI driver for mx233/mx28

2012-08-02 Thread Marek Vasut
Dear Mark Brown, Thanks for the review! On Mon, Jul 23, 2012 at 10:40:48PM +0200, Marek Vasut wrote: This is slightly reworked version of the SPI driver. Support for DT has been added and it's been converted to queued API. Looks reasonable overall. + bits_per_word = dev

Re: [PATCH 08/10 RESEND] spi: Add DMA support into SPI driver

2012-08-02 Thread Marek Vasut
Dear Mark Brown, On Mon, Jul 23, 2012 at 10:40:50PM +0200, Marek Vasut wrote: + /* +* Small blocks can be transfered via PIO. +* Measured by empiric means: +* +* dd if=/dev/mtdblock0 of=/dev/null bs=1024k count=1

Re: [PATCH 06/10 V2] spi: Add SPI driver for mx233/mx28

2012-08-02 Thread Marek Vasut
Dear Mark Brown, On Thu, Aug 02, 2012 at 04:58:38PM +0200, Marek Vasut wrote: It'd be nice to only keep the clocks enabled while doing transfers but again totally non-essential. Hm, this is spread across mxs. Shawn, is there any plan for PM implementation for MXS ? Take a look

Re: [06/10,V2] spi: Add SPI driver for mx233/mx28

2012-08-01 Thread Marek Vasut
we only need to have spi_master_get and spi_master_put matched. Naw, spi_master_get() does refcounting, spi_alloc_master() doesnt. You don't need to match spi_alloc_master() with spi_master_put() Regards, Shawn Best regards, Marek Vasut

Re: [PATCH 08/10 V2] spi: Add DMA support into SPI driver

2012-08-01 Thread Marek Vasut
Dear Marek Vasut, [...] -out_host_free: +out_free_dma: + dma_release_channel(ssp-dmach); clk_disable_unprepare(ssp-clk); +out_host_free: spi_master_put(host); kfree(host); + Please remove this newline. return ret; } Missing dma_release_channel

Re: [06/10,V2] spi: Add SPI driver for mx233/mx28

2012-08-01 Thread Marek Vasut
. And spi_master_put() is not always called, meaning there is either a memory leak or I am completely confused. I'll poke through the stuff later if you won't get your answers (later == around tomorrow) Thanks, Guenter Best regards, Marek Vasut

Re: [06/10,V2] spi: Add SPI driver for mx233/mx28

2012-08-01 Thread Marek Vasut
Dear Guenter Roeck, On Wed, Aug 01, 2012 at 11:16:15AM +0530, Shubhrajyoti Datta wrote: On Wed, Aug 1, 2012 at 10:59 AM, Guenter Roeck li...@roeck-us.net wrote: On Wed, Aug 01, 2012 at 07:00:54AM +0200, Marek Vasut wrote: Dear Shawn Guo, On Tue, Jul 31, 2012 at 08:35:59PM -0700

Re: [06/10,V2] spi: Add SPI driver for mx233/mx28

2012-08-01 Thread Marek Vasut
Dear Guenter Roeck, On Wed, Aug 01, 2012 at 08:10:37AM +0200, Marek Vasut wrote: Dear Shawn Guo, On Tue, Jul 31, 2012 at 10:42:28PM -0700, Guenter Roeck wrote: On Wed, Aug 01, 2012 at 01:58:56PM +0800, Shawn Guo wrote: On Tue, Jul 31, 2012 at 10:29:47PM -0700, Guenter Roeck

Re: [06/10,V2] spi: Add SPI driver for mx233/mx28

2012-07-31 Thread Marek Vasut
a nasty kernel crash. It seems the spi_master class takes care of that kfree() in spi.c:spi_master_release() . Good catch, thanks! Thanks, Guenter Best regards, Marek Vasut -- Live Security Virtual Conference Exclusive

Re: [06/10,V2] spi: Add SPI driver for mx233/mx28

2012-07-31 Thread Marek Vasut
like that to me ... Regards, Shawn Best regards, Marek Vasut -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can

Re: [PATCH 09/10 RESEND] spi: Add SSP/SPI device tree documentation

2012-07-28 Thread Marek Vasut
Dear Shawn Guo, On Tue, Jul 24, 2012 at 09:43:48PM +0200, Marek Vasut wrote: This is actually not the first place I was curious about in the imx28 DTS ... yes, the size is 0x2000, but 2000 as is is used in multiple places across imx28. Shawn? It seems that I overlooked the problem when

Re: [PATCH 09/10 RESEND] spi: Add SSP/SPI device tree documentation

2012-07-24 Thread Marek Vasut
Dear Sergei Shtylyov, Hello. On 07/24/2012 12:40 AM, Marek Vasut wrote: Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely

[PATCH 04/10 RESEND] mmc: spi: Pull out parts shared between MMC and SPI

2012-07-23 Thread Marek Vasut
Abstract out the common part of private data shared between MMC and SPI. These shall later allow to use common clock configuration function. Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio

[PATCH 01/10 RESEND] mmc: spi: Move SSP register definitions into separate file

2012-07-23 Thread Marek Vasut
-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux ARM kernel linux-arm-ker...@lists.infradead.org Cc: Mark Brown broo...@opensource.wolfsonmicro.com CC: Shawn Guo

[PATCH 03/10 V2] mmc: spi: Add necessary bits into mxs-spi.h

2012-07-23 Thread Marek Vasut
Add missing register bits and registers into mxs-spi.h . These will be used by the SPI driver. Based on previous attempt by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att

[PATCH 05/10 V2] mmc: spi: Pull out the SSP clock configuration function

2012-07-23 Thread Marek Vasut
Pull out the MMC clock configuration function and make it into SSP clock configuration function, so it can be used by the SPI driver too. Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio

[PATCH 07/10 RESEND] mmc: spi: Pull out common DMA parts from MXS MMC

2012-07-23 Thread Marek Vasut
These parts will be used by the MXS SPI driver too. Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux

[PATCH 10/10 RESEND] ARM: mx28: Add SPI pinmux into imx28.dtsi

2012-07-23 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de Cc: Attila Kinali att...@kinali.ch Cc: Chris Ball c...@laptop.org CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux ARM kernel linux-arm-ker...@lists.infradead.org Cc

Re: [PATCH 05/10] mmc: spi: Pull out the SSP clock configuration function

2012-07-18 Thread Marek Vasut
Dear Attila Kinali, Good morning Marek, On Tue, 17 Jul 2012 23:48:34 +0200 Marek Vasut ma...@denx.de wrote: There is a EXPORT_SYMBOL_GPL(mxs_ssp_set_clk_rate); missing here. What for? To be able to compile mxs-mmc as a module Argh, good point. Attila

Re: Linux SPI slave support

2012-07-17 Thread Marek Vasut
Dear Shubhrajyoti Datta, On Mon, Jul 16, 2012 at 5:56 AM, Marek Vasut ma...@denx.de wrote: Dear Shubhrajyoti Datta, Hello, On Sat, Jun 30, 2012 at 8:45 AM, Marek Vasut ma...@denx.de wrote: Hello, is there currently any ongoing effort to support SPI slave mode in Linux

Re: [PATCH 05/10] mmc: spi: Pull out the SSP clock configuration function

2012-07-17 Thread Marek Vasut
Dear Attila Kinali, On Mon, 16 Jul 2012 14:09:52 +0200 Marek Vasut ma...@denx.de wrote: Pull out the MMC clock configuration function and make it into SSP clock configuration function, so it can be used by the SPI driver too. diff --git a/drivers/clk/mxs/clk-ssp.c b/drivers/clk/mxs

Re: [PATCH 00/10] MXS SPI driver

2012-07-17 Thread Marek Vasut
Dear Mark Brown, On Mon, Jul 16, 2012 at 02:09:47PM +0200, Marek Vasut wrote: This patchset adds SPI master support for Freescale i.MX233/i.MX28. This is rebased on top of next-20120713. Please consider applying, bugs shall now be squashed during the previous two review rounds. Always

Re: [PATCH 04/10 RESEND] mmc: spi: Pull out parts shared between MMC and SPI

2012-07-16 Thread Marek Vasut
version, so can these be applied? I'll post the rebased version again if necessary. Best regards, Marek Vasut -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat

[PATCH 02/10] mmc: spi: Rename IMX2[38]_MMC to IMX2[38]_SSP

2012-07-16 Thread Marek Vasut
Since the SSP controller can act as both SPI and MMC host, renaming the enum to properly reflect the naming seems appropriate. Based on previous attempt by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Marek Vasut ma...@denx.de

[PATCH 01/10] mmc: spi: Move SSP register definitions into separate file

2012-07-16 Thread Marek Vasut
-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Detlev Zundel d...@denx.de CC: Dong Aisheng b29...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux ARM kernel linux-arm-ker...@lists.infradead.org Cc: Rob Herring rob.herr...@calxeda.com CC: Shawn Guo shawn

[PATCH 09/10] spi: Add SSP/SPI device tree documentation

2012-07-16 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Detlev Zundel d...@denx.de CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux ARM kernel linux-arm-ker...@lists.infradead.org Cc: Rob

[PATCH 03/10] mmc: spi: Add necessary bits into mxs-spi.h

2012-07-16 Thread Marek Vasut
Add missing register bits and registers into mxs-spi.h . These will be used by the SPI driver. Based on previous attempt by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org

[PATCH 08/10] spi: Add DMA support into SPI driver

2012-07-16 Thread Marek Vasut
Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Detlev Zundel d...@denx.de CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam fabio.este...@freescale.com Cc: Grant Likely grant.lik...@secretlab.ca Cc: Linux ARM kernel linux-arm-ker...@lists.infradead.org Cc: Rob

[PATCH 00/10] MXS SPI driver

2012-07-16 Thread Marek Vasut
This patchset adds SPI master support for Freescale i.MX233/i.MX28. This is rebased on top of next-20120713. Please consider applying, bugs shall now be squashed during the previous two review rounds. This is a repost (rebased) of the patchset from Jul 6, 2012. Marek Vasut (10): mmc: spi

[PATCH 05/10] mmc: spi: Pull out the SSP clock configuration function

2012-07-16 Thread Marek Vasut
Pull out the MMC clock configuration function and make it into SSP clock configuration function, so it can be used by the SPI driver too. Signed-off-by: Marek Vasut ma...@denx.de Cc: Chris Ball c...@laptop.org Cc: Detlev Zundel d...@denx.de CC: Dong Aisheng b29...@freescale.com Cc: Fabio Estevam

  1   2   >