All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Romain Naour <romain.naour@smile.fr>
Cc: linux-omap@vger.kernel.org
Subject: Re: AM5749: tty serial 8250 omap driver crash
Date: Wed, 16 Feb 2022 13:46:54 +0200	[thread overview]
Message-ID: <YgzkLjWwIlm9/SiK@atomide.com> (raw)
In-Reply-To: <ca2faa1d-715b-77f8-4f19-037ba9aabc8e@smile.fr>

* Romain Naour <romain.naour@smile.fr> [220216 09:04]:
> Hello,
> 
> Le 14/02/2022 à 14:08, Tony Lindgren a écrit :
> > * Tony Lindgren <tony@atomide.com> [220214 07:43]:
> >> Looks like the following script to just toggle the module state locks
> >> up things for me on beagle-x15 very fast. So yeah now I'm able to
> >> reproduce the issue. Seems like the module is not ready right after
> >> enabling it live we've seen for dra7 iva for example.
> > 
> > Looks like the following patch is also needed for uarts to avoid unbind
> > clock_unprepare warnings. But even with this patch dra7 uarts won't behave.
> > On unbind, there will be a clock "l4per-clkctrl:0128:0: failed to disable"
> > warning. Looks like after that any following clock enable does not seem to
> > work and that will cause the register access errors.
> > 
> > Looks like this is a dra7 specific issue as a similar test script on omap4
> > duovero keeps on going instead.
> 
> Thanks for the help and the patch!
> 
> I removed my patch removing the quirk and applied you patch but I can still
> reproduce the issue.

Yeah issues still exists for sure, looks like also omap4 fails but it just
takes a while to produce the clkctrl disable error. And remove for 8250_omap
is incomplete..

Below is a patch that makes the rebind of kernel serial console behave for me
together with the ti-sysc patch.

Additionally I also need to disable dma for now with:

&uart3 {
	/delete-property/ dma-names;
};

> Do you need some info about the kernel configuration?

Not really but if you can please test again with the ti-sysc patch,
8250_omap patch and with your serdev uart dma disabled with
delete-property?

Regards,

Tony

8< -----------------
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1475,10 +1475,15 @@ static int omap8250_probe(struct platform_device *pdev)
 static int omap8250_remove(struct platform_device *pdev)
 {
 	struct omap8250_priv *priv = platform_get_drvdata(pdev);
+	struct uart_8250_port *up = serial8250_get_port(priv->line);
 
+	pm_runtime_resume_and_get(&pdev->dev);
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
+	dev_pm_clear_wake_irq(&pdev->dev);
+	cancel_work_sync(&priv->qos_work);
+	cancel_delayed_work(&up->overrun_backoff);
 	serial8250_unregister_port(priv->line);
 	cpu_latency_qos_remove_request(&priv->pm_qos_request);
 	device_init_wakeup(&pdev->dev, false);

  reply	other threads:[~2022-02-16 11:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04 13:39 AM5749: tty serial 8250 omap driver crash Romain Naour
2022-02-07  8:04 ` Tony Lindgren
2022-02-09  9:13   ` Romain Naour
2022-02-10 12:05     ` Tony Lindgren
2022-02-11 10:11       ` Romain Naour
2022-02-14  7:43         ` Tony Lindgren
2022-02-14 13:08           ` Tony Lindgren
2022-02-16  9:04             ` Romain Naour
2022-02-16 11:46               ` Tony Lindgren [this message]
2022-02-16 15:51                 ` Romain Naour
2022-02-17  8:08                   ` Tony Lindgren
2022-02-17  9:09                     ` Romain Naour
2022-02-17 12:58                       ` Tony Lindgren
2022-04-02 10:15                         ` Romain Naour
2022-05-03 10:05                           ` Tony Lindgren
2022-05-04 12:42                             ` Romain Naour
2022-05-05  4:33                               ` Tony Lindgren

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=YgzkLjWwIlm9/SiK@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=romain.naour@smile.fr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.