MLK-16225: clk: imx8: Do not register clocks for unowned resources
authorLeonard Crestez <leonard.crestez@nxp.com>
Tue, 26 Sep 2017 14:53:17 +0000 (17:53 +0300)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:38:43 +0000 (15:38 -0500)
commitf5fa786a36274cd0804a384b7b517a7462ebc74d
treeb2aec8798058308ac63a8ae2ee9c8365b0ed48e6
parent91b269ad5c51799b28aed2cb400671b8bd997bdd
MLK-16225: clk: imx8: Do not register clocks for unowned resources

Registering clocks for unowned resources can result in lots of pointless
scfw errors and potential faults when attempting to use LPCG.

Solve this by checking ownership via sc_rm_is_resource_owned and
returning -ENODEV from clock registration functions. The top-level clock
provider is also modified so that it accepts such errors silently.

This is intended for xen but could also be useful for SCFW partitioning.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
drivers/clk/imx/clk-divider-scu.c
drivers/clk/imx/clk-gate-scu.c
drivers/clk/imx/clk-imx8.c
drivers/clk/imx/clk-imx8.h
drivers/clk/imx/clk-imx8qm.c
drivers/clk/imx/clk-mux-scu.c