linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/8] spi: sirf: add fifo reset/start for cmd transfer
@ 2014-09-02  9:02 Barry Song
       [not found] ` <1409648557-5470-1-git-send-email-Barry.Song-kQvG35nSl+M@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Barry Song @ 2014-09-02  9:02 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A, linux-spi-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	workgroup.linux-kQvG35nSl+M, Qipan Li, Barry Song

From: Qipan Li <Qipan.Li-kQvG35nSl+M@public.gmane.org>

for command mode spi transfer, HW spec requires to do fifo reset work to
clear FIFO status.

Signed-off-by: Qipan Li <Qipan.Li-kQvG35nSl+M@public.gmane.org>
Signed-off-by: Barry Song <Baohua.Song-kQvG35nSl+M@public.gmane.org>
---
 drivers/spi/spi-sirf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index 93376a2..7499076 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -311,6 +311,8 @@ static void spi_sirfsoc_cmd_transfer(struct spi_device *spi,
 	u32 cmd;
 
 	sspi = spi_master_get_devdata(spi->master);
+	writel(SIRFSOC_SPI_FIFO_RESET, sspi->base + SIRFSOC_SPI_TXFIFO_OP);
+	writel(SIRFSOC_SPI_FIFO_START, sspi->base + SIRFSOC_SPI_TXFIFO_OP);
 	memcpy(&cmd, sspi->tx, t->len);
 	if (sspi->word_width == 1 && !(spi->mode & SPI_LSB_FIRST))
 		cmd = cpu_to_be32(cmd) >>
-- 
2.1.0



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-09-07  0:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-02  9:02 [PATCH 5/8] spi: sirf: add fifo reset/start for cmd transfer Barry Song
     [not found] ` <1409648557-5470-1-git-send-email-Barry.Song-kQvG35nSl+M@public.gmane.org>
2014-09-02  9:02   ` [PATCH 6/8] spi: sirf: set default spi frequency if it is not set Barry Song
     [not found]     ` <1409648557-5470-2-git-send-email-Barry.Song-kQvG35nSl+M@public.gmane.org>
2014-09-04 22:39       ` Mark Brown
     [not found]         ` <20140904223913.GU29327-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-09-05  7:57           ` Barry Song
2014-09-02  9:02   ` [PATCH 7/8] spi: sirf: cleanup the indentation of marcos Barry Song
     [not found]     ` <1409648557-5470-3-git-send-email-Barry.Song-kQvG35nSl+M@public.gmane.org>
2014-09-04 22:39       ` Mark Brown
2014-09-02  9:02   ` [PATCH 8/8] spi: sirf: make DMA transfer mode optional Barry Song
     [not found]     ` <1409648557-5470-4-git-send-email-Barry.Song-kQvG35nSl+M@public.gmane.org>
2014-09-04 22:41       ` Mark Brown
     [not found]         ` <20140904224132.GW29327-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-09-05  8:14           ` Barry Song
     [not found]             ` <CAGsJ_4ysw0vy93N4evG_Aq2mMuymVXY6ig2U0EQBwQmz3uMyNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-06 13:55               ` Mark Brown
     [not found]                 ` <20140906135550.GD2601-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-09-07  0:55                   ` Barry Song
2014-09-04 22:37   ` [PATCH 5/8] spi: sirf: add fifo reset/start for cmd transfer Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).