linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Pramod Gurav <gpramod@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	bryanh@codeaurora.org, jslaby@suse.cz
Subject: Re: [PATCH v3 2/3] tty: serial: msm: Remove duplicate operations on clocks in startup/shutdown
Date: Thu, 07 May 2015 16:34:47 -0700	[thread overview]
Message-ID: <554BF697.7010208@codeaurora.org> (raw)
In-Reply-To: <f656bf979fb566091a3b8c6cc06712c2.squirrel@www.codeaurora.org>

On 04/29/15 08:45, Pramod Gurav wrote:
> Thanks Stephen for review.
>
> On Fri, April 10, 2015 11:33 pm, Stephen Boyd wrote:
>> On 04/10/15 05:19, Pramod Gurav wrote:
>>> @@ -683,8 +679,7 @@ static void msm_power(struct uart_port *port,
>>> unsigned int state,
>>>
>>>  	switch (state) {
>>>  	case 0:
>>> -		clk_prepare_enable(msm_port->clk);
>>> -		clk_prepare_enable(msm_port->pclk);
>>> +		msm_init_clock(port);
>> Hm... now we would call msm_serial_set_mnd_regs() whenever we power on
>> the port? Presumably we only need to do that once when we probe (or when
>> we resume from a sleep state that resets the registers, i.e.
>> hibernation) but I guess we're getting saved by the fact that the
>> if/else if pair in msm_serial_set_mnd_regs_from_uartclk would never be
>> true after the first time we call it?
> I tried replacing msm_init_clock() call with msm_serial_set_mnd_regs() in
> msm_startup() as msm_startup gets called just after msm_power() so that
> clk_prepare_enable() is followed by mnd settings. But it does not get the
> kernel booted for some reason.

That's concerning. Did you also drop the call to msm_init_clock() from
msm_power() as is done in this patch? If that's done then it seems that
nothing would be different besides the removal of clk_prepare_enable()
in msm_startup().

>
> So, can I get a acked-by for this patch or you still think it can be done
> in a better way?

Using msm_init_clock() in the msm_power() doesn't look symmetrical so if
we can avoid it I would prefer that.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-05-07 23:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 12:19 [PATCH v3 1/3] tty: serial: msm: Add mask value for UART_DM registers Pramod Gurav
2015-04-10 12:19 ` [PATCH v3 2/3] tty: serial: msm: Remove duplicate operations on clocks in startup/shutdown Pramod Gurav
2015-04-10 18:03   ` Stephen Boyd
2015-04-29 15:45     ` Pramod Gurav
2015-05-07 23:34       ` Stephen Boyd [this message]
2015-04-10 12:19 ` [PATCH v3 3/3] tty: serial: msm: replaces (1 << x) with BIT(x) macro Pramod Gurav
2015-04-10 12:33   ` Fabio Estevam
2015-05-07 23:37   ` Stephen Boyd
2015-04-10 17:57 ` [PATCH v3 1/3] tty: serial: msm: Add mask value for UART_DM registers Stephen Boyd
2015-04-28 11:26 ` Greg KH

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=554BF697.7010208@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=bryanh@codeaurora.org \
    --cc=gpramod@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.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).