From patchwork Thu Aug 11 08:40:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 9274641 X-Patchwork-Delegate: sboyd@codeaurora.org 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 56BB760231 for ; Thu, 11 Aug 2016 08:43:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45A1827FE4 for ; Thu, 11 Aug 2016 08:43:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AB3128575; Thu, 11 Aug 2016 08:43:35 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3BF627FE4 for ; Thu, 11 Aug 2016 08:43:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932786AbcHKIme (ORCPT ); Thu, 11 Aug 2016 04:42:34 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57592 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932455AbcHKIm1 (ORCPT ); Thu, 11 Aug 2016 04:42:27 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 391BF61365; Thu, 11 Aug 2016 08:41:29 +0000 (UTC) Received: from blr-ubuntu-34.ap.qualcomm.com (unknown [202.46.23.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: rnayak@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6D55B612CF; Thu, 11 Aug 2016 08:41:26 +0000 (UTC) From: Rajendra Nayak To: sboyd@codeaurora.org, mturquette@baylibre.com Cc: linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, tdas@codeaurora.org, Rajendra Nayak Subject: [PATCH v2 05/10] clk: qcom: Add support for PLLs with early output Date: Thu, 11 Aug 2016 14:10:53 +0530 Message-Id: <1470904858-11930-6-git-send-email-rnayak@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1470904858-11930-1-git-send-email-rnayak@codeaurora.org> References: <1470904858-11930-1-git-send-email-rnayak@codeaurora.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some PLLs can have an additional early output (apart from the main and aux outputs). Add support for the PLL driver so it can be used to initialize/configure the early output Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/clk-pll.c | 2 ++ drivers/clk/qcom/clk-pll.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/clk/qcom/clk-pll.c b/drivers/clk/qcom/clk-pll.c index 08d2fa2..b463432 100644 --- a/drivers/clk/qcom/clk-pll.c +++ b/drivers/clk/qcom/clk-pll.c @@ -268,6 +268,7 @@ static void clk_pll_configure(struct clk_pll *pll, struct regmap *regmap, val |= config->mn_ena_mask; val |= config->main_output_mask; val |= config->aux_output_mask; + val |= config->early_output_mask; mask = config->vco_mask; mask |= config->pre_div_mask; @@ -275,6 +276,7 @@ static void clk_pll_configure(struct clk_pll *pll, struct regmap *regmap, mask |= config->mn_ena_mask; mask |= config->main_output_mask; mask |= config->aux_output_mask; + mask |= config->early_output_mask; regmap_update_bits(regmap, pll->config_reg, mask, val); } diff --git a/drivers/clk/qcom/clk-pll.h b/drivers/clk/qcom/clk-pll.h index 083727e..dbe22a9 100644 --- a/drivers/clk/qcom/clk-pll.h +++ b/drivers/clk/qcom/clk-pll.h @@ -81,6 +81,7 @@ struct pll_config { u32 mn_ena_mask; u32 main_output_mask; u32 aux_output_mask; + u32 early_output_mask; }; void clk_pll_configure_sr(struct clk_pll *pll, struct regmap *regmap,