linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: gpramod@codeaurora.org
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-serial@vger.kernel.org, Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>,
	Jiri Slaby <jslaby@suse.com>,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kernel-owner@vger.kernel.org
Subject: Re: [PATCH v2] tty: msm_serial: remove static clk rate setting in probe
Date: Wed, 20 Apr 2016 11:36:00 +0530	[thread overview]
Message-ID: <1d51e468662254075fe2a8477f7addad@codeaurora.org> (raw)
In-Reply-To: <1457318800-26090-1-git-send-email-srinivas.kandagatla@linaro.org>

On 2016-03-07 08:16, Srinivas Kandagatla wrote:
> The issue with setting up a fixed clock rate at probe is that it would
> overwrite the console rate set by the bootloader for its console 
> device.
> This would result in serial out corruption or missing log when we 
> system
> is booted with earlycon. This is not a issue if we boot system without
> earlycon.
> 
> This setup is at least not required with the mainline driver, this code
> used to be required because the clk_enable() call would fail if
> clk_set_rate() wasn't called first.
> 
> Originally the issue was noticed on DB410c which is based on APQ8016
> chipset.
> 
> Without this patch the console log with earlycon would look like:
> ...
> [    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, 
> nr_cpu_ids=1
> [    0.000000] NR_IRQS:64 nr_irqs:64 0
> ����+HH��0.699378] console [ttyMSM0] enabled
> [    0.699378] console [ttyMSM0] enabled
> [    0.702003] bootconsole [uart0] disabled
> [    0.702003] bootconsole [uart0] disabled
> ...
> 
> with this patch I can see all the skipped lines on the console
> 
> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---

Tested on DB410C. Fixed below curruption with earlycon:

[    0.815843] msm_iommu_ctx 1e3b000.qcom,iommu-ctx: context periph_SDC2 
using bank 27
����[    1.411080] console [ttyMSM0] enabled
[    1.411080] console [ttyMSM0] enabled

Tested-by: Pramod Gurav <gpramod@codeaurora.org>

> 
> Changes since v1:
> 	- removed empty line suggested by Greg KH
> 	- added reviewed-by
> 	- added extra comment suggested by Stephen Boyd.
> 
>  drivers/tty/serial/msm_serial.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/msm_serial.c 
> b/drivers/tty/serial/msm_serial.c
> index dcde955..3bf41ab 100644
> --- a/drivers/tty/serial/msm_serial.c
> +++ b/drivers/tty/serial/msm_serial.c
> @@ -1579,8 +1579,6 @@ static int msm_serial_probe(struct 
> platform_device *pdev)
>  		msm_port->pclk = devm_clk_get(&pdev->dev, "iface");
>  		if (IS_ERR(msm_port->pclk))
>  			return PTR_ERR(msm_port->pclk);
> -
> -		clk_set_rate(msm_port->clk, 1843200);
>  	}
> 
>  	port->uartclk = clk_get_rate(msm_port->clk);

      parent reply	other threads:[~2016-04-20  6:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07  2:46 [PATCH v2] tty: msm_serial: remove static clk rate setting in probe Srinivas Kandagatla
2016-04-18 20:16 ` Andy Gross
2016-04-20  6:06 ` gpramod [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=1d51e468662254075fe2a8477f7addad@codeaurora.org \
    --to=gpramod@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel-owner@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=srinivas.kandagatla@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).