diff options
author | jhb <jhb@FreeBSD.org> | 2008-08-04 20:46:15 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-08-04 20:46:15 +0000 |
commit | 9b394a3293bfa4397c24c6649034b411994dbb72 (patch) | |
tree | 2a244ae80de29ad3e4b277353b095b09dc4a9aba /sys/dev/iicbus/iicbb.c | |
parent | 6f12163ca676979b992a474aab9c999d288f57ed (diff) | |
download | FreeBSD-src-9b394a3293bfa4397c24c6649034b411994dbb72.zip FreeBSD-src-9b394a3293bfa4397c24c6649034b411994dbb72.tar.gz |
Add locking to the various iicbus(4) bridge drivers:
- Just grab Giant in the ixp425_iic(4) driver since this driver uses
a shared address/data register window pair to access the actual
I2C registers. None of the other ixp425 drivers lock access to these
shared address/data registers yet and that would need to be done before
this could use any meaningful locking.
- Add locking to the interrupt handler and 'iicbus_reset' methods of the
at91_twi(4) driver.
- Add locking to the pcf(4) driver. Other pcf(4) fixes include:
- Don't needlessly zero the softc.
- Use bus_foo rather than bus_space_foo and remove bus space tag and
handle from softc.
- The lpbb(4) driver just grabs Giant for now. This will be refined later
when ppbus(4) is locked.
- As was done with smbus earlier, move the DRIVER_MODULE() lines to match
the bus driver (either iicbus or iicbb) to the bridge driver into the
bridge drivers.
Tested by: sam (arm/ixp425)
Diffstat (limited to 'sys/dev/iicbus/iicbb.c')
-rw-r--r-- | sys/dev/iicbus/iicbb.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/dev/iicbus/iicbb.c b/sys/dev/iicbus/iicbb.c index ac10cee..f0d4c2f 100644 --- a/sys/dev/iicbus/iicbb.c +++ b/sys/dev/iicbus/iicbb.c @@ -413,16 +413,7 @@ iicbb_read(device_t dev, char * buf, int len, int *read, int last, int delay) return (0); } -/* - * XXX This is lame. We need to have a base iicbb_bridge class that all these - * XXX derive from. - */ -DRIVER_MODULE(iicbb, bktr, iicbb_driver, iicbb_devclass, 0, 0); -DRIVER_MODULE(iicbb, ixpiic, iicbb_driver, iicbb_devclass, 0, 0); -DRIVER_MODULE(iicbb, lpbb, iicbb_driver, iicbb_devclass, 0, 0); -DRIVER_MODULE(iicbb, viapm, iicbb_driver, iicbb_devclass, 0, 0); -DRIVER_MODULE(iicbb, cxm_iic, iicbb_driver, iicbb_devclass, 0, 0); -DRIVER_MODULE(iicbb, at91_bbiic, iicbb_driver, iicbb_devclass, 0, 0); +DRIVER_MODULE(iicbus, iicbb, iicbus_driver, iicbus_devclass, 0, 0); MODULE_DEPEND(iicbb, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); MODULE_VERSION(iicbb, IICBB_MODVER); |