diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2021-02-25 13:43:07 +0100 |
---|---|---|
committer | Patrice Chotard <patrice.chotard@foss.st.com> | 2021-03-11 17:50:10 +0100 |
commit | 622c956cada0ce29b4464f8d488951454f3b3bef (patch) | |
tree | 042f3c1a31e2aaad3e8ee3386c72cb8908658132 /arch | |
parent | f49eb16c17e2c45e5be712ded316ebcb17d29d17 (diff) | |
download | u-boot-622c956cada0ce29b4464f8d488951454f3b3bef.tar.gz |
stm32mp: bsec: manage clock when present in device tree
Enable the clocks during bsec probe when they are present in device tree.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-stm32mp/bsec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c index 88c7aec8b4..fe39bd80cf 100644 --- a/arch/arm/mach-stm32mp/bsec.c +++ b/arch/arm/mach-stm32mp/bsec.c @@ -6,6 +6,7 @@ #define LOG_CATEGORY UCLASS_MISC #include <common.h> +#include <clk.h> #include <dm.h> #include <log.h> #include <misc.h> @@ -490,6 +491,15 @@ static int stm32mp_bsec_probe(struct udevice *dev) { int otp; struct stm32mp_bsec_plat *plat; + struct clk_bulk clk_bulk; + int ret; + + ret = clk_get_bulk(dev, &clk_bulk); + if (!ret) { + ret = clk_enable_bulk(&clk_bulk); + if (ret) + return ret; + } /* * update unlocked shadow for OTP cleared by the rom code |