23316be8 | 15-Jul-2023 |
Christian Marangi <ansuelsmth@gmail.com> |
hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation
Commit 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs") introduced and made regmap_config mandatory in t
hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation
Commit 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs") introduced and made regmap_config mandatory in the of_data struct but didn't add the regmap_config for sfpb based devices.
SFPB based devices can both use the legacy syscon way to probe or the new MMIO way and currently device that use the MMIO way are broken as they lack the definition of the now required regmap_config and always return -EINVAL (and indirectly makes fail probing everything that depends on it, smem, nandc with smem-parser...)
Fix this by correctly adding the missing regmap_config and restore function of hwspinlock on SFPB based devices with MMIO implementation.
Cc: stable@vger.kernel.org Fixes: 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Link: https://lore.kernel.org/r/20230716022804.21239-1-ansuelsmth@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
9519793b | 14-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
hwspinlock: u8500: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do e
hwspinlock: u8500: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void.
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/20230314180241.2865888-1-u.kleine-koenig@pengutronix.de Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
4cf16b6b | 14-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
hwspinlock: omap: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do er
hwspinlock: omap: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void.
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/20230314180100.2865801-2-u.kleine-koenig@pengutronix.de Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
72a3a509 | 14-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
hwspinlock: omap: Emit only one error message for errors in .remove()
If a remove callback of a platform driver returns a non-zero value, the driver core emits an error message, otherwise ignores th
hwspinlock: omap: Emit only one error message for errors in .remove()
If a remove callback of a platform driver returns a non-zero value, the driver core emits an error message, otherwise ignores the value and completes unbinding the device.
As omap_hwspinlock_remove() already emits an error message, suppress the core's error message by returning zero.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://lore.kernel.org/r/20230314180100.2865801-1-u.kleine-koenig@pengutronix.de Signed-off-by: Bjorn Andersson <andersson@kernel.org>
show more ...
|
5d4753f7 | 09-Sep-2022 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
hwspinlock: qcom: add support for MMIO on older SoCs
Older Qualcomm SoCs have TCSR mutex registers with 0x80 stride, instead of 0x1000. Add dedicated compatibles and regmap for such case.
Signed-o
hwspinlock: qcom: add support for MMIO on older SoCs
Older Qualcomm SoCs have TCSR mutex registers with 0x80 stride, instead of 0x1000. Add dedicated compatibles and regmap for such case.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20220909092035.223915-5-krzysztof.kozlowski@linaro.org
show more ...
|
cdab30b4 | 07-Jul-2022 |
Christian Marangi <ansuelsmth@gmail.com> |
hwspinlock: qcom: Add support for mmio usage to sfpb-mutex
Allow sfpb-mutex to use mmio in addition to syscon.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Bjorn Andersson <
hwspinlock: qcom: Add support for mmio usage to sfpb-mutex
Allow sfpb-mutex to use mmio in addition to syscon.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220707102040.1859-1-ansuelsmth@gmail.com
show more ...
|
9a413589 | 25-Jan-2022 |
Gustavo A. R. Silva <gustavoars@kernel.org> |
hwspinlock: sprd: Use struct_size() helper in devm_kzalloc()
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows
hwspinlock: sprd: Use struct_size() helper in devm_kzalloc()
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows.
Also, address the following sparse warnings: drivers/hwspinlock/sprd_hwspinlock.c:96:36: warning: using sizeof on a flexible structure
Link: https://github.com/KSPP/linux/issues/174 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220125225723.GA78256@embeddedor
show more ...
|
c3e9b463 | 08-Jun-2020 |
Baolin Wang <baolin.wang7@gmail.com> |
hwspinlock: sirf: Remove the redundant 'of_match_ptr'
Remove the the redundant 'of_match_ptr' macro to fix below warning when the CONFIG_OF is not selected.
All warnings: drivers/hwspinlock/sirf_hw
hwspinlock: sirf: Remove the redundant 'of_match_ptr'
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>
show more ...
|
8266b809 | 12-Nov-2020 |
Chunyan Zhang <chunyan.zhang@unisoc.com> |
hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'
The macro function of_match_ptr() is NULL if CONFIG_OF is not set, in this case Clang compiler would complain the of_dev
hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'
The macro function of_match_ptr() is NULL if CONFIG_OF is not set, in this case Clang compiler would complain the of_device_id variable is unused.
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com> Reported-by: kernel test robot <lkp@intel.com> Fixes: d8c8bbbb1aba ("hwspinlock: sprd: Add hardware spinlock driver") Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com> Link: https://lore.kernel.org/r/20201112070410.14810-1-zhang.lyra@gmail.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
show more ...
|
8308678e | 29-Oct-2020 |
Chunyan Zhang <chunyan.zhang@unisoc.com> |
hwspinlock: sprd: use module_platform_driver() instead postcore initcall
The hardware spinlock devices are defined in the DT, there's no need for init calls order, remove boilerplate code by using m
hwspinlock: sprd: use module_platform_driver() instead postcore initcall
The hardware spinlock devices are defined in the DT, there's no need for init calls order, remove boilerplate code by using module_platform_driver.
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com> Link: https://lore.kernel.org/r/20201030034654.15775-3-zhang.lyra@gmail.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
show more ...
|
7a1e6fb1 | 22-Jun-2020 |
Bjorn Andersson <bjorn.andersson@linaro.org> |
hwspinlock: qcom: Allow mmio usage in addition to syscon
In modern Qualcomm platforms the mutex region of the TCSR is forked off into its own block, all with a offset of 0 and stride of 4096, and in
hwspinlock: qcom: Allow mmio usage in addition to syscon
In modern Qualcomm platforms the mutex region of the TCSR is forked off into its own block, all with a offset of 0 and stride of 4096, and in some of these platforms no other registers in this region is accessed from Linux.
So add support for directly memory mapping this register space, to avoid the need to represent this block using a syscon.
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com> Reviewed-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20200622075956.171058-4-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
show more ...
|