soc: mediatek: Support reset bit mapping in mmsys driver
authorHsiao Chien Sung <shawn.sung@mediatek.com>
Tue, 24 Oct 2023 13:00:34 +0000 (21:00 +0800)
committerAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 11 Dec 2023 10:36:12 +0000 (11:36 +0100)
commit67637de7bbdea8356ecfd37b545c906961e1137f
treeb622f580449f9cf6385df87a2370ad9e89ecd924
parent2ffdd4773d98b1f7488f8e37bd881bbecec24d85
soc: mediatek: Support reset bit mapping in mmsys driver

- Reset ID must starts from 0 and be consecutive, but
  the reset bits in our hardware design is not continuous,
  some bits are left unused, we need a map to solve the problem
- Use old style 1-to-1 mapping if .rst_tb is not defined

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
drivers/soc/mediatek/mtk-mmsys.c
drivers/soc/mediatek/mtk-mmsys.h