From patchwork Wed Jun 29 08:45:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 9204469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2706C607D8 for ; Wed, 29 Jun 2016 08:48:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1360128621 for ; Wed, 29 Jun 2016 08:48:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 079EB28645; Wed, 29 Jun 2016 08:48:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B365928621 for ; Wed, 29 Jun 2016 08:48:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIB8q-000479-Tt; Wed, 29 Jun 2016 08:46:40 +0000 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bIB8h-00044c-NX for linux-arm-kernel@lists.infradead.org; Wed, 29 Jun 2016 08:46:32 +0000 Received: by mail-pa0-x229.google.com with SMTP id hl6so15432957pac.2 for ; Wed, 29 Jun 2016 01:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UKTxLiTlkJj/N8zJfC/WyfaogpqJJ2bJcGOR33wJ0lY=; b=fxm2mnwlVrcKL/cn9/LfbzFJ7DriRRfvSwLJMFvnQNVYoqh3bE8z3aQPaWNfYzwm3Z bi/n8XPavZnXIfUweqsgj3tF1/NGWNkE1jRQbMng4uzDIYKYIA1btSr4efa87n7XDGE1 XnFgMUAlNDJhQ49dPMTXe9ibNplFzb3BeXndQ= 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:in-reply-to :references; bh=UKTxLiTlkJj/N8zJfC/WyfaogpqJJ2bJcGOR33wJ0lY=; b=jF3JoZlpYhl/iw+jClgDtA3hStsNxBCqqb6X8jeBNOnx+U9dWYkuvn9hgzySh3/9Ev 6jFhJk3QxbAig8M0SmzJtZYMiwq0M9w65sabJQckKwWLdYU3d43lvnbsHGOYz1awt4E1 IDA2dnJgdLHSH63y/T1ZiHqYNjm0+G68ZjWXDsp4RlDT9ajvAcrOFfGy9gV80kT6Ucq3 DhtNqaV1iM93gg0iKDgD6T7ML4U2+dnZ7TX0l6OHIlWTBXXTh936oHPAyxyH81RCojtZ 00motZIlzCjJ4URbb0DBuNkyMHFyxhDLKw+ldyXpRyL0vGnC376xFCUwyZ+WQMxMgOsh egCQ== X-Gm-Message-State: ALyK8tLznotHwywIHJDjzVDNIeu1QQ6EGZjYFVspFJUqIgHbZWsyQGl1Gj86iY8o5FkRPfaF X-Received: by 10.66.25.8 with SMTP id y8mr9628804paf.106.1467189970842; Wed, 29 Jun 2016 01:46:10 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.159]) by smtp.gmail.com with ESMTPSA id z88sm3857749pfa.59.2016.06.29.01.46.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Jun 2016 01:46:10 -0700 (PDT) From: Guodong Xu To: mturquette@baylibre.com, sboyd@codeaurora.org, jorge.ramirez-ortiz@linaro.org, xinliang.liu@linaro.org, guodong.xu@linaro.org, john.stultz@linaro.org Subject: [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz Date: Wed, 29 Jun 2016 16:45:55 +0800 Message-Id: <1467189955-21694-2-git-send-email-guodong.xu@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467189955-21694-1-git-send-email-guodong.xu@linaro.org> References: <1467189955-21694-1-git-send-email-guodong.xu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160629_014631_901376_3ACB31E2 X-CRM114-Status: GOOD ( 11.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jorge Ramirez-Ortiz Early at boot, during the sys_clk initialization, make sure UART1 uses the higher frequency clock, 150MHz. This enables support for higher baud rates (up to 3Mbps) in UART1, which is required by faster bluetooth transfers. v2: use clk_set_rate() to propergate clock settings. Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Guodong Xu --- drivers/clk/hisilicon/clk-hi6220.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/hisilicon/clk-hi6220.c b/drivers/clk/hisilicon/clk-hi6220.c index a36ffcb..631c56f 100644 --- a/drivers/clk/hisilicon/clk-hi6220.c +++ b/drivers/clk/hisilicon/clk-hi6220.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -192,6 +193,9 @@ static void __init hi6220_clk_sys_init(struct device_node *np) hi6220_clk_register_divider(hi6220_div_clks_sys, ARRAY_SIZE(hi6220_div_clks_sys), clk_data); + + if (clk_set_rate(clk_data->clk_data.clks[HI6220_UART1_SRC], 150000000)) + pr_err("failed to set uart1 clock rate\n"); } CLK_OF_DECLARE(hi6220_clk_sys, "hisilicon,hi6220-sysctrl", hi6220_clk_sys_init);