IB/ipath: Lock and always use shadow copies of GPIO register
commit17b2eb9fe6bfadcb3ece308ed50193d10b71ba6e
authorMichael Albaugh <michael.albaugh@qlogic.com>
Thu, 17 May 2007 14:05:04 +0000 (17 07:05 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 10 Jul 2007 03:12:25 +0000 (9 20:12 -0700)
tree567c1e7d11cc14990ecabd11fe23b1941a2ebcfd
parent82466f00ec6ef0a5ca7ea8991c731af2ec561c7d
IB/ipath: Lock and always use shadow copies of GPIO register

The new LED blinking interface adds more contention for the
unprotected GPIO pins that were already shared, though not commonly at
the same time.  We add locks to the accesses to these pins so that
Read-Modify-Write is now safe.  Some of these locks are added at
interrupt context, so we shadow the registers which drive and inspect
these pins to avoid the mmio read/writes.  This mitigates the effects
of the locks and hastens us through the interrupt.

Add locking and always use shadows for registers controlling GPIO pins
(ExtCtrl and GPIOout). The use of shadows implies doing less I/O,
which can make I2C operation too fast on some platforms. An explicit
udelay(1) in SCL manipulation fixes that.

Signed-off-by: Michael Albaugh <michael.albaugh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_eeprom.c
drivers/infiniband/hw/ipath/ipath_iba6110.c
drivers/infiniband/hw/ipath/ipath_iba6120.c
drivers/infiniband/hw/ipath/ipath_init_chip.c
drivers/infiniband/hw/ipath/ipath_kernel.h