linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benoit Cousson <b-cousson@ti.com>
To: linux-omap@vger.kernel.org, khilman@deeprootsystems.com, paul@pwsan.com
Cc: rnayak@ti.com, santosh.shilimkar@ti.com,
	Benoit Cousson <b-cousson@ti.com>
Subject: [PATCH 3/3] OMAP: hwmod: Force a softreset during _setup
Date: Thu,  5 Aug 2010 00:12:48 +0200	[thread overview]
Message-ID: <1280959968-23933-4-git-send-email-b-cousson@ti.com> (raw)
In-Reply-To: <1280959968-23933-1-git-send-email-b-cousson@ti.com>

Force the softreset of every IPs during the _setup phase.
IPs that cannot support softreset or that should not
be reset must set the HWMOD_INIT_NO_RESET flag in the
hwmod struct.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-omap2/omap_hwmod.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 53b08e3..91ad9c6 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -856,8 +856,8 @@ static int _reset(struct omap_hwmod *oh)
 
 	/* clocks must be on for this operation */
 	if (oh->_state != _HWMOD_STATE_ENABLED) {
-		WARN(1, "omap_hwmod: %s: reset can only be entered from "
-		     "enabled state\n", oh->name);
+		pr_warning("omap_hwmod: %s: reset can only be entered from "
+			   "enabled state\n", oh->name);
 		return -EINVAL;
 	}
 
@@ -874,8 +874,8 @@ static int _reset(struct omap_hwmod *oh)
 			  MAX_MODULE_RESET_WAIT, c);
 
 	if (c == MAX_MODULE_RESET_WAIT)
-		WARN(1, "omap_hwmod: %s: failed to reset in %d usec\n",
-		     oh->name, MAX_MODULE_RESET_WAIT);
+		pr_warning("omap_hwmod: %s: failed to reset in %d usec\n",
+			   oh->name, MAX_MODULE_RESET_WAIT);
 	else
 		pr_debug("omap_hwmod: %s: reset in %d usec\n", oh->name, c);
 
@@ -1074,12 +1074,11 @@ static int _setup(struct omap_hwmod *oh, void *data)
 	}
 
 	if (!(oh->flags & HWMOD_INIT_NO_RESET)) {
+		_reset(oh);
 		/*
-		 * XXX Do the OCP_SYSCONFIG bits need to be
-		 * reprogrammed after a reset?  If not, then this can
-		 * be removed.  If they do, then probably the
-		 * _omap_hwmod_enable() function should be split to avoid the
-		 * rewrite of the OCP_SYSCONFIG register.
+		 * OCP_SYSCONFIG bits need to be reprogrammed after a softreset.
+		 * The _omap_hwmod_enable() function should be split to
+		 * avoid the rewrite of the OCP_SYSCONFIG register.
 		 */
 		if (oh->class->sysc) {
 			_update_sysc_cache(oh);
-- 
1.6.1.3


  parent reply	other threads:[~2010-08-04 22:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 22:12 [PATCH 0/3] OMAP: hwmod: Add hardreset and softreset management Benoit Cousson
2010-08-04 22:12 ` [PATCH 1/3] OMAP4: prcm: Add temporarily helper functions for rmw and read inside the PRM Benoit Cousson
2010-08-09 17:30   ` Kevin Hilman
2010-08-09 17:34     ` Cousson, Benoit
2010-08-10 16:16       ` Nayak, Rajendra
2010-08-04 22:12 ` [PATCH 2/3] OMAP: hwmod: Add hardreset management support Benoit Cousson
2010-08-04 22:12 ` Benoit Cousson [this message]
2010-08-17 12:46   ` [PATCH 3/3] OMAP: hwmod: Force a softreset during _setup Basak, Partha
2010-08-18 15:00     ` Cousson, Benoit
2010-08-19 11:57       ` Basak, Partha
2010-08-19 14:06         ` Cousson, Benoit
2010-08-23 13:57         ` Cousson, Benoit
2010-09-01 22:51           ` Paul Walmsley
2010-09-21  5:03 ` [PATCH 0/3] OMAP: hwmod: Add hardreset and softreset management Paul Walmsley
2010-09-21 16:04   ` Cousson, Benoit
2010-09-21 16:09     ` Paul Walmsley

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=1280959968-23933-4-git-send-email-b-cousson@ti.com \
    --to=b-cousson@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=santosh.shilimkar@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).