From patchwork Mon Mar 7 02:46:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 63632 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1212527lbc; Sun, 6 Mar 2016 18:47:30 -0800 (PST) X-Received: by 10.98.11.70 with SMTP id t67mr5029569pfi.109.1457318850353; Sun, 06 Mar 2016 18:47:30 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gs5si25343187pac.173.2016.03.06.18.47.30; Sun, 06 Mar 2016 18:47:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbcCGCr2 (ORCPT + 7 others); Sun, 6 Mar 2016 21:47:28 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:35862 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751785AbcCGCr1 (ORCPT ); Sun, 6 Mar 2016 21:47:27 -0500 Received: by mail-pa0-f43.google.com with SMTP id tt10so7714595pab.3 for ; Sun, 06 Mar 2016 18:47:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t0MFraUY2zFj6Lc0jZfl19RHidaagqMvxb4lkeh5n5A=; b=bVZK+HsuaXaJ2Yws4/ZeBya8SVjzbRLSmbOVa5qH0OhjIXK3gncDWs4HaoVzWosJ/J 94TtvbE9mUZ7l3+lVKdQgiNxnsO4eGWEEQF3bvEy3Zhgo3IiJELiU8Vnqp251c+8Sg6e RJxhdmxC15pUG5Y5nidTV+s0uRojxP0YotwRA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t0MFraUY2zFj6Lc0jZfl19RHidaagqMvxb4lkeh5n5A=; b=fiQgdEGcsVk4IvI/7Et5BQUOIfhumRlq6VBHpVG4CipYwIU176P7oMv7ceaRu1Y360 csnXAj4wB5fq1Tg6FRszCpmhxzguHWrp8gwbq57MAo1PD6Z2mp6eTG3ouAhyn6LU78G+ +CGHg3Yr+QZVv7z28RuwtuHxOnqFpQiczU1PBfE+ash++kj5Mr7d1FEG+NEGBqw9r07E 65ziqtE5Muht9aLRZaobtOOProwLmIepdOMvWLPZ13KQXU459q61+JnL4GoGbk9JFSNG 4YUFquLImF7Pod+tot0lVqpeOhGLV5JgHxNOY3tOVlDrZ7G2ScjlyDppsQ6YW+VGCxNP IDRg== X-Gm-Message-State: AD7BkJKnHDvBoblIYQ8xaGinhuqT6LaZ5VklG1qkd5PT+8hYQd0pXamrbWyoFcuwkhXPVPMV X-Received: by 10.66.248.168 with SMTP id yn8mr29900099pac.24.1457318846888; Sun, 06 Mar 2016 18:47:26 -0800 (PST) Received: from localhost.localdomain (110-170-137-3.static.asianet.co.th. [110.170.137.3]) by smtp.gmail.com with ESMTPSA id s197sm20247710pfs.62.2016.03.06.18.46.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Mar 2016 18:47:26 -0800 (PST) From: Srinivas Kandagatla To: Greg Kroah-Hartman , linux-serial@vger.kernel.org Cc: Andy Gross , David Brown , Jiri Slaby , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH v2] tty: msm_serial: remove static clk rate setting in probe Date: Mon, 7 Mar 2016 02:46:40 +0000 Message-Id: <1457318800-26090-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 Signed-off-by: Srinivas Kandagatla --- 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(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Andy Gross 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);