lkml.org 
[lkml]   [2020]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.6 096/167] tty: serial: owl: add "much needed" clk_prepare_enable()
    Date
    From: Amit Singh Tomar <amittomer25@gmail.com>

    commit abf42d2f333b21bf8d33b2fbb8a85fa62037ac01 upstream.

    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().

    Fixes: 8ba92cf59335 ("arm64: dts: actions: s700: Add Clock Management Unit")
    Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
    Cc: stable <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/1587067917-1400-1-git-send-email-amittomer25@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/tty/serial/owl-uart.c | 7 +++++++
    1 file changed, 7 insertions(+)

    --- a/drivers/tty/serial/owl-uart.c
    +++ b/drivers/tty/serial/owl-uart.c
    @@ -680,6 +680,12 @@ static int owl_uart_probe(struct platfor
    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 platfo

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

    return 0;
    }

    \
     
     \ /
      Last update: 2020-04-28 20:56    [W:5.330 / U:0.320 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site