linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] OMAP3: Fix a cpu type check problem
Date: Fri, 13 Aug 2010 11:01:56 +0300	[thread overview]
Message-ID: <20100813080156.18750.74200.stgit@baageli.muru.com> (raw)
In-Reply-To: <20100813080034.18750.15410.stgit@baageli.muru.com>

From: stanley.miao <stanley.miao@windriver.com>

cpu_is_omap3517() and cpu_is_omap3505() are the subgroups of cpu_is_omap34xx(),
so we should check cpu_is_omap3517() and cpu_is_omap3505() first, then check
cpu_is_omap34xx().

Otherwise, All AM35XX (Sitara) clocks do not get registered and device drivers
(ti_hecc, etc...) that depend on those clocks are failing to get the clock and
end up with non working device.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/clock3xxx_data.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 138646d..dfdce2d 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3417,7 +3417,13 @@ int __init omap3xxx_clk_init(void)
 	struct omap_clk *c;
 	u32 cpu_clkflg = CK_3XXX;
 
-	if (cpu_is_omap34xx()) {
+	if (cpu_is_omap3517()) {
+		cpu_mask = RATE_IN_3XXX | RATE_IN_3430ES2PLUS;
+		cpu_clkflg |= CK_3517;
+	} else if (cpu_is_omap3505()) {
+		cpu_mask = RATE_IN_3XXX | RATE_IN_3430ES2PLUS;
+		cpu_clkflg |= CK_3505;
+	} else if (cpu_is_omap34xx()) {
 		cpu_mask = RATE_IN_3XXX;
 		cpu_clkflg |= CK_343X;
 
@@ -3432,12 +3438,6 @@ int __init omap3xxx_clk_init(void)
 			cpu_mask |= RATE_IN_3430ES2PLUS;
 			cpu_clkflg |= CK_3430ES2;
 		}
-	} else if (cpu_is_omap3517()) {
-		cpu_mask = RATE_IN_3XXX | RATE_IN_3430ES2PLUS;
-		cpu_clkflg |= CK_3517;
-	} else if (cpu_is_omap3505()) {
-		cpu_mask = RATE_IN_3XXX | RATE_IN_3430ES2PLUS;
-		cpu_clkflg |= CK_3505;
 	}
 
 	if (omap3_has_192mhz_clk())

  parent reply	other threads:[~2010-08-13  8:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13  8:01 [PATCH 0/6] omap fixes for upcoming 2.6.36-rc1 Tony Lindgren
2010-08-13  8:01 ` [PATCH 1/6] omap3: id: fix 3630 rev detection Tony Lindgren
2010-08-13  8:01 ` Tony Lindgren [this message]
2010-08-13  8:02 ` [PATCH 3/6] OMAP3: PM: ensure IO wakeups are properly disabled Tony Lindgren
2010-08-13  9:53   ` Sergei Shtylyov
2010-08-13 10:29     ` Tony Lindgren
2010-08-13 10:50       ` Sergei Shtylyov
2010-08-19 18:14         ` Kevin Hilman
2010-08-19 18:34           ` Sergei Shtylyov
2010-08-20  6:56             ` Tony Lindgren
2010-08-20 16:43               ` Kevin Hilman
2010-08-13  8:02 ` [PATCH 4/6] omap: Fix sev instruction usage for multi-omap Tony Lindgren
2010-08-13  9:04   ` Shilimkar, Santosh
2010-08-13  8:02 ` [PATCH 5/6] omap: Use CONFIG_SMP for test_for_ipi and test_for_ltirq Tony Lindgren
2010-08-13  9:04   ` Shilimkar, Santosh
2010-08-13  8:02 ` [PATCH 6/6] omap: Fix omap_4430sdp_defconfig for make oldconfig Tony Lindgren
2010-08-13  9:04   ` Shilimkar, Santosh

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=20100813080156.18750.74200.stgit@baageli.muru.com \
    --to=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).