mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] video: stm32-ltdc: reset the controller on probe
Date: Mon, 28 Sep 2026 11:55:38 +0200	[thread overview]
Message-ID: <20260928095540.1101553-1-a.fatoum@pengutronix.de> (raw)

Linux resets the LTDC on probe. Let's do the same in barebox, so
a chainloaded barebox doesn't attempt reconfiguration of the DSI host
while the LTDC is still streaming to it.

Tested by chainloading the generic BL33 image on an STM32MP157C-DK2 and
observing it doesn't hang when framebuffer support is enabled.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/video/stm32_ltdc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/video/stm32_ltdc.c b/drivers/video/stm32_ltdc.c
index 43d443788364..5165bbf01749 100644
--- a/drivers/video/stm32_ltdc.c
+++ b/drivers/video/stm32_ltdc.c
@@ -272,6 +272,10 @@ static int ltdc_probe(struct device *dev)
 	if (IS_ERR(hw->pclk))
 		return dev_errp_probe(dev, hw->pclk, "peripheral clock get\n");
 
+	ret = device_reset_us(dev, 10);
+	if (ret)
+		return dev_err_probe(dev, ret, "peripheral reset\n");
+
 	for_each_available_child_of_node(dev->of_node, np) {
 		struct ltdc_fb *priv;
 		struct of_endpoint ep;
-- 
2.47.3




                 reply	other threads:[~2026-09-28 10:48 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=20260928095540.1101553-1-a.fatoum@pengutronix.de \
    --to=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