Skip to contentSkip to conversation

SiS645 driver additions

DISCUSSION Mark M. Hoffman 2 participants 6 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

Hello SiS chipset users:

I added support for 648 and 962 in CVS. To use this, you'll need to first get the latest I2C code from CVS:
(near the bottom of the page)

http://www2.lm-sensors.nu/~lm78/download.html

Then of course get the latest lm_sensors2 from CVS also.

Sensors maintainers:

FYI: I tested this on my 645/961 vs. a recent RedHat 2.4. Besides adding PCI ids, are there any other changes I should make to accomodate Ky?sti's recent work?

Regards,

Signature · 2 lines
Mark M. Hoffman
[email protected]
#1 lore raw
Quoted 10 lines · Ky?sti M?lkki
Quoted 3 lines · Mark M. Hoffman

FYI: I tested this on my 645/961 vs. a recent RedHat 2.4. Besides adding PCI ids, are there any other changes I should make to accomodate Ky?sti's recent work?

Functionally it doesn't matter, but you should avoid all that pci_find_device in sis645_setup(), a call to pci_module_init has done the work for you. You can take i2c-amdXX as a sample that got accepted in Linus's 2.5 tree.

OK, I understand. Some of that I can't avoid though. The BIOS tends to hide the device I really want; so I have to flip a magic bit then search for it.

Quoted 3 lines

As with any PCI device, the driver should support multiple instances of a device. Yes, even if it is unlikely. Do it right for i2c-sis645 and we get to copy it for other busses.

I'll see what I can do...

Regards,

Signature · 2 lines
Mark M. Hoffman
[email protected]
#2 lore raw
In reply to Mark M. Hoffman
Quoted 12 lines · Ky?sti M?lkki
Quoted 9 lines · Mark M. Hoffman
Quoted 4 lines · Ky?sti M?lkki

Functionally it doesn't matter, but you should avoid all that pci_find_device in sis645_setup(), a call to pci_module_init has done the work for you. You can take i2c-amdXX as a sample that got accepted in Linus's 2.5 tree.

OK, I understand. Some of that I can't avoid though. The BIOS tends to hide the device I really want; so I have to flip a magic bit then search for it.

Quoted 5 lines

It looks to me, that the SMBus device has its own PCI_ID, and test for southbridge is only required if SMBus is disabled.

I don't get the point of testing the north bridge type, if the SMBus is somewhere else.

E.g. although I have an Asus P4S333 which has 645/961, the south bridge claims to be 503 anyway. I assume this is some kind of compatability mode. Anyway, I can't be sure it's really a 961 unless I check against the list of compatible north bridges.

Quoted 3 lines

I don't know if the PCI subsystem cares, but I get the impression that i2c-sis645 driver is not registered to control the SMBus device, but the device listed in sis645_ids.

Yes what this driver really wants is to register against the SMBus (sub) device only... and that all the detection and magic enabling stuff belongs elsewhere; perhaps in a separate module.

MDS first suggested separate modules; I should have taken his advice.

i2c-sis645-pci-fixup.c?

Regards,

Signature · 2 lines
Mark M. Hoffman
[email protected]
#3 lore raw
In reply to Mark M. Hoffman
Quoted 3 lines · Mark M. Hoffman

FYI: I tested this on my 645/961 vs. a recent RedHat 2.4. Besides adding PCI ids, are there any other changes I should make to accomodate Ky?sti's recent work?

Functionally it doesn't matter, but you should avoid all that pci_find_device in sis645_setup(), a call to pci_module_init has done the work for you. You can take i2c-amdXX as a sample that got accepted in Linus's 2.5 tree.

As with any PCI device, the driver should support multiple instances of a device. Yes, even if it is unlikely. Do it right for i2c-sis645 and we get to copy it for other busses.

Signature · 2 lines
  Ky?sti M?lkki
  [email protected]
#4 lore raw
In reply to Mark M. Hoffman
Quoted 9 lines · Mark M. Hoffman
Quoted 4 lines · Ky?sti M?lkki

Functionally it doesn't matter, but you should avoid all that pci_find_device in sis645_setup(), a call to pci_module_init has done the work for you. You can take i2c-amdXX as a sample that got accepted in Linus's 2.5 tree.

OK, I understand. Some of that I can't avoid though. The BIOS tends to hide the device I really want; so I have to flip a magic bit then search for it.

It looks to me, that the SMBus device has its own PCI_ID, and test for southbridge is only required if SMBus is disabled.

I don't get the point of testing the north bridge type, if the SMBus is somewhere else.

I don't know if the PCI subsystem cares, but I get the impression that i2c-sis645 driver is not registered to control the SMBus device, but the device listed in sis645_ids.

Signature · 2 lines
  Ky?sti M?lkki
  [email protected]
#5 lore raw
In reply to Mark M. Hoffman
Quoted 5 lines · Mark M. Hoffman

E.g. although I have an Asus P4S333 which has 645/961, the south bridge claims to be 503 anyway. I assume this is some kind of compatability mode. Anyway, I can't be sure it's really a 961 unless I check against the list of compatible north bridges.

The name "sis645" should have been "sis691" then ?

Quoted 3 lines

Yes what this driver really wants is to register against the SMBus (sub) device only... and that all the detection and magic enabling stuff belongs elsewhere; perhaps in a separate module.

Well, maybe not. Make the magic enabler code another struct pci_driver, with the current list of ids. Always return with failure from probe, so we leave no driver associated with the southbridge, but still return with SMBus part enabled.

Next, call pci_module_init for the SMBus function only.

In the PCI code, we may want to use pci_{request/release}_region, it will call {release/request}_region with the device's idea of the resources the driver will use.

Signature · 2 lines
  Ky?sti M?lkki
  [email protected]