From: Stephen Boyd <sboyd@codeaurora.org>
To: Pramod Gurav <pramod.gurav@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>,
gregkh@linuxfoundation.org, David Brown <davidb@codeaurora.org>,
jslaby@suse.com, linux-arm-msm@vger.kernel.org,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: serial: msm: Remove duplicate handling of clocks
Date: Wed, 25 May 2016 16:07:55 -0700 [thread overview]
Message-ID: <20160525230755.GA3468@codeaurora.org> (raw)
In-Reply-To: <CANYu_0v9JuXjviJBTkC3YyyvmA3SmJxX8g9a7P+sMpu20FtONQ@mail.gmail.com>
On 05/16, Pramod Gurav wrote:
> On 11 May 2016 at 14:30, Pramod Gurav <pramod.gurav@linaro.org> wrote:
> > msm_serial driver provides a .pm callback to the serial core to enable
> > and disable clock resource in suspend/resume path. This function is
> > also called before msm_startup. msm_startup also enables the clocks which
> > is not needed. Hence remove the duplcate clock operation from msm_startup
> > and msm_shutdown. Same is done in console setup to get rid of duplicate
> > clock operation.
> >
> > Tested on DB410C console.
> >
> > Signed-off-by: Pramod Gurav <pramod.gurav@linaro.org>
> > ---
> > drivers/tty/serial/msm_serial.c | 15 ++-------------
> > 1 file changed, 2 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
> > index dcde955..73c3217 100644
> > --- a/drivers/tty/serial/msm_serial.c
> > +++ b/drivers/tty/serial/msm_serial.c
> > @@ -959,15 +959,6 @@ static int msm_set_baud_rate(struct uart_port *port, unsigned int baud,
> > return baud;
> > }
> >
> > -static void msm_init_clock(struct uart_port *port)
> > -{
> > - struct msm_port *msm_port = UART_TO_MSM(port);
> > -
> > - clk_prepare_enable(msm_port->clk);
> > - clk_prepare_enable(msm_port->pclk);
> > - msm_serial_set_mnd_regs(port);
> > -}
> > -
> > static int msm_startup(struct uart_port *port)
> > {
> > struct msm_port *msm_port = UART_TO_MSM(port);
> > @@ -982,7 +973,7 @@ static int msm_startup(struct uart_port *port)
> > if (unlikely(ret))
> > return ret;
> >
> > - msm_init_clock(port);
> > + msm_serial_set_mnd_regs(port);
>
> Further testing with another UART port made me realize that serial
> port does not work after disabling msm_port->clk clock. The RX data
> part will be affected.
> Confirmed from manual that this clock should never be turned of to
> avoid loss of incoming data. Sorry for the noise.
>
Does that mean this patch shouldn't be applied? I hope that the
pm callback would do the right thing and be called when we expect
to be receiving data on the line.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2016-05-25 23:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 9:00 [PATCH] tty: serial: msm: Remove duplicate handling of clocks Pramod Gurav
2016-05-12 0:18 ` Stephen Boyd
2016-05-12 4:38 ` Pramod Gurav
2016-05-16 8:31 ` Pramod Gurav
2016-05-25 23:07 ` Stephen Boyd [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160525230755.GA3468@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=andy.gross@linaro.org \
--cc=davidb@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pramod.gurav@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).