public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] omap2_mcspi: Flush posted writes
@ 2010-03-10 10:18 Roman Tereshonkov
  2010-03-10 10:18 ` [PATCH 2/2] omap2_mcspi: small fixes of output data format Roman Tereshonkov
  2010-03-11 22:40 ` [PATCH 1/2] omap2_mcspi: Flush posted writes Tony Lindgren
  0 siblings, 2 replies; 3+ messages in thread
From: Roman Tereshonkov @ 2010-03-10 10:18 UTC (permalink / raw)
  To: linux-omap; +Cc: scott, gadiyar, Roman Tereshonkov

mcspi_write_chconf0 is used to control rx/tx triggering.
Post-write flushing is needed to get the immediate effect.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
---
 drivers/spi/omap2_mcspi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index 715c518..35b31fe 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -203,6 +203,7 @@ static inline void mcspi_write_chconf0(const struct spi_device *spi, u32 val)
 
 	cs->chconf0 = val;
 	mcspi_write_cs_reg(spi, OMAP2_MCSPI_CHCONF0, val);
+	mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHCONF0);
 }
 
 static void omap2_mcspi_set_dma_req(const struct spi_device *spi,
-- 
1.6.2.rc1.3.g81d3f


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] omap2_mcspi: small fixes of output data format
  2010-03-10 10:18 [PATCH 1/2] omap2_mcspi: Flush posted writes Roman Tereshonkov
@ 2010-03-10 10:18 ` Roman Tereshonkov
  2010-03-11 22:40 ` [PATCH 1/2] omap2_mcspi: Flush posted writes Tony Lindgren
  1 sibling, 0 replies; 3+ messages in thread
From: Roman Tereshonkov @ 2010-03-10 10:18 UTC (permalink / raw)
  To: linux-omap; +Cc: scott, gadiyar, Roman Tereshonkov

Replaces %04x by %08x for 32-bits data output.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
---
 drivers/spi/omap2_mcspi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index 35b31fe..2ebdca8 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -532,7 +532,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
 					goto out;
 				}
 #ifdef VERBOSE
-				dev_dbg(&spi->dev, "write-%d %04x\n",
+				dev_dbg(&spi->dev, "write-%d %08x\n",
 						word_len, *tx);
 #endif
 				__raw_writel(*tx++, tx_reg);
@@ -550,7 +550,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
 					mcspi_write_chconf0(spi, l);
 				*rx++ = __raw_readl(rx_reg);
 #ifdef VERBOSE
-				dev_dbg(&spi->dev, "read-%d %04x\n",
+				dev_dbg(&spi->dev, "read-%d %08x\n",
 						word_len, *(rx - 1));
 #endif
 			}
-- 
1.6.2.rc1.3.g81d3f


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] omap2_mcspi: Flush posted writes
  2010-03-10 10:18 [PATCH 1/2] omap2_mcspi: Flush posted writes Roman Tereshonkov
  2010-03-10 10:18 ` [PATCH 2/2] omap2_mcspi: small fixes of output data format Roman Tereshonkov
@ 2010-03-11 22:40 ` Tony Lindgren
  1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2010-03-11 22:40 UTC (permalink / raw)
  To: Roman Tereshonkov; +Cc: linux-omap, scott, gadiyar

* Roman Tereshonkov <roman.tereshonkov@nokia.com> [100310 02:16]:
> mcspi_write_chconf0 is used to control rx/tx triggering.
> Post-write flushing is needed to get the immediate effect.
> 
> Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
> ---
>  drivers/spi/omap2_mcspi.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
> index 715c518..35b31fe 100644
> --- a/drivers/spi/omap2_mcspi.c
> +++ b/drivers/spi/omap2_mcspi.c
> @@ -203,6 +203,7 @@ static inline void mcspi_write_chconf0(const struct spi_device *spi, u32 val)
>  
>  	cs->chconf0 = val;
>  	mcspi_write_cs_reg(spi, OMAP2_MCSPI_CHCONF0, val);
> +	mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHCONF0);
>  }
>  
>  static void omap2_mcspi_set_dma_req(const struct spi_device *spi,

Looks like good fixes, these should be resent to the
spi list and maintainers. See the MAINTAINERS file.

Regards,

Tony 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-11 22:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10 10:18 [PATCH 1/2] omap2_mcspi: Flush posted writes Roman Tereshonkov
2010-03-10 10:18 ` [PATCH 2/2] omap2_mcspi: small fixes of output data format Roman Tereshonkov
2010-03-11 22:40 ` [PATCH 1/2] omap2_mcspi: Flush posted writes Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox