Commit Graph

7 Commits

Author SHA1 Message Date
Baolin Wang
4d0c1c5732 hwspinlock: sprd: Remove redundant PM runtime implementation
Since the hwspinlock core has changed the PM runtime to be optional, thus
remove the redundant PM runtime implementation in the Spreadtrum hwlock
driver.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-11-08 16:42:11 -08:00
Baolin Wang
b674a30bf8 hwspinlock: sprd: Use devm_hwspin_lock_register() to register hwlock controller
Use devm_hwspin_lock_register() to register the hwlock controller instead of
unregistering the hwlock controller explicitly when removing the device.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-10-04 21:10:26 -07:00
Baolin Wang
b4d64193d4 hwspinlock: sprd: Use devm_add_action_or_reset() for calls to clk_disable_unprepare()
Use devm_add_action_or_reset() for calls to clk_disable_unprepare(),
which can simplify the error handling.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-10-04 21:09:52 -07:00
Baolin Wang
3070c41643 hwspinlock: sprd: Check the return value of clk_prepare_enable()
We must check the return value of clk_prepare_enable() to make sure the
hardware spinlock controller can be enabled successfully, otherwise we
should return error.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-10-04 21:07:44 -07:00
Baolin Wang
74cfa956cb hwspinlock: sprd: Change to use devm_platform_ioremap_resource()
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together, which can simpify the code.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2019-10-04 21:07:19 -07:00
Suman Anna
0c3e890b1e hwspinlock: sprd: Switch to SPDX license identifier
Use the appropriate SPDX license identifiers in the Spreadtrum hardware
spinlock driver source file and drop the previous boilerplate license text.

Cc: Baolin Wang <baolin.wang@spreadtrum.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-05-24 12:04:48 -07:00
Baolin Wang
d8c8bbbb1a hwspinlock: sprd: Add hardware spinlock driver
The Spreadtrum hardware spinlock device can provide hardware assistance
for synchronization between the multiple subsystems.

Signed-off-by: Baolin Wang <baolin.wang@spreadtrum.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-05-17 10:52:52 -07:00