aboutsummaryrefslogtreecommitdiff
path: root/drivers/fsi
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt2018-05-29 15:09:45 +1000
committerBenjamin Herrenschmidt2018-07-12 11:59:48 +1000
commitedc2485148d20c56c67d9ceec4d645c18d795a8d (patch)
tree390a672350fb53614b78aee47bccccfdd531ffee /drivers/fsi
parenta2e7da86cc392417b0d9f605b28038aae80b002f (diff)
fsi: master-gpio: Rename and adjust send delay
What the driver called "FSI_GPIO_PRIME_SLAVE_CLOCKS" is what the FSI spec calls tSendDelay and should be 16 clocks by default. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/fsi')
-rw-r--r--drivers/fsi/fsi-master-gpio.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c
index 084e9da8d151..3f846dada626 100644
--- a/drivers/fsi/fsi-master-gpio.c
+++ b/drivers/fsi/fsi-master-gpio.c
@@ -18,6 +18,7 @@
#define FSI_GPIO_STD_DLY 1 /* Standard pin delay in nS */
#define FSI_ECHO_DELAY_CLOCKS 16 /* Number clocks for echo delay */
+#define FSI_SEND_DELAY_CLOCKS 16 /* Number clocks for send delay */
#define FSI_PRE_BREAK_CLOCKS 50 /* Number clocks to prep for break */
#define FSI_BREAK_CLOCKS 256 /* Number of clocks to issue break */
#define FSI_POST_BREAK_CLOCKS 16000 /* Number clocks to set up cfam */
@@ -48,7 +49,6 @@
#define FSI_GPIO_CRC_SIZE 4
#define FSI_GPIO_MSG_ID_SIZE 2
#define FSI_GPIO_MSG_RESPID_SIZE 2
-#define FSI_GPIO_PRIME_SLAVE_CLOCKS 20
#define LAST_ADDR_INVALID 0x1
@@ -535,9 +535,12 @@ retry:
if (busy_count > 0)
trace_fsi_master_gpio_poll_response_busy(master, busy_count);
fail:
- /* Clock the slave enough to be ready for next operation */
+ /*
+ * tSendDelay clocks, avoids signal reflections when switching
+ * from receive of response back to send of data.
+ */
local_irq_save(flags);
- clock_zeros(master, FSI_GPIO_PRIME_SLAVE_CLOCKS);
+ clock_zeros(master, FSI_SEND_DELAY_CLOCKS);
local_irq_restore(flags);
return rc;