Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: gururaja.hebbar@ti.com (Hebbar Gururaja)
To: linux-arm-kernel@lists.infradead.org
Subject: [Patch v2 2/2] ARM: OMAP2: am33xx-hwmod: Fix "register offset NULL check" bug
Date: Thu, 31 Jan 2013 19:55:27 +0530	[thread overview]
Message-ID: <1359642327-5542-3-git-send-email-gururaja.hebbar@ti.com> (raw)
In-Reply-To: <1359642327-5542-1-git-send-email-gururaja.hebbar@ti.com>

am33xx_cm_wait_module_ready() checks if register offset is NULL.

int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
{
	int i = 0;

	if (!clkctrl_offs)
		return 0;

In case of AM33xx, CLKCTRL register offset for different clock domains
are not uniformly placed. An example of this would be the RTC clock
domain with CLKCTRL offset at 0x00.
In such cases the module ready check is skipped which leads to a data
abort during boot-up when RTC registers is accessed.

Remove this check here to avoid checking module readiness for modules
with clkctrl register offset at 0x00.

Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
---
Change in v2:
	- No change

:100644 100644 058ce3c... 325a515... M	arch/arm/mach-omap2/cm33xx.c
 arch/arm/mach-omap2/cm33xx.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index 058ce3c..325a515 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -241,9 +241,6 @@ int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
 {
 	int i = 0;
 
-	if (!clkctrl_offs)
-		return 0;
-
 	omap_test_timeout(_is_module_ready(inst, cdoffs, clkctrl_offs),
 			  MAX_MODULE_READY_TIME, i);
 
-- 
1.7.9.5

  parent reply	other threads:[~2013-01-31 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31 14:25 [Patch v2 0/2] ARM: OMAP2+: AM33xx: fix hwmod & Clock Control Module Hebbar Gururaja
2013-01-31 14:25 ` [Patch v2 1/2] ARM: OMAP2+: AM33xx: hwmod: add missing HWMOD_NO_IDLEST flags Hebbar Gururaja
2013-01-31 15:28   ` Paul Walmsley
2013-02-01  5:05     ` Hebbar, Gururaja
2013-01-31 14:25 ` Hebbar Gururaja [this message]
2013-01-31 15:30   ` [Patch v2 2/2] ARM: OMAP2: am33xx-hwmod: Fix "register offset NULL check" bug Paul Walmsley
2013-02-01  5:05     ` Hebbar, Gururaja

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=1359642327-5542-3-git-send-email-gururaja.hebbar@ti.com \
    --to=gururaja.hebbar@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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