From: Patrice CHOTARD Date: Fri, 12 Mar 2021 13:29:39 +0100 Subject: [PATCH] stm32mp: bsec: manage clock when present in device tree In-Reply-To: References: <20210225134305.1.Iec7b40977c201f0a99cbaa730765c4888e950074@changeid> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi On 3/9/21 2:27 PM, Patrice CHOTARD wrote: > Hi Patrick > > On 2/25/21 1:43 PM, Patrick Delaunay wrote: >> Enable the clocks during bsec probe when they are present in device tree. >> >> Signed-off-by: Patrick Delaunay >> --- >> >> arch/arm/mach-stm32mp/bsec.c | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> 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 >> +#include >> #include >> #include >> #include >> @@ -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 >> > > Reviewed-by: Patrice Chotard > Thanks > Patrice > Applied to u-boot-stm/next Thanks Patrice