Received: by 10.223.164.221 with SMTP id h29csp145334wrb; Wed, 4 Oct 2017 20:55:43 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAaYV+YgEGRTsoKWUjwSqRa+LhfZ+kHFwdt75BuHFoNc+7KAnn7Mm9Ymswp3VR02KOFOPkP X-Received: by 10.84.212.144 with SMTP id e16mr16616228pli.205.1507175743392; Wed, 04 Oct 2017 20:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507175743; cv=none; d=google.com; s=arc-20160816; b=Zy+gY1NtF7H/ZlsVlFQZTJw+PYiHTxxCn9JRlXKHk1kXvkymErhPwBT7I7DeoAZysY bJp4KwgbTnJWBQWb1IUBUoz/uQX/INlJYg22PSOCha9CzX2yv1KuN5dNzm9fJEXvozwn FybYWVLjtxUKmjXK6in6Tl/8zfCBIqc5rLcHSJzD2SWc66ZgEpDHf59+NFnO8YFAk00q Cn+LMlYrdbNN4G78PQUcTO/2CNr1WJos+MkgMdV68NAyxKJfg+CLhUy3JrDG04A0Bj99 4UkjqI9+6P5h1q9j8ymic9iYqS2ZvXnYcK7inpMdTkRSeLcfsp+OTD4GRnUWvko94Hsl EzKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=tpl37/WuaCoxHmexUGC9Y+O7niVpRuDOBYsKO+9IhLM=; b=QMKKtmMt3vyclDqXVe0j+6H9wwtEdlVAlKjPNDVU3yWZmLTqPyQH2xAJ+S3sqQXOj3 ukc31CjWIVaXcMgGQd1PkXhOv7kG9aGFnxJggopIMxdOkyp1tMmccuBB3sbBcW1fFH0S e6nwxKzdkYqW7Je+X7VjyTSxMiBbtPv3WAVSdYz4x3KUKa23hWpIJLQCeM1jz9VzU+Pp JAxNJywVhJqMpYf8pLVzhMZZEFiQsn9IeNrQBt22C9xS4MAAZToB5x03Nt8Ti0KfP2/O ay3N/QdRC4uq6acSlm2X26Lz7b5iJaiITosLAIHe6S5sKXPeoQiSWSY/nD7skIITnIpQ sRgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc11si13043188plb.610.2017.10.04.20.55.29; Wed, 04 Oct 2017 20:55:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751418AbdJEDui (ORCPT + 99 others); Wed, 4 Oct 2017 23:50:38 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:30086 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751260AbdJEDue (ORCPT ); Wed, 4 Oct 2017 23:50:34 -0400 X-UUID: 21234fde3b9745f3a7e8ab8bc6fe3b90-20171005 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1329821824; Thu, 05 Oct 2017 11:50:31 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 5 Oct 2017 11:50:15 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Thu, 5 Oct 2017 11:49:57 +0800 From: To: , , , , , CC: , , , , , Chen Zhong , Sean Wang Subject: [PATCH v2 2/4] clk: mediatek: add the option for determining PLL source clock Date: Thu, 5 Oct 2017 11:50:23 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen Zhong Since the previous setup always sets the PLL using crystal 26MHz, this doesn't always happen in every MediaTek platform. So the patch added flexibility for assigning extra member for determining the PLL source clock. Signed-off-by: Chen Zhong Signed-off-by: Sean Wang --- drivers/clk/mediatek/clk-mtk.h | 1 + drivers/clk/mediatek/clk-pll.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h index f5d6b70..210ce8e8 100644 --- a/drivers/clk/mediatek/clk-mtk.h +++ b/drivers/clk/mediatek/clk-mtk.h @@ -216,6 +216,7 @@ struct mtk_pll_data { uint32_t pcw_reg; int pcw_shift; const struct mtk_pll_div_table *div_table; + const char *parent_name; }; void mtk_clk_register_plls(struct device_node *node, diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c index a409142..7598477 100644 --- a/drivers/clk/mediatek/clk-pll.c +++ b/drivers/clk/mediatek/clk-pll.c @@ -303,7 +303,10 @@ static struct clk *mtk_clk_register_pll(const struct mtk_pll_data *data, init.name = data->name; init.flags = (data->flags & PLL_AO) ? CLK_IS_CRITICAL : 0; init.ops = &mtk_pll_ops; - init.parent_names = &parent_name; + if (data->parent_name) + init.parent_names = &data->parent_name; + else + init.parent_names = &parent_name; init.num_parents = 1; clk = clk_register(NULL, &pll->hw); -- 2.7.4 From 1584377624508383350@xxx Sat Nov 18 04:44:07 +0000 2017 X-GM-THRID: 1584377624508383350 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread