clk: imx: clk-composite-93: check white_list
authorPeng Fan <peng.fan@nxp.com>
Tue, 30 Aug 2022 03:31:33 +0000 (11:31 +0800)
committerAbel Vesa <abel.vesa@linaro.org>
Mon, 19 Sep 2022 10:06:45 +0000 (13:06 +0300)
commit2b66f02e2de174c2a9bdf60160a1d9963dc7ca2c
tree6d956a947b65635fb246cefc61b43af35cdfd30b
parent4a3de5aa7743d1def6fba783c072e41df6b851c5
clk: imx: clk-composite-93: check white_list

The CCM ROOT AUTHEN register WHITE_LIST indicate:
Each bit in this field represent for one domain. Bit16~Bit31 represent
for DOMAIN0~DOMAIN15 respectively. Only corresponding bit of the domains
is set to 1 can change the registers of this Clock Root.

i.MX93 DID is 3, so if BIT(3 + WHITE_LIST_SHIFT) is 0, the clk should be
set to read only. To make the imx93_clk_composite_flags be reusable,
add a new parameter named did(domain id);

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20220830033137.4149542-5-peng.fan@oss.nxp.com
drivers/clk/imx/clk-composite-93.c
drivers/clk/imx/clk-imx93.c
drivers/clk/imx/clk.h