linux-loongson/drivers/soc/mediatek
Jason-JH Lin 331db44e70
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 <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20250624103928.408194-1-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2025-06-25 15:59:00 +02:00
..
Kconfig soc: mediatek: Add MediaTek DVFS Resource Collector (DVFSRC) driver 2024-10-21 16:00:51 +02:00
Makefile soc: mediatek: Add MediaTek DVFS Resource Collector (DVFSRC) driver 2024-10-21 16:00:51 +02:00
mt8167-mmsys.h soc: mediatek: mmsys: Migrate all tables to MMSYS_ROUTE() macro 2025-03-06 11:54:20 +01:00
mt8173-mmsys.h soc: mediatek: mmsys: Migrate all tables to MMSYS_ROUTE() macro 2025-03-06 11:54:20 +01:00
mt8183-mmsys.h soc: mediatek: mmsys: Migrate all tables to MMSYS_ROUTE() macro 2025-03-06 11:54:20 +01:00
mt8186-mmsys.h soc: mediatek: mmsys: Migrate all tables to MMSYS_ROUTE() macro 2025-03-06 11:54:20 +01:00
mt8188-mmsys.h soc: mediatek: mt8188-mmsys: Add support for DSC on VDO0 2025-03-06 11:54:20 +01:00
mt8192-mmsys.h soc: mediatek: mmsys: Migrate all tables to MMSYS_ROUTE() macro 2025-03-06 11:54:20 +01:00
mt8195-mmsys.h soc: mediatek: mmsys: Migrate all tables to MMSYS_ROUTE() macro 2025-03-06 11:54:20 +01:00
mt8365-mmsys.h soc: mediatek: mmsys: Migrate all tables to MMSYS_ROUTE() macro 2025-03-06 11:54:20 +01:00
mtk-cmdq-helper.c soc: mediatek: cmdq: Remove cmdq_pkt_finalize() helper function 2024-12-13 17:30:58 +01:00
mtk-devapc.c soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove 2025-01-07 13:13:57 +01:00
mtk-dvfsrc.c soc: mediatek: mtk-dvfsrc: remove an unused variable 2025-04-24 09:15:01 +02:00
mtk-infracfg.c soc: mediatek: mtk-infracfg: Disable ACP on MT8192 2022-03-01 08:21:28 +01:00
mtk-mmsys.c soc: Switch back to struct platform_driver::remove() 2024-11-01 17:08:57 +01:00
mtk-mmsys.h soc: mediatek: mtk-mmsys: Add compile time check for mmsys routes 2025-03-06 11:54:20 +01:00
mtk-mutex.c soc: mediatek: mtk-mutex: Fix confusing usage of MUTEX_MOD2 2025-06-25 15:59:00 +02:00
mtk-pmic-wrap.c soc: mediatek: pwrap: Switch to devm_clk_bulk_get_all_enabled() 2024-12-23 12:53:52 -08:00
mtk-regulator-coupler.c soc: mediatek: mediatek-regulator-coupler: Support mt8188 2024-10-21 16:00:51 +02:00
mtk-socinfo.c soc: mediatek: mtk-socinfo: Add extra entry for MT8395AV/ZA Genio 1200 2025-03-06 11:54:21 +01:00
mtk-svs.c soc: mediatek: mtk-svs: Call of_node_put(np) only once in svs_get_subsys_device() 2024-10-21 16:00:52 +02:00