From: Christopher Bostic <cbostic@linux.vnet.ibm.com>
To: joel@jms.id.au
Cc: Christopher Bostic <cbostic@linux.vnet.ibm.com>,
openbmc@lists.ozlabs.org
Subject: [PATCH linux dev-4.10 6/7] drivers/fsi: GPIO stability changes for Cronus/Hostboot
Date: Tue, 9 May 2017 16:39:01 -0500 [thread overview]
Message-ID: <20170509213902.37939-7-cbostic@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170509213902.37939-1-cbostic@linux.vnet.ibm.com>
Improve stability in the FSI protocol by re-ordering the clocking
delays. Increase clocking delays to 3 microseconds. Remove
delay prior to sampling input - now redundant given new clocking
delay order.
New effective delay per clock toggle is now 6 microseconds.
Previous clocking summed up to 3 nS but real time measurements
of each 1 nS delay actually was approx 1.8 microseconds.
Previous total delay was then 1.8 * 3 = 5.4 microseconds.
Signed-off-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>
---
drivers/fsi/fsi-master-gpio.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/fsi/fsi-master-gpio.c b/drivers/fsi/fsi-master-gpio.c
index d5cce88..ef209ef 100644
--- a/drivers/fsi/fsi-master-gpio.c
+++ b/drivers/fsi/fsi-master-gpio.c
@@ -14,7 +14,7 @@
#include "fsi-master.h"
-#define FSI_GPIO_STD_DLY 1 /* Standard pin delay in nS */
+#define FSI_GPIO_STD_DLY 3 /* Standard pin delay in uS */
#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 */
@@ -76,10 +76,10 @@ static void clock_toggle(struct fsi_master_gpio *master, int count)
int i;
for (i = 0; i < count; i++) {
- ndelay(FSI_GPIO_STD_DLY);
gpiod_set_value(master->gpio_clk, 0);
- ndelay(FSI_GPIO_STD_DLY);
+ udelay(FSI_GPIO_STD_DLY);
gpiod_set_value(master->gpio_clk, 1);
+ udelay(FSI_GPIO_STD_DLY);
}
}
@@ -87,7 +87,6 @@ static int sda_in(struct fsi_master_gpio *master)
{
int in;
- ndelay(FSI_GPIO_STD_DLY);
in = gpiod_get_value(master->gpio_data);
return in ? 1 : 0;
}
--
1.8.2.2
next prev parent reply other threads:[~2017-05-09 21:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 21:38 [PATCH linux dev-4.10 0/7] OpenFSI Updates for dev-4.10 kernel Christopher Bostic
2017-05-09 21:38 ` [PATCH linux dev-4.10 1/7] drivers/fsi: Add slave interrupt polling Christopher Bostic
2017-05-10 22:26 ` Eddie James
2017-05-09 21:38 ` [PATCH linux dev-4.10 2/7] drivers/fsi: Add Client IRQ Enable / Disable Christopher Bostic
2017-05-09 21:38 ` [PATCH linux dev-4.10 3/7] drivers/fsi: Scan for hub sourced IRQ's Christopher Bostic
2017-05-09 21:38 ` [PATCH linux dev-4.10 4/7] drivers/fsi: Set IRQ masks along hub path Christopher Bostic
2017-05-09 21:39 ` [PATCH linux dev-4.10 5/7] drivers/fsi: Unscan on master unregister Christopher Bostic
2017-05-11 12:06 ` Joel Stanley
2017-05-09 21:39 ` Christopher Bostic [this message]
2017-05-11 12:07 ` [PATCH linux dev-4.10 6/7] drivers/fsi: GPIO stability changes for Cronus/Hostboot Joel Stanley
2017-05-09 21:39 ` [PATCH linux dev-4.10 7/7] drivers/fsi: Fix one and two byte bus reads/writes Christopher Bostic
2017-05-11 12:06 ` Joel Stanley
2017-05-10 2:25 ` [PATCH linux dev-4.10 0/7] OpenFSI Updates for dev-4.10 kernel Jeremy Kerr
2017-05-10 15:46 ` Christopher Bostic
2017-05-11 12:09 ` Joel Stanley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170509213902.37939-7-cbostic@linux.vnet.ibm.com \
--to=cbostic@linux.vnet.ibm.com \
--cc=joel@jms.id.au \
--cc=openbmc@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.