[PATCH linux dev-4.7 v2] drivers/fsi: Add delay before sampling input on SDA
Christopher Bostic
cbostic at linux.vnet.ibm.com
Sat Mar 18 08:18:36 AEDT 2017
During high cpu loads the SDA in line can shift relative to the
clock signal which can corrupt the received input data. Slow
down the time to sample input to account for this.
Signed-off-by: Christopher Bostic <cbostic at linux.vnet.ibm.com>
---
v2 - Increase delay for SDA in sampling only.
- Decrease the original delay for SDA sampling from 1us to 200ns
---
drivers/fsi/fsi-master-gpio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c
index a8976d5..8e832e0 100644
--- a/drivers/fsi/fsi-master-gpio.c
+++ b/drivers/fsi/fsi-master-gpio.c
@@ -14,6 +14,7 @@
#include "fsi-master.h"
#define FSI_GPIO_STD_DLY 1 /* Standard pin delay in nS */
+#define FSI_GPIO_SDA_IN_DLY 200 /* Wait to sample SDA line, in nS */
#define FSI_ECHO_DELAY_CLOCKS 16 /* Number clocks for echo delay */
#define FSI_PRE_BREAK_CLOCKS 50 /* Number clocks to prep for break */
#define FSI_BREAK_CLOCKS 256 /* Number of clocks to issue break */
@@ -97,7 +98,7 @@ static int sda_in(struct fsi_master_gpio *master)
{
int in;
- ndelay(FSI_GPIO_STD_DLY);
+ ndelay(FSI_GPIO_SDA_IN_DLY);
in = gpiod_get_value(master->gpio_data);
return in ? 1 : 0;
}
--
1.8.2.2
More information about the openbmc
mailing list