hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation
Subsystems (3)
PATCH 1/1 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.
--- drivers/hwspinlock/qcom_hwspinlock.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/hwspinlock/qcom_hwspinlock.c +9 -0
@@ -69,9 +69,18 @@ static const struct hwspinlock_ops qcom_hwspinlock_ops = { .unlock = qcom_hwspinlock_unlock, }; +static const struct regmap_config sfpb_mutex_config = { + .reg_bits =32 , + .reg_stride =4 , + .val_bits =32 , + .max_register =0x100 , + .fast_io = true, +}; +static const struct qcom_hwspinlock_of_data of_sfpb_mutex = { .offset =0x4 , .stride =0x4 , + .regmap_config = &sfpb_mutex_config, };static const struct regmap_config tcsr_msm8226_mutex_config = {
Signature · 1 line
2.40.1
Quoted 11 lines · Christian Marangi
Commit
5d4753f741d8("hwspinlock: qcom: add support for MMIO on older SoCs") introduced and maderegmap_configmandatory in theof_datastruct but didn't add theregmap_configfor 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_configand always return-EINVAL(and indirectly makes fail probing everything that depends on it, smem, nandc with smem-parser...)[...]
Applied, thanks!
[1/1] hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation
commit: 23316be8a9d450f33a21f1efe7d89570becbec58
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>