All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tero Kristo <t-kristo@ti.com>
To: linux-omap@vger.kernel.org, tony@atomide.com, paul@pwsan.com
Cc: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] ARM: AM33xx: fix module_wait_ready without clkctrl register
Date: Thu, 30 Jun 2016 16:15:03 +0300	[thread overview]
Message-ID: <1467292503-4376-6-git-send-email-t-kristo@ti.com> (raw)
In-Reply-To: <1467292503-4376-1-git-send-email-t-kristo@ti.com>

If the module has no clkctrl register defined, module_wait_ready should
not try to access this. This can potentially cause an illegal register
access, and result in bad idle reporting also.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/cm33xx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index 7b181f9..c073fb5 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -220,6 +220,9 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
 {
 	int i = 0;
 
+	if (!clkctrl_offs)
+		return 0;
+
 	omap_test_timeout(_is_module_ready(inst, clkctrl_offs),
 			  MAX_MODULE_READY_TIME, i);
 
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] ARM: AM33xx: fix module_wait_ready without clkctrl register
Date: Thu, 30 Jun 2016 16:15:03 +0300	[thread overview]
Message-ID: <1467292503-4376-6-git-send-email-t-kristo@ti.com> (raw)
In-Reply-To: <1467292503-4376-1-git-send-email-t-kristo@ti.com>

If the module has no clkctrl register defined, module_wait_ready should
not try to access this. This can potentially cause an illegal register
access, and result in bad idle reporting also.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/cm33xx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index 7b181f9..c073fb5 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -220,6 +220,9 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
 {
 	int i = 0;
 
+	if (!clkctrl_offs)
+		return 0;
+
 	omap_test_timeout(_is_module_ready(inst, clkctrl_offs),
 			  MAX_MODULE_READY_TIME, i);
 
-- 
1.9.1

  parent reply	other threads:[~2016-06-30 13:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 13:14 [PATCH 0/5] ARM: OMAP2+: hwmod/clk related fixes Tero Kristo
2016-06-30 13:14 ` Tero Kristo
2016-06-30 13:14 ` [PATCH 1/5] ARM: OMAP2+: omap_device: create clock alias purely from DT data Tero Kristo
2016-06-30 13:14   ` Tero Kristo
2016-06-30 13:15 ` [PATCH 2/5] ARM: OMAP2+: hwmod: fetch main_clk based on hwmod name Tero Kristo
2016-06-30 13:15   ` Tero Kristo
2016-07-04  6:54   ` Tony Lindgren
2016-07-04  6:54     ` Tony Lindgren
2016-07-04  9:17     ` Tero Kristo
2016-07-04  9:17       ` Tero Kristo
2016-07-04 11:11     ` [PATCHv2 " Tero Kristo
2016-07-04 11:11       ` Tero Kristo
2016-07-04 14:32       ` Tony Lindgren
2016-07-04 14:32         ` Tony Lindgren
2016-06-30 13:15 ` [PATCH 3/5] ARM: OMAP2+: timer: change order of hwmod data handling Tero Kristo
2016-06-30 13:15   ` Tero Kristo
2016-06-30 13:15 ` [PATCH 4/5] ARM: OMAP2+: clockdomain: add usecounting support to autoidle APIs Tero Kristo
2016-06-30 13:15   ` Tero Kristo
2016-06-30 13:15 ` Tero Kristo [this message]
2016-06-30 13:15   ` [PATCH 5/5] ARM: AM33xx: fix module_wait_ready without clkctrl register Tero Kristo

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=1467292503-4376-6-git-send-email-t-kristo@ti.com \
    --to=t-kristo@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.