Hello, Le 16/02/2022 à 12:46, Tony Lindgren a écrit : > * Romain Naour <romain.naour@xxxxxxxx> [220216 09:04]: >> Hello, >> >> Le 14/02/2022 à 14:08, Tony Lindgren a écrit : >>> * Tony Lindgren <tony@xxxxxxxxxxx> [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.. Ok. > > 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; > }; On my side I'm using uart4 but I don't think it makes a difference. > >> 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? I had a crash but on close path: [<c06af3b0>] (omap8250_set_mctrl) from [<c069fd38>] (uart_update_mctrl+0x3c/0x48) [<c069fd38>] (uart_update_mctrl) from [<c06a2ac8>] (uart_dtr_rts+0x54/0x9c) [<c06a2ac8>] (uart_dtr_rts) from [<c068b0d0>] (tty_port_shutdown+0x78/0x9c) [<c068b0d0>] (tty_port_shutdown) from [<c068b8ec>] (tty_port_close+0x3c/0x74) [<c068b8ec>] (tty_port_close) from [<c06b3b4c>] (ttyport_close+0x40/0x58) [<c06b3b4c>] (ttyport_close) from [<c092aca4>] (gnss_serial_close+0x14/0x24) [<c092aca4>] (gnss_serial_close) from [<c092a4a0>] (gnss_release+0x44/0x64) [<c092a4a0>] (gnss_release) from [<c036b7f4>] (__fput+0x78/0x23c) [<c036b7f4>] (__fput) from [<c0246308>] (task_work_run+0x90/0xbc) [<c0246308>] (task_work_run) from [<c0209c0c>] (do_work_pending+0x558/0x560) [<c0209c0c>] (do_work_pending) from [<c02000cc>] (slow_work_pending+0xc/0x20) My test is starting gpsmon /dev/gnss0 several time. I hope it help. Best regards, Romain > > 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);