summaryrefslogtreecommitdiffstats
path: root/drivers/hwspinlock/sirf_hwspinlock.c
AgeCommit message (Collapse)AuthorFilesLines
2020-12-10hwspinlock: sirf: Remove the redundant 'of_match_ptr'Baolin Wang1-1/+1
Remove the the redundant 'of_match_ptr' macro to fix below warning when the CONFIG_OF is not selected. All warnings: drivers/hwspinlock/sirf_hwspinlock.c:87:34: warning: unused variable 'sirf_hwpinlock_ids' [-Wunused-const-variable] Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Baolin Wang <baolin.wang7@gmail.com> Link: https://lore.kernel.org/r/250d35cb489c3c4c066f7ce256d27f36712a1979.1591618255.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-21hwspinlock: sirf: Use devm_hwspin_lock_register() to register hwlock controllerBaolin Wang1-18/+3
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.wang7@gmail.com> Link: https://lore.kernel.org/r/8f94e67b5f9af20a93418a2fc9cc71b194f1285c.1578453662.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-21hwspinlock: sirf: Remove redundant PM runtime functionsBaolin Wang1-18/+4
Since the hwspinlock core has changed the PM runtime to be optional, and the SIRF hardware spinlock has no pm runtime requirement, thus remove these redundant PM runtime functions. Signed-off-by: Baolin Wang <baolin.wang7@gmail.com> Link: https://lore.kernel.org/r/c921e391aa2a652d8d6ae0e4041202cec9d917e7.1578453662.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-01-21hwspinlock: sirf: Change to use devm_platform_ioremap_resource()Baolin Wang1-6/+3
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.wang7@gmail.com> Link: https://lore.kernel.org/r/dfa043f317c609a6172468ac11598968dd751bce.1578453662.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-06-11Merge tag 'hwlock-v4.18' of git://github.com/andersson/remoteprocLinus Torvalds1-2/+1
Pull hwspinlock updates from Bjorn Andersson: "In addition to migrating the files to use SPDX license headers this introduces the ability for clients to operate a hwlock without the framework taking any additional locks" * tag 'hwlock-v4.18' of git://github.com/andersson/remoteproc: hwspinlock/u8500: Switch to SPDX license identifier hwspinlock: sprd: Switch to SPDX license identifier hwspinlock/sirf: Switch to SPDX license identifier hwspinlock: qcom: Switch to SPDX license identifier hwspinlock/omap: Switch to SPDX license identifier hwspinlock/core: Switch to SPDX license identifier hwspinlock: Introduce one new mode for hwspinlock hwspinlock: Convert to use 'switch' statement
2018-06-06treewide: Use struct_size() for devm_kmalloc() and friendsKees Cook1-2/+4
Replaces open-coded struct size calculations with struct_size() for devm_*, f2fs_*, and sock_* allocations. Automatically generated (and manually adjusted) from the following Coccinelle script: // Direct reference to struct field. @@ identifier alloc =~ "devm_kmalloc|devm_kzalloc|sock_kmalloc|f2fs_kmalloc|f2fs_kzalloc"; expression HANDLE; expression GFP; identifier VAR, ELEMENT; expression COUNT; @@ - alloc(HANDLE, sizeof(*VAR) + COUNT * sizeof(*VAR->ELEMENT), GFP) + alloc(HANDLE, struct_size(VAR, ELEMENT, COUNT), GFP) // mr = kzalloc(sizeof(*mr) + m * sizeof(mr->map[0]), GFP_KERNEL); @@ identifier alloc =~ "devm_kmalloc|devm_kzalloc|sock_kmalloc|f2fs_kmalloc|f2fs_kzalloc"; expression HANDLE; expression GFP; identifier VAR, ELEMENT; expression COUNT; @@ - alloc(HANDLE, sizeof(*VAR) + COUNT * sizeof(VAR->ELEMENT[0]), GFP) + alloc(HANDLE, struct_size(VAR, ELEMENT, COUNT), GFP) // Same pattern, but can't trivially locate the trailing element name, // or variable name. @@ identifier alloc =~ "devm_kmalloc|devm_kzalloc|sock_kmalloc|f2fs_kmalloc|f2fs_kzalloc"; expression HANDLE; expression GFP; expression SOMETHING, COUNT, ELEMENT; @@ - alloc(HANDLE, sizeof(SOMETHING) + COUNT * sizeof(ELEMENT), GFP) + alloc(HANDLE, CHECKME_struct_size(&SOMETHING, ELEMENT, COUNT), GFP) Signed-off-by: Kees Cook <keescook@chromium.org>
2018-05-24hwspinlock/sirf: Switch to SPDX license identifierSuman Anna1-2/+1
Use the appropriate SPDX license identifier in the CSR's SIRF hardware spinlock driver source file and drop the previous boilerplate license text. Cc: Wei Chen <wei.chen@csr.com> Cc: Barry Song <baohua@kernel.org> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2015-06-12hwspinlock: add a CSR atlas7 driverWei Chen1-0/+136
Add hwspinlock support for the CSR atlas7 SoC. The Hardware Spinlock device on atlas7 provides hardware assistance for synchronization between the multiple processors in the system (dual Cortex-A7, CAN bus Cortex-M3 and audio DSP). Reviewed-by: Suman Anna <s-anna@ti.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Wei Chen <wei.chen@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>