Thread (36 messages) 36 messages, 5 authors, 2020-08-12

Re: [RFC v2 03/11] tty: serial: qcom_geni_serial: Use OPP API to set clk/perf state

From: John Stultz <hidden>
Date: 2020-08-12 01:33:53
Also in: dri-devel, linux-arm-msm, linux-pm, linux-scsi, linux-spi, lkml

On Tue, Aug 11, 2020 at 4:11 PM John Stultz [off-list ref] wrote:
On Wed, Mar 20, 2019 at 2:49 AM Rajendra Nayak [off-list ref] wrote:
quoted
geni serial needs to express a perforamnce state requirement on CX
depending on the frequency of the clock rates. Use OPP table from
DT to register with OPP framework and use dev_pm_opp_set_rate() to
set the clk/perf state.

Signed-off-by: Rajendra Nayak <redacted>
Signed-off-by: Stephen Boyd <redacted>
---
 drivers/tty/serial/qcom_geni_serial.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
Hey,
  I just wanted to follow up on this patch, as I've bisected it
(a5819b548af0) down as having broken qca bluetooth on the Dragonboard
845c.

I haven't yet had time to debug it yet, but wanted to raise the issue
in case anyone else has seen similar trouble.
So I dug in a bit further, and this chunk seems to be causing the issue:
quoted hunk ↗ jump to hunk
@@ -961,7 +963,7 @@ static void qcom_geni_serial_set_termios(struct uart_port *uport,
                goto out_restart_rx;

        uport->uartclk = clk_rate;
-       clk_set_rate(port->se.clk, clk_rate);
+       dev_pm_opp_set_rate(port->dev, clk_rate);
        ser_clk_cfg = SER_CLK_EN;
        ser_clk_cfg |= clk_div << CLK_DIV_SHFT;

With that applied, I see the following errors in dmesg and bluetooth
fails to function:
[    4.763467] qcom_geni_serial 898000.serial: dev_pm_opp_set_rate:
failed to find OPP for freq 102400000 (-34)
[    4.773493] qcom_geni_serial 898000.serial: dev_pm_opp_set_rate:
failed to find OPP for freq 102400000 (-34)

With just that chunk reverted on linus/HEAD, bluetooth seems to work ok.

thanks
-john
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help