Skip to content

Commit abf42d2

Browse files
Atomar25gregkh
authored andcommitted
tty: serial: owl: add "much needed" clk_prepare_enable()
commit 8ba92cf ("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(). Fixes: 8ba92cf ("arm64: dts: actions: s700: Add Clock Management Unit") Signed-off-by: Amit Singh Tomar <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9a98e7a commit abf42d2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/tty/serial/owl-uart.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,12 @@ static int owl_uart_probe(struct platform_device *pdev)
680680
return PTR_ERR(owl_port->clk);
681681
}
682682

683+
ret = clk_prepare_enable(owl_port->clk);
684+
if (ret) {
685+
dev_err(&pdev->dev, "could not enable clk\n");
686+
return ret;
687+
}
688+
683689
owl_port->port.dev = &pdev->dev;
684690
owl_port->port.line = pdev->id;
685691
owl_port->port.type = PORT_OWL;
@@ -712,6 +718,7 @@ static int owl_uart_remove(struct platform_device *pdev)
712718

713719
uart_remove_one_port(&owl_uart_driver, &owl_port->port);
714720
owl_uart_ports[pdev->id] = NULL;
721+
clk_disable_unprepare(owl_port->clk);
715722

716723
return 0;
717724
}

0 commit comments

Comments
 (0)