From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936591AbcJXIue (ORCPT ); Mon, 24 Oct 2016 04:50:34 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:33792 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934737AbcJXIub (ORCPT ); Mon, 24 Oct 2016 04:50:31 -0400 Date: Mon, 24 Oct 2016 09:53:04 +0100 From: Lee Jones To: Peter Griffin Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, devicetree@vger.kernel.org Subject: Re: [PATCH] ARM: sti: stih410-clocks: Add PROC_STFE as a critical clock Message-ID: <20161024085304.GE14477@dell> References: <1476804957-24000-1-git-send-email-peter.griffin@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1476804957-24000-1-git-send-email-peter.griffin@linaro.org> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Oct 2016, Peter Griffin wrote: > Once the ST frontend demux HW IP has been enabled, the clock can't > be disabled otherwise the system will hang and the board will > be unserviceable. > > To allow balanced clock enable/disable calls in the driver we use > the critical clock infrastructure to take an extra reference on the > clock so the clock will never actually be disabled. This is an abuse of the critical-clocks framework, and is exactly the type of hack I promised the clk guys I'd try to prevent. If this, or any other IP has some quirks (i.e. once enabled, if this clock is subsequently disabled it will have a catastrophic effect on the platform), then they should be worked around in the driver. The correct thing to do here is craft a clk-keep-on flag and ensure it is set to true for the effected platform(s)' platform data. > Signed-off-by: Peter Griffin > --- > arch/arm/boot/dts/stih410-clock.dtsi | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/boot/dts/stih410-clock.dtsi b/arch/arm/boot/dts/stih410-clock.dtsi > index 8598eff..07c8ef9 100644 > --- a/arch/arm/boot/dts/stih410-clock.dtsi > +++ b/arch/arm/boot/dts/stih410-clock.dtsi > @@ -208,7 +208,8 @@ > "clk-clust-hades", > "clk-hwpe-hades", > "clk-fc-hades"; > - clock-critical = , > + clock-critical = , > + , > , > , > , -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog