Subject: Drivers that access other devices (clcs(4), SMBus, and kern/12843)
To: None <tech-kern@netbsd.org>
From: Jared D. McNeill <jmcneill@invisible.ca>
List: tech-kern
Date: 09/07/2003 20:27:12
Hey folks --

The resolution to kern/12843 requires that clcs(4) enable/disable CLKRUN# at 
certain points during its operation. Unfortunately, without documentation on 
the CS4280 (and nothing in cs4280reg.h or cs428xreg.h that appears to do what 
I need), the only way I can toggle CLKRUN# is through the SMBus.

The patch for kern/12843 does a pci_find_device looking for the PIIX4 SMBus 
controller, querys the power management base address from it, then accesses 
the PM controller to toggle CLKRUN#.

I realize that this isn't a very clean approach, so I ask: is there a better 
way to accomplish this? Or should I just commit the fix and document the 
hack?

Cheers,
Jared