hwspinlock/omap: enable module before reading SYSSTATUS register
commite1e4528f8c99624494043597859e7f9421832833
authorSuman Anna <s-anna@ti.com>
Wed, 2 Jul 2014 23:00:59 +0000 (2 18:00 -0500)
committerOhad Ben-Cohen <ohad@wizery.com>
Tue, 29 Jul 2014 08:46:25 +0000 (29 11:46 +0300)
tree2491adc13e640f56c6748c93a06b8e4c65025fc9
parent9a3c4145af32125c5ee39c0272662b47307a8323
hwspinlock/omap: enable module before reading SYSSTATUS register

The number of hwspinlocks are determined based on the value read
from the IP block's SYSSTATUS register. However, the module may
not be enabled and clocked, and the read may result in a bus error.

This particular issue is seen rather easily on AM33XX, since the
module wakeup is software controlled, and it is disabled out of
reset. Make sure the module is enabled and clocked before reading
the SYSSTATUS register.

Signed-off-by: Suman Anna <s-anna@ti.com>
[replace pm_runtime_put_sync with lenient pm_runtime_put]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
drivers/hwspinlock/omap_hwspinlock.c