From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Mon, 8 Jul 2019 01:39:26 +0000 Subject: [U-Boot] [PATCH V2 19/51] imx8m: soc: probe clk before relocation In-Reply-To: <20190708015333.20411-1-peng.fan@nxp.com> References: <20190708015333.20411-1-peng.fan@nxp.com> Message-ID: <20190708015333.20411-20-peng.fan@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de probe clk device before relocation to get cpu clk. Signed-off-by: Peng Fan --- arch/arm/mach-imx/imx8m/soc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 5115471eff..8d40ca0229 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -14,6 +14,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -284,3 +288,20 @@ void reset_cpu(ulong addr) */ } } + +/* TODO: Add i.MX8MQ */ +#ifdef CONFIG_IMX8MM +int arch_cpu_init_dm(void) +{ + struct udevice *dev; + + uclass_find_first_device(UCLASS_CLK, &dev); + + for (; dev; uclass_find_next_device(&dev)) { + if (device_probe(dev)) + continue; + } + + return 0; +} +#endif -- 2.16.4