public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: rnayak@ti•com (Rajendra Nayak)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 1/2] ARM: omap: hwmod: Restore sysc after a reset
Date: Thu, 05 Apr 2012 12:41:26 +0530	[thread overview]
Message-ID: <4F7D459E.3090902@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1204040939300.8000@utopia.booyaka.com>

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<gadiyar@ti•com>
>> Signed-off-by: Rajendra Nayak<rnayak@ti•com>
>> Cc: Benoit Cousson<b-cousson@ti•com>
>> Cc: Paul Walmsley<paul@pwsan•com>
>> Cc: Shubhrajyoti D<shubhrajyoti@ti•com>
>
> 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<rnayak@ti•com>
> 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<gadiyar@ti•com>
> Signed-off-by: Rajendra Nayak<rnayak@ti•com>
> Cc: Benoit Cousson<b-cousson@ti•com>
> Cc: Paul Walmsley<paul@pwsan•com>
> Cc: Shubhrajyoti D<shubhrajyoti@ti•com>
> [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<paul@pwsan•com>
> ---
>   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;

  reply	other threads:[~2012-04-05  7:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 13:55 [PATCH 0/2] Fixes in hwmod reset code Rajendra Nayak
2012-03-13 13:55 ` [PATCH 1/2] ARM: omap: hwmod: Restore sysc after a reset Rajendra Nayak
2012-04-04 15:41   ` Paul Walmsley
2012-04-05  7:11     ` Rajendra Nayak [this message]
2012-03-13 13:55 ` [PATCH 2/2] ARM: omap: hwmod: Make omap_hwmod_softreset wait for reset status Rajendra Nayak
2012-03-13 13:59   ` Rajendra Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F7D459E.3090902@ti.com \
    --to=rnayak@ti$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox