mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
mfd: kempld-core: Fix potential hang-up during boot
On PXT and COMe-cPC2 boards it is observed that the hardware mutex is acquired but not being released during initialization. This can result in a hang-up during boot if the driver is built into the kernel. Releasing the mutex twice if it was acquired fixes the problem. Subsequent request/release cycles work as expected, so the fix is only needed during initialization. Cc: <[email protected]> Reviewed-by: Michael Brunner <[email protected]> Tested-by: Michael Brunner <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
5a78401623
commit
204747c970
1 changed files with 5 additions and 2 deletions
|
|
@ -322,9 +322,12 @@ static int kempld_detect_device(struct kempld_device_data *pld)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Release hardware mutex if aquired */
|
||||
if (!(index_reg & KEMPLD_MUTEX_KEY))
|
||||
/* Release hardware mutex if acquired */
|
||||
if (!(index_reg & KEMPLD_MUTEX_KEY)) {
|
||||
iowrite8(KEMPLD_MUTEX_KEY, pld->io_index);
|
||||
/* PXT and COMe-cPC2 boards may require a second release */
|
||||
iowrite8(KEMPLD_MUTEX_KEY, pld->io_index);
|
||||
}
|
||||
|
||||
mutex_unlock(&pld->lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue