summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-05-08 04:46:18 +0300
committerJoel Stanley <joel@jms.id.au>2018-05-11 13:49:14 +0300
commitf34aca9c21da88ddeef215c49016f7c1786db205 (patch)
tree39b2b487f470be28f982eb805d4975f475d47018
parentf82fe12db2cc99e40a2a196e42e0169344bcd40d (diff)
downloadlinux-f34aca9c21da88ddeef215c49016f7c1786db205.tar.xz
fsi/fsi-master-gpio: Reduce dpoll clocks
FSI_GPIO_DPOLL_CLOCKS is the number of clocks before sending a DPOLL command after receiving a BUSY status. It should be at least tSendDelay (16 clocks). According to comments in the code, it needs to also be at least 21 clocks due to HW issues. It's currently 100 clocks which impacts performances negatively in some cases. Reduces it in half to 50 clocks which seems to still be solid. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r--drivers/fsi/fsi-master-gpio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c
index 029b0a5b6d89..bd2b2cbd5eb5 100644
--- a/drivers/fsi/fsi-master-gpio.c
+++ b/drivers/fsi/fsi-master-gpio.c
@@ -29,7 +29,8 @@
#define FSI_GPIO_CMD_TERM 0x3f
#define FSI_GPIO_CMD_ABS_AR 0x4
-#define FSI_GPIO_DPOLL_CLOCKS 100 /* < 21 will cause slave to hang */
+
+#define FSI_GPIO_DPOLL_CLOCKS 50 /* < 21 will cause slave to hang */
/* Bus errors */
#define FSI_GPIO_ERR_BUSY 1 /* Slave stuck in busy state */
@@ -43,7 +44,7 @@
#define FSI_GPIO_RESP_ACK 0
#define FSI_GPIO_RESP_ACKD 4
-#define FSI_GPIO_MAX_BUSY 100
+#define FSI_GPIO_MAX_BUSY 200
#define FSI_GPIO_MTOE_COUNT 1000
#define FSI_GPIO_DRAIN_BITS 20
#define FSI_GPIO_CRC_SIZE 4