All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] spi: spi-geni-qcom: Use the FIFO even more
@ 2020-09-12 21:07 Douglas Anderson
  2020-09-12 21:08 ` [PATCH 2/3] spi: spi-geni-qcom: Don't program CS_TOGGLE again and again Douglas Anderson
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Douglas Anderson @ 2020-09-12 21:07 UTC (permalink / raw)
  To: Mark Brown
  Cc: Akash Asthana, swboyd, Douglas Anderson, Andy Gross,
	Bjorn Andersson, linux-arm-msm, linux-kernel, linux-spi

In commit 902481a78ee4 ("spi: spi-geni-qcom: Actually use our FIFO") I
explained that the maximum size we could program the FIFO was
"mas->tx_fifo_depth - 3" but that I chose "mas->tx_fifo_depth()"
because I was worried about decreased bandwidth.

Since that time:
* All the interconnect patches have landed, making things run at the
  proper speed.
* I've done more measurements.

This lets me confirm that there's really no downside of using the FIFO
more.  Specifically I did "flashrom -p ec -r /tmp/foo.bin" on a
Chromebook and averaged over several runs.

Before: It took 6.66 seconds and 59669 interrupts fired.
After:  It took 6.66 seconds and 47992 interrupts fired.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

 drivers/spi/spi-geni-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 0dc3f4c55b0b..7f0bf0dec466 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -308,7 +308,7 @@ static int spi_geni_init(struct spi_geni_master *mas)
 	 * Hardware programming guide suggests to configure
 	 * RX FIFO RFR level to fifo_depth-2.
 	 */
-	geni_se_init(se, mas->tx_fifo_depth / 2, mas->tx_fifo_depth - 2);
+	geni_se_init(se, mas->tx_fifo_depth - 3, mas->tx_fifo_depth - 2);
 	/* Transmit an entire FIFO worth of data per IRQ */
 	mas->tx_wm = 1;
 	ver = geni_se_get_qup_hw_version(se);
-- 
2.28.0.618.gf4bc123cb7-goog


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

end of thread, other threads:[~2020-09-15 10:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12 21:07 [PATCH 1/3] spi: spi-geni-qcom: Use the FIFO even more Douglas Anderson
2020-09-12 21:08 ` [PATCH 2/3] spi: spi-geni-qcom: Don't program CS_TOGGLE again and again Douglas Anderson
2020-09-12 23:01   ` Bjorn Andersson
2020-09-15 10:40   ` Akash Asthana
2020-09-12 21:08 ` [PATCH 3/3] spi: spi-geni-qcom: Slightly optimize setup of bidirectional xfters Douglas Anderson
2020-09-12 22:54   ` Bjorn Andersson
2020-09-13  1:09     ` Doug Anderson
2020-09-13 20:35       ` Doug Anderson
2020-09-13  3:45   ` kernel test robot
2020-09-13  3:45     ` kernel test robot
2020-09-13  7:31   ` kernel test robot
2020-09-13  7:31     ` kernel test robot
2020-09-12 22:53 ` [PATCH 1/3] spi: spi-geni-qcom: Use the FIFO even more Bjorn Andersson
2020-09-13  1:11   ` Doug Anderson
2020-09-13  3:12     ` Bjorn Andersson
2020-09-14 14:52 ` Mark Brown
2020-09-15  7:30 ` Akash Asthana

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.