All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH 2.6] scx200_acb - Fix for CS5535 eratta
@ 2006-03-31 22:49 ` Jordan Crouse
  0 siblings, 0 replies; 2+ messages in thread
From: Jordan Crouse @ 2006-03-31 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: lm-sensors, info-linux, BGardner

Hey all - This is a fix for the recently added CS5535/CS5536 support in
the scx200_acb driver.  This works around an errata in the CS5535 that 
sometimes results in NEGACK not being cleared.  It would be great if we
could get this into 2.6.17 with the driver.

Regards,
Jordan

-- 
Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group
<www.amd.com/embeddedprocessors>
-------------- next part --------------
[PATCH] scx200_acb: Fix for negack clear errata

From: Jordan Crouse <jordan.crouse at amd.com>

This patch is a fix for the CS5535 errata 111:

When the SMB controller tries to access a non-existing device, it sets
the NEGACK bit, SMB I/O Offset 01h[4], to 1 after it detects no
acknowledge at the ninth clock. The specification says there are only
two ways to clear this status bit: write 1 to this bit or disable the
SMB controller. Sometimes this bit is cleared by a read of this
register, but not always.

Signed-off-by: Jordan Crouse <jordan.crouse at amd.com>
---

 drivers/i2c/busses/scx200_acb.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 8bd305e..e7a2225 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -133,6 +133,9 @@ static void scx200_acb_machine(struct sc
 
 		outb(inb(ACBCTL1) | ACBCTL1_STOP, ACBCTL1);
 		outb(ACBST_STASTR | ACBST_NEGACK, ACBST);
+
+		/* Reset the status register */
+		outb(0, ACBST);
 		return;
 	}
 
@@ -228,6 +231,10 @@ static void scx200_acb_poll(struct scx20
 	timeout = jiffies + POLL_TIMEOUT;
 	while (time_before(jiffies, timeout)) {
 		status = inb(ACBST);
+
+		/* Reset the status register to avoid the hang */
+		outb(0, ACBST);
+
 		if ((status & (ACBST_SDAST|ACBST_BER|ACBST_NEGACK)) != 0) {
 			scx200_acb_machine(iface, status);
 			return;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2.6] scx200_acb - Fix for CS5535 eratta
@ 2006-03-31 22:49 ` Jordan Crouse
  0 siblings, 0 replies; 2+ messages in thread
From: Jordan Crouse @ 2006-03-31 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: lm-sensors, info-linux, BGardner

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

Hey all - This is a fix for the recently added CS5535/CS5536 support in
the scx200_acb driver.  This works around an errata in the CS5535 that 
sometimes results in NEGACK not being cleared.  It would be great if we
could get this into 2.6.17 with the driver.

Regards,
Jordan

-- 
Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group
<www.amd.com/embeddedprocessors>

[-- Attachment #2: smb-stsreset.patch --]
[-- Type: text/plain, Size: 1432 bytes --]

[PATCH] scx200_acb: Fix for negack clear errata

From: Jordan Crouse <jordan.crouse@amd.com>

This patch is a fix for the CS5535 errata 111:

When the SMB controller tries to access a non-existing device, it sets
the NEGACK bit, SMB I/O Offset 01h[4], to 1 after it detects no
acknowledge at the ninth clock. The specification says there are only
two ways to clear this status bit: write 1 to this bit or disable the
SMB controller. Sometimes this bit is cleared by a read of this
register, but not always.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
---

 drivers/i2c/busses/scx200_acb.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 8bd305e..e7a2225 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -133,6 +133,9 @@ static void scx200_acb_machine(struct sc
 
 		outb(inb(ACBCTL1) | ACBCTL1_STOP, ACBCTL1);
 		outb(ACBST_STASTR | ACBST_NEGACK, ACBST);
+
+		/* Reset the status register */
+		outb(0, ACBST);
 		return;
 	}
 
@@ -228,6 +231,10 @@ static void scx200_acb_poll(struct scx20
 	timeout = jiffies + POLL_TIMEOUT;
 	while (time_before(jiffies, timeout)) {
 		status = inb(ACBST);
+
+		/* Reset the status register to avoid the hang */
+		outb(0, ACBST);
+
 		if ((status & (ACBST_SDAST|ACBST_BER|ACBST_NEGACK)) != 0) {
 			scx200_acb_machine(iface, status);
 			return;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-31 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-31 22:49 [lm-sensors] [PATCH 2.6] scx200_acb - Fix for CS5535 eratta Jordan Crouse
2006-03-31 22:49 ` Jordan Crouse

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.