clk: imx: Add the pcc reset controller support on imx8ulp
authorJacky Bai <ping.bai@nxp.com>
Tue, 14 Sep 2021 06:52:08 +0000 (14:52 +0800)
committerAbel Vesa <abel.vesa@nxp.com>
Thu, 30 Sep 2021 13:22:56 +0000 (16:22 +0300)
commit3fa36200a43f508ee49895e74d86b511fcd8ff3f
treea23b3ab848843b1aca9ae9b4895919c489577155
parentc43a801a57890b15e16a0502edf145d59c91baf7
clk: imx: Add the pcc reset controller support on imx8ulp

On i.MX8ULP, for some of the PCCs, it has a peripheral SW RST bit
resides in the same registers as the clock controller. So add this
SW RST controller support alongs with the pcc clock initialization.

the reset and clock shared the same register, to avoid  accessing
the same register by reset control and clock control concurrently,
locking is necessary, so reuse the imx_ccm_lock spinlock to simplify
the code.

Suggested-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20210914065208.3582128-10-ping.bai@nxp.com
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
drivers/clk/imx/clk-composite-7ulp.c
drivers/clk/imx/clk-imx8ulp.c