From: Harm Berntsen <harm.berntsen@nedap.com>
To: "peng.fan@nxp.com" <peng.fan@nxp.com>,
"uboot-imx@nxp.com" <uboot-imx@nxp.com>,
"sbabic@denx.de" <sbabic@denx.de>
Cc: "sjg@chromium.org" <sjg@chromium.org>,
"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Subject: Fwd: Re: [PATCH v2 15/16] clk: Detect failure to set defaults
Date: Thu, 26 Aug 2021 10:27:15 +0000 [thread overview]
Message-ID: <dbde2b83044ce9f3e8c360e9ddce0fa8db16f8ef.camel@nedap.com> (raw)
In-Reply-To: CAPnjgZ0seoW2v=4vQpteSE9uME-Pjcd9wuscxdnsoxm678Ta1A@mail.gmail.com
Hi Stefano and Peng,
There is an issue that prevents the imx8mn to boot in 2021.10-rc2. See
the conversation below. Could you help with this?
-- Harm
-------- Forwarded Message --------
From: Simon Glass <sjg@chromium.org>
To: Harm Berntsen <harm.berntsen@nedap.com>
Cc: u-boot@lists.denx.de <u-boot@lists.denx.de>, trini@konsulko.com
<trini@konsulko.com>
Subject: Re: [PATCH v2 15/16] clk: Detect failure to set defaults
Date: Fri, 20 Aug 2021 12:18:07 -0600
> Hi Harm,
>
> On Wed, 18 Aug 2021 at 08:09, Harm Berntsen <harm.berntsen@nedap.com>
> wrote:
> >
> > On Thu, 2021-05-13 at 19:39 -0600, Simon Glass wrote:
> > > When the default clocks cannot be set, the clock is silently
> > > probed and
> > > the error is ignored. This is incorrect, since having the clocks
> > > at the
> > > correct speed may be important for operation of the system.
> > >
> > > Fix it by checking the return code.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > ---
> > >
> > > (no changes since v1)
> > >
> > > drivers/clk/clk-uclass.c | 6 +++++-
> > > 1 file changed, 5 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
> > > index 4ab3c402ed8..2a2e1cfbd61 100644
> > > --- a/drivers/clk/clk-uclass.c
> > > +++ b/drivers/clk/clk-uclass.c
> > > @@ -796,13 +796,17 @@ void devm_clk_put(struct udevice *dev,
> > > struct clk
> > > *clk)
> > >
> > > int clk_uclass_post_probe(struct udevice *dev)
> > > {
> > > + int ret;
> > > +
> > > /*
> > > * when a clock provider is probed. Call
> > > clk_set_defaults()
> > > * also after the device is probed. This takes care of
> > > cases
> > > * where the DT is used to setup default parents and
> > > rates
> > > * using assigned-clocks
> > > */
> > > - clk_set_defaults(dev, 1);
> > > + ret = clk_set_defaults(dev, 1);
> > > + if (ret)
> > > + return log_ret(ret);
> > >
> > > return 0;
> > > }
> >
> > Note that this patch broke booting my imx8mn based board on U-Boot
> > v2021.10-rc2. The failure is due to the clock-controller@30380000
> > configuration in the imx8mn.dtsi file. I had to remove the
> > following
> > clocks from the device tree to get my device to boot again (all
> > from
> > the assigned-clocks of clock-controller@30380000):
> >
> > <&clk IMX8MN_CLK_A53_CORE>,
> > <&clk IMX8MN_CLK_NOC>,
> > <&clk IMX8MN_CLK_AUDIO_AHB>,
> > <&clk IMX8MN_CLK_IPG_AUDIO_ROOT>,
> > <&clk IMX8MN_SYS_PLL3>,
> > <&clk IMX8MN_AUDIO_PLL1>,
> > <&clk IMX8MN_AUDIO_PLL2>;
> >
> > I looked into the clk-imx8mn.c code and I see that we indeed miss
> > clocks there. Unfortunately I could not port code from the Linux
> > kernel: we are missing the imx_clk_hw_mux2 function for the
> > IMX8MN_CLK_A53_CORE clock. I did not look into the other clocks.
>
>
> Perhaps the iMX maintainer could help with this? It does sound like a
> bug.
>
> Regards,
> SImon
>
> >
> >
> > -- Harm
next prev parent reply other threads:[~2021-08-26 10:27 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 1:39 [PATCH v2 01/16] sandbox: net: Ensure host name is always a valid string Simon Glass
2021-05-14 1:39 ` [PATCH v2 02/16] video: Check return value in pwm_backlight_of_to_plat() Simon Glass
2021-07-16 15:51 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 03/16] test: Rename final check in setexpr_test_backref() Simon Glass
2021-07-16 15:51 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 04/16] tools: Avoid showing return value of clock_gettime() Simon Glass
2021-07-16 15:51 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 05/16] reset: Avoid a warning in devm_reset_bulk_get_by_node() Simon Glass
2021-07-16 15:51 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 06/16] reset: Avoid a warning in devm_regmap_init() Simon Glass
2021-07-16 15:51 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 07/16] test: Avoid random numbers in dm_test_devm_regmap() Simon Glass
2021-05-25 0:57 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 08/16] dm: core: Check uclass_get() return value when dumping Simon Glass
2021-07-16 15:51 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 09/16] sandbox: scmi: Indicate dead code for coverity Simon Glass
2021-05-14 1:39 ` [PATCH v2 10/16] sandbox: cros_ec: Update error handling when reading matrix Simon Glass
2021-07-16 15:51 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 11/16] cbfs: Check offset range when reading a file Simon Glass
2021-07-16 15:51 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 12/16] pinctrl: Avoid coverity warning when checking width Simon Glass
2021-07-16 15:51 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 13/16] tpm: Check outgoing command size Simon Glass
2021-07-16 15:52 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 14/16] sandbox: Silence coverity warning in state_read_file() Simon Glass
2021-07-16 15:52 ` Tom Rini
2021-05-14 1:39 ` [PATCH v2 15/16] clk: Detect failure to set defaults Simon Glass
2021-07-16 15:52 ` Tom Rini
2021-08-18 14:09 ` Harm Berntsen
2021-08-20 18:18 ` Simon Glass
2021-08-26 10:27 ` Harm Berntsen [this message]
2021-10-20 7:17 ` Rasmus Villemoes
2021-10-24 19:53 ` Simon Glass
2021-05-14 1:39 ` [PATCH v2 16/16] RFC: clk: Return error code from clk_set_default_get_by_id() Simon Glass
2021-05-15 20:03 ` [PATCH v2 01/16] sandbox: net: Ensure host name is always a valid string Ramon Fried
2021-07-16 15:51 ` Tom Rini
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=dbde2b83044ce9f3e8c360e9ddce0fa8db16f8ef.camel@nedap.com \
--to=harm.berntsen@nedap.com \
--cc=peng.fan@nxp.com \
--cc=sbabic@denx.de \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
/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