From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755414AbcJUMYY (ORCPT ); Fri, 21 Oct 2016 08:24:24 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:30190 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755300AbcJUMYS (ORCPT ); Fri, 21 Oct 2016 08:24:18 -0400 Subject: Re: [PATCH] [media] c8sectpfe: Remove clk_disable_unprepare hacks To: Peter Griffin , , , , References: <1477040132-31442-1-git-send-email-peter.griffin@linaro.org> CC: , From: Patrice Chotard Message-ID: <08965415-3573-c588-25c8-ae48fde9470f@st.com> Date: Fri, 21 Oct 2016 14:23:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1477040132-31442-1-git-send-email-peter.griffin@linaro.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.48.1.66] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-21_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/21/2016 10:55 AM, Peter Griffin wrote: > Now that CLK_PROC_STFE is defined as a critical clock in > DT, we can remove the commented clk_disable_unprepare from > the c8sectpfe driver. This means we now have balanced > clk*enable/disable calls in the driver, but on STiH407 > family the clock in reality will never actually be disabled. > > This is due to a HW bug where once the IP has been configured > and the SLIM core is running, disabling the clock causes a > unrecoverable bus lockup. > > Signed-off-by: Peter Griffin > --- > drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c > index 30c148b..79d793b 100644 > --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c > +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c > @@ -888,8 +888,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) > return 0; > > err_clk_disable: > - /* TODO uncomment when upstream has taken a reference on this clk */ > - /*clk_disable_unprepare(fei->c8sectpfeclk);*/ > + clk_disable_unprepare(fei->c8sectpfeclk); > return ret; > } > > @@ -924,11 +923,8 @@ static int c8sectpfe_remove(struct platform_device *pdev) > if (readl(fei->io + SYS_OTHER_CLKEN)) > writel(0, fei->io + SYS_OTHER_CLKEN); > > - /* TODO uncomment when upstream has taken a reference on this clk */ > - /* > if (fei->c8sectpfeclk) > clk_disable_unprepare(fei->c8sectpfeclk); > - */ > > return 0; > } > Acked-by: Patrice Chotard From mboxrd@z Thu Jan 1 00:00:00 1970 From: patrice.chotard@st.com (Patrice Chotard) Date: Fri, 21 Oct 2016 14:23:46 +0200 Subject: [PATCH] [media] c8sectpfe: Remove clk_disable_unprepare hacks In-Reply-To: <1477040132-31442-1-git-send-email-peter.griffin@linaro.org> References: <1477040132-31442-1-git-send-email-peter.griffin@linaro.org> Message-ID: <08965415-3573-c588-25c8-ae48fde9470f@st.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 10/21/2016 10:55 AM, Peter Griffin wrote: > Now that CLK_PROC_STFE is defined as a critical clock in > DT, we can remove the commented clk_disable_unprepare from > the c8sectpfe driver. This means we now have balanced > clk*enable/disable calls in the driver, but on STiH407 > family the clock in reality will never actually be disabled. > > This is due to a HW bug where once the IP has been configured > and the SLIM core is running, disabling the clock causes a > unrecoverable bus lockup. > > Signed-off-by: Peter Griffin > --- > drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c > index 30c148b..79d793b 100644 > --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c > +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c > @@ -888,8 +888,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) > return 0; > > err_clk_disable: > - /* TODO uncomment when upstream has taken a reference on this clk */ > - /*clk_disable_unprepare(fei->c8sectpfeclk);*/ > + clk_disable_unprepare(fei->c8sectpfeclk); > return ret; > } > > @@ -924,11 +923,8 @@ static int c8sectpfe_remove(struct platform_device *pdev) > if (readl(fei->io + SYS_OTHER_CLKEN)) > writel(0, fei->io + SYS_OTHER_CLKEN); > > - /* TODO uncomment when upstream has taken a reference on this clk */ > - /* > if (fei->c8sectpfeclk) > clk_disable_unprepare(fei->c8sectpfeclk); > - */ > > return 0; > } > Acked-by: Patrice Chotard