patch "tty: serial: owl: add "much needed" clk_prepare_enable()" added to tty-linus
This is a note to let you know that I've just added the patch titled
tty: serial: owl: add "much needed" clk_prepare_enable()
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From abf42d2f333b21bf8d33b2fbb8a85fa62037ac01 Mon Sep 17 00:00:00 2001
From: Amit Singh Tomar <[email protected]>
Date: Fri, 17 Apr 2020 01:41:57 +0530
Subject: tty: serial: owl: add "much needed" clk_prepare_enable()
commit 8ba92cf59335 ("arm64: dts: actions: s700: Add Clock Management Unit") breaks the UART on Cubieboard7-lite (based on S700 SoC), This is due to the fact that generic clk routine clk_disable_unused() disables the gate clks, and that in turns disables OWL UART (but UART driver never enables it). To prove this theory, Andre suggested to use "clk_ignore_unused" in kernel commnd line and it worked (Kernel happily lands into RAMFS world :)).
This commit fix this up by adding clk_prepare_enable().
--- drivers/tty/serial/owl-uart.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/tty/serial/owl-uart.c +7 -0
@@ -680,6 +680,12 @@ static int owl_uart_probe(struct platform_device *pdev)return PTR_ERR (owl_port->clk); } + ret =clk_prepare_enable (owl_port->clk); +if (ret) { +dev_err (&pdev->dev,"could not enable clk\n" ); +return ret; + } + owl_port->port.dev = &pdev->dev; owl_port->port.line = pdev->id; owl_port->port.type =PORT_OWL ;
@@ -712,6 +718,7 @@ static int owl_uart_remove(struct platform_device *pdev)uart_remove_one_port (&owl_uart_driver, &owl_port->port); owl_uart_ports[pdev->id] =NULL ; +clk_disable_unprepare (owl_port->clk);return 0 ; }
Signature · 1 line
2.26.2