Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752021AbbEZIhY (ORCPT ); Tue, 26 May 2015 04:37:24 -0400 Received: from [210.61.82.183] ([210.61.82.183]:56217 "EHLO mailgw01.mediatek.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751184AbbEZIhV (ORCPT ); Tue, 26 May 2015 04:37:21 -0400 X-Listener-Flag: 11101 Message-ID: <1432629363.15597.5.camel@mtksdaap41> Subject: Re: [PATCH 2/5] clk: mediatek: mt8173: Fix enabling of critical clocks From: James Liao To: Sascha Hauer CC: Matthias Brugger , Mike Turquette , Stephen Boyd , , Eddie Huang , "Henry Chen" , Yingjoe Chen , Daniel Kurtz , Ricky Liang , Rob Herring , Sascha Hauer , , , , Date: Tue, 26 May 2015 16:36:03 +0800 In-Reply-To: <20150526074608.GE6325@pengutronix.de> References: <1432192376-6712-1-git-send-email-jamesjj.liao@mediatek.com> <1432192376-6712-3-git-send-email-jamesjj.liao@mediatek.com> <20150526074608.GE6325@pengutronix.de> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1174 Lines: 31 On Tue, 2015-05-26 at 09:46 +0200, Sascha Hauer wrote: > > +static struct clk_onecell_data *mt8173_top_clk_data; > > +static struct clk_onecell_data *mt8173_pll_clk_data; > > + > > +static void mtk_clk_enable_critical(void) > > +{ > > + if (!mt8173_top_clk_data || !mt8173_pll_clk_data) > > + return; > > + > > + clk_prepare_enable(mt8173_top_clk_data->clks[CLK_TOP_MEM_SEL]); > > + clk_prepare_enable(mt8173_top_clk_data->clks[CLK_TOP_DDRPHYCFG_SEL]); > > + clk_prepare_enable(mt8173_top_clk_data->clks[CLK_TOP_CCI400_SEL]); > > + clk_prepare_enable(mt8173_top_clk_data->clks[CLK_TOP_RTC_SEL]); > > Is CLK_TOP_RTC_SEL really a critical clock? CLK_TOP_RTC_SEL is the main 32k clock used by some system hardware such sleep controller on MT8173. This clock should not be turned off even when software/CPU is sleeping. So it's a better way to set CLK_TOP_RTC_SEL as a critical clock (an always on clock). Best regards, James -- 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/