Skip to content

Commit 23316be

Browse files
Ansuelandersson
authored andcommitted
hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation
Commit 5d4753f ("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: [email protected] Fixes: 5d4753f ("hwspinlock: qcom: add support for MMIO on older SoCs") Signed-off-by: Christian Marangi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 9519793 commit 23316be

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/hwspinlock/qcom_hwspinlock.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,18 @@ static const struct hwspinlock_ops qcom_hwspinlock_ops = {
6969
.unlock = qcom_hwspinlock_unlock,
7070
};
7171

72+
static const struct regmap_config sfpb_mutex_config = {
73+
.reg_bits = 32,
74+
.reg_stride = 4,
75+
.val_bits = 32,
76+
.max_register = 0x100,
77+
.fast_io = true,
78+
};
79+
7280
static const struct qcom_hwspinlock_of_data of_sfpb_mutex = {
7381
.offset = 0x4,
7482
.stride = 0x4,
83+
.regmap_config = &sfpb_mutex_config,
7584
};
7685

7786
static const struct regmap_config tcsr_msm8226_mutex_config = {

0 commit comments

Comments
 (0)