From d78cd69dd7d4e3aab0af5504bf53429f0c29dc3f Mon Sep 17 00:00:00 2001 From: "Mark M. Hoffman" Date: Tue, 17 Jun 2003 05:17:02 +0000 Subject: [PATCH] Added recognition of SiS746 host bridge. (mmh) Addressed some trivial compiler warnings. (mmh) Updated documentation. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1793 7894878c-1315-0410-8ee3-d5d059ff63e0 --- doc/busses/i2c-sis645 | 12 +++++------- kernel/busses/i2c-sis645.c | 14 +++++++++----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/doc/busses/i2c-sis645 b/doc/busses/i2c-sis645 index 394fcf2a..14af6f1d 100644 --- a/doc/busses/i2c-sis645 +++ b/doc/busses/i2c-sis645 @@ -4,12 +4,10 @@ Status: Beta Supported adapters: * Silicon Integrated Systems Corp (SiS) - 645/961 chipset - 645DX/961 chipset - 645DX/962 chipset - 648/961 chipset - 650/961 chipset - 735 chipset + Any combination of these host bridges: + 645, 645DX (aka 646), 648, 650, 651, 735, 745, 746 + and these south bridges: + 961, 962, 963(L) Author: Mark M. Hoffman @@ -54,7 +52,7 @@ running "make config" or equivalent on your kernel, otherwise the i2c-sis645 driver will not build in this support. I suspect that this driver could be made to work for the following SiS chipsets -as well: 648/963, 651/962, 635, and 635T. +as well: 635, and 635T. If anyone owns a board with those chips AND is willing to risk crashing & burning an otherwise well-behaved kernel in the name of progress... please contact me at or via the project's mailing list: diff --git a/kernel/busses/i2c-sis645.c b/kernel/busses/i2c-sis645.c index c96037ef..baf786e1 100644 --- a/kernel/busses/i2c-sis645.c +++ b/kernel/busses/i2c-sis645.c @@ -34,6 +34,8 @@ Note: we assume there can only be one SiS645 with one SMBus interface */ +/* #define DEBUG 1 */ + #include #include #include @@ -257,7 +259,9 @@ static int __devinit sis645_probe(struct pci_dev *dev, const struct pci_device_i && (NULL == pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_735, NULL)) && (NULL == pci_find_device(PCI_VENDOR_ID_SI, - PCI_DEVICE_ID_SI_745, NULL))) { + PCI_DEVICE_ID_SI_745, NULL)) + && (NULL == pci_find_device(PCI_VENDOR_ID_SI, + PCI_DEVICE_ID_SI_746, NULL))) { printk(KERN_ERR DRV_NAME ": Can't find suitable host bridge!\n"); return -ENODEV; } @@ -280,15 +284,15 @@ static int __devinit sis645_probe(struct pci_dev *dev, const struct pci_device_i return -ENODEV; #else /* CONFIG_HOTPLUG */ - if (ret = sis645_enable_smbus(dev)) { + if ((ret = sis645_enable_smbus(dev))) { return ret; } - if (ret = sis645_build_dev(&SIS645_SMBUS_dev, dev)) { + if ((ret = sis645_build_dev(&SIS645_SMBUS_dev, dev))) { return ret; } - if (ret = pci_enable_device(SIS645_SMBUS_dev)) { + if ((ret = pci_enable_device(SIS645_SMBUS_dev))) { printk(KERN_ERR DRV_NAME ": Can't pci_enable SMBus device!" " (0x%08x)\n", ret); return ret; @@ -406,7 +410,7 @@ static int sis645_transaction(int size) /* Finish up by resetting the bus */ sis645_write(SMB_STS, temp); - if (temp = sis645_read(SMB_STS)) { + if ((temp = sis645_read(SMB_STS))) { #ifdef DEBUG printk(KERN_DEBUG DRV_NAME ": Failed reset at end of transaction!" " (0x%02x)\n", temp);