mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-29 21:08:19 +00:00
fixed logic by restoring of Host Master Clock
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1630 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
15dd6f26c2
commit
fc1716194b
1 file changed
+9
-16
@@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Changes:
|
Changes:
|
||||||
|
19.11.2002
|
||||||
|
Fixed logic by restoring of Host Master Clock
|
||||||
24.09.2002
|
24.09.2002
|
||||||
Fixed typo in sis630_access
|
Fixed typo in sis630_access
|
||||||
Fixed logical error by restoring of Host Master Clock
|
Fixed logical error by restoring of Host Master Clock
|
||||||
@@ -36,11 +38,6 @@
|
|||||||
Changed sis630_transaction. Now it's 2x faster (Thanks to Mark M. Hoffman)
|
Changed sis630_transaction. Now it's 2x faster (Thanks to Mark M. Hoffman)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
TODO:
|
|
||||||
Implement block data write/read
|
|
||||||
Test on 2.2 kernel
|
|
||||||
*/
|
|
||||||
/*
|
/*
|
||||||
Status: beta
|
Status: beta
|
||||||
|
|
||||||
@@ -243,7 +240,7 @@ int sis630_transaction(int size) {
|
|||||||
if (high_clock > 0)
|
if (high_clock > 0)
|
||||||
sis630_write(SMB_CNT, 0x20);
|
sis630_write(SMB_CNT, 0x20);
|
||||||
else
|
else
|
||||||
sis630_write(SMB_CNT, 0x00);
|
sis630_write(SMB_CNT, (oldclock & ~0x40));
|
||||||
|
|
||||||
/* clear all sticky bits */
|
/* clear all sticky bits */
|
||||||
temp = sis630_read(SMB_STS);
|
temp = sis630_read(SMB_STS);
|
||||||
@@ -291,16 +288,12 @@ int sis630_transaction(int size) {
|
|||||||
printk(KERN_DEBUG "i2c-sis630.o: SMB_CNT before clock restore 0x%02x\n", sis630_read(SMB_CNT));
|
printk(KERN_DEBUG "i2c-sis630.o: SMB_CNT before clock restore 0x%02x\n", sis630_read(SMB_CNT));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* restore old Host Master Clock */
|
/*
|
||||||
switch(oldclock & 0x20) {
|
* restore old Host Master Clock if high_clock is set
|
||||||
case 1:
|
* and oldclock was not 56KHz
|
||||||
sis630_write(SMB_CNT, sis630_read(SMB_CNT) | 0x20);
|
*/
|
||||||
break;
|
if (high_clock > 0 && !(oldclock & 0x20))
|
||||||
case 0:
|
sis630_write(SMB_CNT,(sis630_read(SMB_CNT) & ~0x20));
|
||||||
oldclock = sis630_read(SMB_CNT) & ~0x20;
|
|
||||||
sis630_write(SMB_CNT,oldclock);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printk(KERN_DEBUG "i2c-sis630.o: SMB_CNT after clock restore 0x%02x\n", sis630_read(SMB_CNT));
|
printk(KERN_DEBUG "i2c-sis630.o: SMB_CNT after clock restore 0x%02x\n", sis630_read(SMB_CNT));
|
||||||
|
|||||||
Reference in new issue
Block a user