From patchwork Mon Jul 11 10:50:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 9223261 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 F17C460760 for ; Mon, 11 Jul 2016 10:51:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E332A277D9 for ; Mon, 11 Jul 2016 10:51:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7C6D27C38; Mon, 11 Jul 2016 10:51:55 +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 8AD9F277D9 for ; Mon, 11 Jul 2016 10:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758576AbcGKKvK (ORCPT ); Mon, 11 Jul 2016 06:51:10 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40716 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758575AbcGKKvH (ORCPT ); Mon, 11 Jul 2016 06:51:07 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B244F6120C; Mon, 11 Jul 2016 10:51:06 +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 BD612600D8; Mon, 11 Jul 2016 10:51:03 +0000 (UTC) From: Rajendra Nayak To: sboyd@codeaurora.org, stephen.boyd@linaro.org, mturquette@baylibre.com Cc: linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Rajendra Nayak Subject: [PATCH 5/6] clk: qcom: Add support for PLLs with early output Date: Mon, 11 Jul 2016 16:20:38 +0530 Message-Id: <1468234239-28693-6-git-send-email-rnayak@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1468234239-28693-1-git-send-email-rnayak@codeaurora.org> References: <1468234239-28693-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,