imx: imx8m: fix boot when CONFIG_$(SPL_)CLK not defined
Subsystems (3)
PATCH 1/1 imx: imx8m: fix boot when CONFIG_$(SPL_)CLK not defined
When CONFIG_$(SPL_)CLK not defined, the clock controller device not exist, so to avoid boot failure for platform not have CONFIG_$(SPL_)CLK, add a check.
Reviewed-by Patrick Wildt <[email protected]>
Tested-by Patrick Wildt <[email protected]>
Signed-off-by Peng Fan <[email protected]>
---
V1:
Based on pull request https://github.com/MrVan/u-boot/tree/imx-master-10-15
arch/arm/mach-imx/imx8m/soc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
arch/arm/mach-imx/imx8m/soc.c +8 -6
@@ -236,12 +236,14 @@ int arch_cpu_init_dm(void)struct udevice *dev;int ret; - ret =uclass_get_device_by_name (UCLASS_CLK , -"clock-controller at 30380000" , - &dev); -if (ret <0 ) { -printf ("Failed to find clock node. Check device tree\n" ); -return ret; +if (CONFIG_IS_ENABLED (CLK )) { + ret =uclass_get_device_by_name (UCLASS_CLK , +"clock-controller@30380000" , + &dev); +if (ret <0 ) { +printf ("Failed to find clock node. Check device tree\n" ); +return ret; + } }return 0 ;
Signature · 1 line
2.16.4