From: "Johannes (krjdev) Krottmayer" <krjdev@gmail.com>
To: u-boot@lists.denx.de, dillon.minfei@gmail.com,
patrice.chotard@foss.st.com
Subject: drivers: clk: stm32h7: Endless loop of dead in driver probe function
Date: Wed, 2 Mar 2022 18:00:27 +0100 [thread overview]
Message-ID: <ed5b3a6e-4140-3b57-268e-fe4459e24568@gmail.com> (raw)
Hi,
Some IMHO fatal issues in the the clock driver for the
STM32H7 series driver.
Affected driver:
drivers/clk/clk_stm32h7.c
Affected configs (boards):
configs/stm32h750-art-pi_defconfig
configs/stm32h743-disco_defconfig
configs/stm32h743-eval_defconfig
Description:
The driver currently requires a external working clock source
(HSE). No issues in the circuit are accepted by the current
implementation. Also a fixed (defined) frequency of the external
clock source.
In the probe function stm32_clk_probe() from the driver there
will be configure_clocks() called. Here are the issues.
As code snippet from configure_clocks():
/* Switch on HSE */
setbits_le32(®s->cr, RCC_CR_HSEON);
while (!(readl(®s->cr) & RCC_CR_HSERDY))
;
RCC_CR_HSERDY will here never set, when there is no external
clock source or an issue in the circuit. -> Endless loop of dead.
My possible fixes:
At a timeout when reading the register and if the timeout is
elapsed, print an error message and return with ETIMEDOUT, so
the dm manger can call the hang() function.
Johannes K.
next reply other threads:[~2022-03-02 17:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 17:00 Johannes (krjdev) Krottmayer [this message]
2022-03-08 9:00 ` drivers: clk: stm32h7: Endless loop of dead in driver probe function Patrick DELAUNAY
2022-03-09 7:24 ` Johannes (krjdev) Krottmayer
2022-03-09 7:43 ` Patrice CHOTARD
2022-03-09 8:02 ` Johannes (krjdev) Krottmayer
2022-03-09 8:08 ` Patrice CHOTARD
2022-03-09 11:38 ` Johannes (krjdev) Krottmayer
2022-03-10 8:04 ` Patrice CHOTARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed5b3a6e-4140-3b57-268e-fe4459e24568@gmail.com \
--to=krjdev@gmail.com \
--cc=dillon.minfei@gmail.com \
--cc=patrice.chotard@foss.st.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox