From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rajendra Nayak Subject: Re: [PATCH 1/2] ARM: omap: hwmod: Restore sysc after a reset Date: Thu, 05 Apr 2012 12:41:26 +0530 Message-ID: <4F7D459E.3090902@ti.com> References: <1331646928-31119-1-git-send-email-rnayak@ti.com> <1331646928-31119-2-git-send-email-rnayak@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from na3sys009aog118.obsmtp.com ([74.125.149.244]:59116 "EHLO na3sys009aog118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167Ab2DEHLf (ORCPT ); Thu, 5 Apr 2012 03:11:35 -0400 Received: by obbwc18 with SMTP id wc18so2352884obb.27 for ; Thu, 05 Apr 2012 00:11:33 -0700 (PDT) In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Paul Walmsley Cc: b-cousson@ti.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Shubhrajyoti D On Wednesday 04 April 2012 09:11 PM, Paul Walmsley wrote: > On Tue, 13 Mar 2012, Rajendra Nayak wrote: > >> After a softreset, make sure the sysc settings are correctly >> restored. >> >> Reported-by: Anand Gadiyar >> Signed-off-by: Rajendra Nayak >> Cc: Benoit Cousson >> Cc: Paul Walmsley >> Cc: Shubhrajyoti D > > Thanks, this patch has been modified a bit to consolidate the SYSCONFIG > reload after _reset() into the _reset() function itself. This should > hopefully avoid future mistakes and avoid some code duplication. Modified > patch follows, queued for 3.4-rc. Thanks, changes look good. > > > - Paul > > > From: Rajendra Nayak > Date: Tue, 13 Mar 2012 22:55:23 +0530 > Subject: [PATCH] ARM: OMAP2+: hwmod: Restore sysc after a reset > > After a softreset, make sure the sysc settings are correctly > restored. > > Reported-by: Anand Gadiyar > Signed-off-by: Rajendra Nayak > Cc: Benoit Cousson > Cc: Paul Walmsley > Cc: Shubhrajyoti D > [paul@pwsan.com: combined post-reset SYSCONFIG reload code into the > _reset() function to avoid duplication and future mistakes] > Signed-off-by: Paul Walmsley > --- > arch/arm/mach-omap2/omap_hwmod.c | 18 ++++++------------ > 1 file changed, 6 insertions(+), 12 deletions(-) > > diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c > index 5a68010..d32c1ce 100644 > --- a/arch/arm/mach-omap2/omap_hwmod.c > +++ b/arch/arm/mach-omap2/omap_hwmod.c > @@ -1477,6 +1477,11 @@ static int _reset(struct omap_hwmod *oh) > > ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh); > > + if (oh->class->sysc) { > + _update_sysc_cache(oh); > + _enable_sysc(oh); > + } > + > return ret; > } > > @@ -1786,20 +1791,9 @@ static int _setup(struct omap_hwmod *oh, void *data) > return 0; > } > > - if (!(oh->flags& HWMOD_INIT_NO_RESET)) { > + if (!(oh->flags& HWMOD_INIT_NO_RESET)) > _reset(oh); > > - /* > - * OCP_SYSCONFIG bits need to be reprogrammed after a softreset. > - * The _enable() function should be split to > - * avoid the rewrite of the OCP_SYSCONFIG register. > - */ > - if (oh->class->sysc) { > - _update_sysc_cache(oh); > - _enable_sysc(oh); > - } > - } > - > postsetup_state = oh->_postsetup_state; > if (postsetup_state == _HWMOD_STATE_UNKNOWN) > postsetup_state = _HWMOD_STATE_ENABLED; From mboxrd@z Thu Jan 1 00:00:00 1970 From: rnayak@ti.com (Rajendra Nayak) Date: Thu, 05 Apr 2012 12:41:26 +0530 Subject: [PATCH 1/2] ARM: omap: hwmod: Restore sysc after a reset In-Reply-To: References: <1331646928-31119-1-git-send-email-rnayak@ti.com> <1331646928-31119-2-git-send-email-rnayak@ti.com> Message-ID: <4F7D459E.3090902@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wednesday 04 April 2012 09:11 PM, Paul Walmsley wrote: > On Tue, 13 Mar 2012, Rajendra Nayak wrote: > >> After a softreset, make sure the sysc settings are correctly >> restored. >> >> Reported-by: Anand Gadiyar >> Signed-off-by: Rajendra Nayak >> Cc: Benoit Cousson >> Cc: Paul Walmsley >> Cc: Shubhrajyoti D > > Thanks, this patch has been modified a bit to consolidate the SYSCONFIG > reload after _reset() into the _reset() function itself. This should > hopefully avoid future mistakes and avoid some code duplication. Modified > patch follows, queued for 3.4-rc. Thanks, changes look good. > > > - Paul > > > From: Rajendra Nayak > Date: Tue, 13 Mar 2012 22:55:23 +0530 > Subject: [PATCH] ARM: OMAP2+: hwmod: Restore sysc after a reset > > After a softreset, make sure the sysc settings are correctly > restored. > > Reported-by: Anand Gadiyar > Signed-off-by: Rajendra Nayak > Cc: Benoit Cousson > Cc: Paul Walmsley > Cc: Shubhrajyoti D > [paul at pwsan.com: combined post-reset SYSCONFIG reload code into the > _reset() function to avoid duplication and future mistakes] > Signed-off-by: Paul Walmsley > --- > arch/arm/mach-omap2/omap_hwmod.c | 18 ++++++------------ > 1 file changed, 6 insertions(+), 12 deletions(-) > > diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c > index 5a68010..d32c1ce 100644 > --- a/arch/arm/mach-omap2/omap_hwmod.c > +++ b/arch/arm/mach-omap2/omap_hwmod.c > @@ -1477,6 +1477,11 @@ static int _reset(struct omap_hwmod *oh) > > ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh); > > + if (oh->class->sysc) { > + _update_sysc_cache(oh); > + _enable_sysc(oh); > + } > + > return ret; > } > > @@ -1786,20 +1791,9 @@ static int _setup(struct omap_hwmod *oh, void *data) > return 0; > } > > - if (!(oh->flags& HWMOD_INIT_NO_RESET)) { > + if (!(oh->flags& HWMOD_INIT_NO_RESET)) > _reset(oh); > > - /* > - * OCP_SYSCONFIG bits need to be reprogrammed after a softreset. > - * The _enable() function should be split to > - * avoid the rewrite of the OCP_SYSCONFIG register. > - */ > - if (oh->class->sysc) { > - _update_sysc_cache(oh); > - _enable_sysc(oh); > - } > - } > - > postsetup_state = oh->_postsetup_state; > if (postsetup_state == _HWMOD_STATE_UNKNOWN) > postsetup_state = _HWMOD_STATE_ENABLED;