linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] spi/fsl-espi: Correct the maximum transaction length
@ 2016-01-22 10:58 Zhiqiang Hou
       [not found] ` <1453460307-9768-1-git-send-email-Zhiqiang.Hou-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Zhiqiang Hou @ 2016-01-22 10:58 UTC (permalink / raw)
  To: linux-spi-u79uwXL29TY76Z2rM5mHXA, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: computersforpeace-Re5JQEeQqe8AvxtiuMwx3w,
	hramrach-Re5JQEeQqe8AvxtiuMwx3w,
	Mingkai.Hu-KZfg59tc24xl57MIdRCFDg,
	Shaohui.Xie-KZfg59tc24xl57MIdRCFDg, Hou Zhiqiang

From: Hou Zhiqiang <B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

The maximum length during one transcation is 64KiB.

Signed-off-by: Hou Zhiqiang <B48286-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 drivers/spi/spi-fsl-espi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c
index 7fd6a4c..7cb0c19 100644
--- a/drivers/spi/spi-fsl-espi.c
+++ b/drivers/spi/spi-fsl-espi.c
@@ -84,7 +84,7 @@ struct fsl_espi_transfer {
 /* SPCOM register values */
 #define SPCOM_CS(x)		((x) << 30)
 #define SPCOM_TRANLEN(x)	((x) << 0)
-#define	SPCOM_TRANLEN_MAX	0xFFFF	/* Max transaction length */
+#define	SPCOM_TRANLEN_MAX	0x10000	/* Max transaction length */
 
 #define AUTOSUSPEND_TIMEOUT 2000
 
@@ -233,7 +233,7 @@ static int fsl_espi_bufs(struct spi_device *spi, struct spi_transfer *t)
 	reinit_completion(&mpc8xxx_spi->done);
 
 	/* Set SPCOM[CS] and SPCOM[TRANLEN] field */
-	if ((t->len - 1) > SPCOM_TRANLEN_MAX) {
+	if (t->len > SPCOM_TRANLEN_MAX) {
 		dev_err(mpc8xxx_spi->dev, "Transaction length (%d)"
 				" beyond the SPCOM[TRANLEN] field\n", t->len);
 		return -EINVAL;
-- 
2.1.0.27.g96db324

--
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] 8+ messages in thread

end of thread, other threads:[~2016-03-05  5:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-22 10:58 [PATCH 1/2] spi/fsl-espi: Correct the maximum transaction length Zhiqiang Hou
     [not found] ` <1453460307-9768-1-git-send-email-Zhiqiang.Hou-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2016-01-22 10:58   ` [PATCH 2/2] spi/fsl-espi: Remove the address conversion operation Zhiqiang Hou
     [not found]     ` <1453460307-9768-2-git-send-email-Zhiqiang.Hou-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2016-01-22 11:26       ` Mark Brown
     [not found]         ` <20160122112637.GU6588-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-01-22 12:16           ` Mark Brown
2016-01-22 17:02       ` Mark Brown
     [not found]         ` <20160122170242.GC6588-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-01-25  5:47           ` Zhiqiang Hou
     [not found]             ` <HE1PR04MB090646FAE865004A1AD64E9184C70-6LN7OEpIatWBkn9woE/rDM9NdZoXdze2vxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-03-05  5:36               ` Mark Brown
2016-01-22 18:27   ` Applied "spi/fsl-espi: Correct the maximum transaction length" to the spi tree 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).