aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorJason-JH Lin <[email protected]>2025-06-24 10:39:03 +0000
committerAngeloGioacchino Del Regno <[email protected]>2025-06-25 13:59:00 +0000
commit331db44e70dacfb6bf1e17d92fae7b1c9517ca6c (patch)
treebca8c8dc8b87f90ef4ae00e0449072a3498672d0 /rust/helpers/helpers.c
parentLinux 6.16-rc1 (diff)
downloadkernel-331db44e70dacfb6bf1e17d92fae7b1c9517ca6c.tar.gz
kernel-331db44e70dacfb6bf1e17d92fae7b1c9517ca6c.zip
soc: mediatek: mtk-mutex: Fix confusing usage of MUTEX_MOD2
The usage of MUTEX_MOD1 and MUTEX_MOD2 for calculating mod settings over 32 has been confusing. To improve consistency and clarity, these defines need to fit into the same MUTEX_MOD define as possible. However, MUTEX_MOD1 cannot be directly used for all SoCs because, for example, the mod1 register (0x34) of MT2712 is not adjacent to its mod0 register (0x2c). To address this, a `mutex_mod1_reg` field is introduced in the mutex driver data structure. This allows all SoCs to use a unified MUTEX_MOD to determine their register offsets. With this change, the separate usage of MUTEX_MOD1 and MUTEX_MOD2 is eliminated, simplifying the logic for obtaining offsets and mod IDs. Signed-off-by: Jason-JH Lin <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions