soc: imx8m: Enable OCOTP clock for imx8mm before reading registers
authorNathan Rossi <nathan.rossi@digi.com>
Mon, 14 Aug 2023 01:57:00 +0000 (01:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:49 +0000 (14:56 +0200)
commit328efccc7847b55b0083a5b5a81e28a4f79b6fa0
treef4eccf7f3f2bc3295a4e507bd07180491ecd2a83
parentaab681bcb13a7b3390ed3075e6bc9426d0bf2245
soc: imx8m: Enable OCOTP clock for imx8mm before reading registers

[ Upstream commit 9d1e8275a28f51599d754ce661c91e0a689c0234 ]

Commit 836fb30949d9 ("soc: imx8m: Enable OCOTP clock before reading the
register") added configuration to enable the OCOTP clock before
attempting to read from the associated registers.

This same kexec issue is present with the imx8m SoCs that use the
imx8mm_soc_uid function (e.g. imx8mp). This requires the imx8mm_soc_uid
function to configure the OCOTP clock before accessing the associated
registers. This change implements the same clock enable functionality
that is present in the imx8mq_soc_revision function for the
imx8mm_soc_uid function.

Signed-off-by: Nathan Rossi <nathan.rossi@digi.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Fixes: 836fb30949d9 ("soc: imx8m: Enable OCOTP clock before reading the register")
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/imx/soc-imx8m.c