Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752548AbbGNHee (ORCPT ); Tue, 14 Jul 2015 03:34:34 -0400 Received: from mail-yk0-f176.google.com ([209.85.160.176]:33269 "EHLO mail-yk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751904AbbGNHec (ORCPT ); Tue, 14 Jul 2015 03:34:32 -0400 MIME-Version: 1.0 In-Reply-To: <1436779969-18610-5-git-send-email-yingjoe.chen@mediatek.com> References: <1436779969-18610-1-git-send-email-yingjoe.chen@mediatek.com> <1436779969-18610-5-git-send-email-yingjoe.chen@mediatek.com> From: Daniel Kurtz Date: Tue, 14 Jul 2015 15:34:10 +0800 X-Google-Sender-Auth: 5OIs0aPESE9KgW8RjFXqQjjCQiA Message-ID: Subject: Re: [PATCH 4/5] clk: mediatek: add 13mhz clock for MT8173 To: Yingjoe Chen Cc: Matthias Brugger , Thomas Gleixner , Stephen Boyd , Michael Turquette , James Liao , Russell King , "open list:OPEN FIRMWARE AND..." , Arnd Bergmann , Catalin Marinas , Daniel Lezcano , "linux-kernel@vger.kernel.org" , Rob Herring , linux-mediatek@lists.infradead.org, Sascha Hauer , Olof Johansson , srv_heupstream , "linux-arm-kernel@lists.infradead.org" , linux-clk@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2356 Lines: 59 On Mon, Jul 13, 2015 at 5:32 PM, Yingjoe Chen wrote: > Add 13mhz clock used by GPT timer in infracfg. > > Signed-off-by: Yingjoe Chen > --- > drivers/clk/mediatek/clk-mt8173.c | 5 +++++ > include/dt-bindings/clock/mt8173-clk.h | 3 ++- > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c > index 4b9e04c..540c5c3 100644 > --- a/drivers/clk/mediatek/clk-mt8173.c > +++ b/drivers/clk/mediatek/clk-mt8173.c > @@ -618,6 +618,10 @@ static const struct mtk_gate infra_clks[] __initconst = { > GATE_ICG(CLK_INFRA_PMICWRAP, "infra_pmicwrap", "axi_sel", 23), > }; > > +static const struct mtk_fixed_factor infra_divs[] __initconst = { > + FACTOR(CLK_INFRA_CLK_13M, "clk13m", "clk26m", 1, 2), > +}; > + > static const struct mtk_gate_regs peri0_cg_regs = { > .set_ofs = 0x0008, > .clr_ofs = 0x0010, > @@ -737,6 +741,7 @@ static void __init mtk_infrasys_init(struct device_node *node) > > mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks), > clk_data); > + mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data); > > r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); > if (r) > diff --git a/include/dt-bindings/clock/mt8173-clk.h b/include/dt-bindings/clock/mt8173-clk.h > index 4ad76ed..fa2a2bb 100644 > --- a/include/dt-bindings/clock/mt8173-clk.h > +++ b/include/dt-bindings/clock/mt8173-clk.h > @@ -187,7 +187,8 @@ > #define CLK_INFRA_CEC 9 > #define CLK_INFRA_PMICSPI 10 > #define CLK_INFRA_PMICWRAP 11 > -#define CLK_INFRA_NR_CLK 12 > +#define CLK_INFRA_CLK_13M 12 > +#define CLK_INFRA_NR_CLK 13 Note: this one conflicts slightly with pi-cheng's patch that adds CPU mux clocks for cpufreq driver, since they both add more INFRA clocks: https://patchwork.kernel.org/patch/6721511/ > > /* PERI_SYS */ > > -- > 1.8.1.1.dirty > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/