From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] clk: i.MX6ul: Disable GPMI_IO clk before reparenting
Date: Mon, 9 Dec 2019 10:46:03 +0100 [thread overview]
Message-ID: <20191209094603.8309-1-s.hauer@pengutronix.de> (raw)
Before reparenting the ENFC_SEL mux we have to make sure the GPMI_IO clk
is disabled as recommended in the reference manual. Otherwise glitches
may occur on the GPMI clk which result in a later NAND failure:
MXS: Timeout resetting block via register 0x01806000
mxs_nand 1806000.gpmi-nand@1806000.of: probe failed: Connection timed out
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/clk/imx/clk-imx6ul.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c
index b0a6bb0e8d..35483efde6 100644
--- a/drivers/clk/imx/clk-imx6ul.c
+++ b/drivers/clk/imx/clk-imx6ul.c
@@ -450,6 +450,9 @@ static int imx6_ccm_probe(struct device_d *dev)
clk_set_parent(clks[IMX6ULL_CLK_EPDC_PRE_SEL],
clks[IMX6UL_CLK_PLL3_PFD2]);
+ /* Disable GPMI_IO clk before reparenting to avoid glitches */
+ clks[IMX6UL_CLK_GPMI_IO]->ops->disable(clks[IMX6UL_CLK_GPMI_IO]);
+
clk_set_parent(clks[IMX6UL_CLK_ENFC_SEL], clks[IMX6UL_CLK_PLL2_PFD2]);
return 0;
--
2.24.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
reply other threads:[~2019-12-09 9:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191209094603.8309-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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