public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: "Cousson, Benoit" <b-cousson@ti.com>, Anand Gadiyar <gadiyar@ti.com>
Subject: RE: Linux-next as of 20110222 broken on OMAP4
Date: Tue, 22 Feb 2011 18:43:52 +0530	[thread overview]
Message-ID: <113477ac814f1e227f26f4963d7d624a@mail.gmail.com> (raw)
In-Reply-To: <4D63B160.3010103@ti.com>

[-- Attachment #1: Type: text/plain, Size: 3883 bytes --]

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Cousson, Benoit
> Sent: Tuesday, February 22, 2011 6:22 PM
> To: Gadiyar, Anand
> Cc: linux-omap
> Subject: Re: Linux-next as of 20110222 broken on OMAP4
>
> Hi Anand,
>
> On 2/22/2011 10:49 AM, Gadiyar, Anand wrote:
> > Looks like linux-next as of today is broken on at least OMAP4.
> >
> > Turning on earlyprintk, I get a crash in omap_init_mcspi.
> Disabling
> > CONFIG_SPI_OMAP24XX gets me as far as the following lines from my
> > bootup log, but I haven't attempted to debug further.
> >
> > If there are any patches out there to fix this, let me know.
> > Else I will debug this sometime tomorrow.
>
> Yes, it was discussed with Tony and temporarily fixed yesterday.
>
> The SPI fix is is already in omap-for-linus, and the timer1 temp fix
> is below.
> We need to find a better way to handle timer now that they are
> initialized pretty soon.
>
Here is an alternate patch as per discussion with Paul.

------
>From e0bb923cb6fdde0f3f39184647238d6d1c6f5bf2 Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Tue, 22 Feb 2011 16:46:29 +0530
Subject: [PATCH] omap: Move omap_hwmod_late_init() to mdesc->timer->init()
code

To adhere to recent early_init changes, commit '44dc0' made
omap_hwmod_late_init() to core_initcall to avoid ioremap() failures.

Later 'e7c7d7' removed _mpu_rt_va population omap_hwmod_late_init()

So now if we move the  omap_hwmod_late_init() to mdesc->timer->init(),
timer1 should work with hwmod instead of any special hwmod settings.

This was proposed by Paul Walmsley <paul@pwsan.com>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod.c             |    3 +--
 arch/arm/mach-omap2/timer-gp.c               |    4 +++-
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c
b/arch/arm/mach-omap2/omap_hwmod.c
index 9e89a58..b39cb40 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1646,7 +1646,7 @@ static int __init _populate_mpu_rt_base(struct
omap_hwmod *oh, void *data)
  * to struct clk pointers for each registered omap_hwmod.  Also calls
  * _setup() on each hwmod.  Returns 0.
  */
-static int __init omap_hwmod_late_init(void)
+int __init omap_hwmod_late_init(void)
 {
 	int r;

@@ -1664,7 +1664,6 @@ static int __init omap_hwmod_late_init(void)

 	return 0;
 }
-core_initcall(omap_hwmod_late_init);

 /**
  * omap_hwmod_enable - enable an omap_hwmod
diff --git a/arch/arm/mach-omap2/timer-gp.c
b/arch/arm/mach-omap2/timer-gp.c
index 7b7c268..319ca42 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -37,8 +37,9 @@
 #include <linux/clockchips.h>

 #include <asm/mach/time.h>
-#include <plat/dmtimer.h>
 #include <asm/localtimer.h>
+#include <plat/dmtimer.h>
+#include <plat/omap_hwmod.h>

 #include "timer-gp.h"

@@ -231,6 +232,7 @@ static void __init omap2_gp_clocksource_init(void)

 static void __init omap2_gp_timer_init(void)
 {
+	omap_hwmod_late_init();
 #ifdef CONFIG_LOCAL_TIMERS
 	if (cpu_is_omap44xx()) {
 		twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h
b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index fedd829..e2bdbb3 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -536,6 +536,7 @@ struct omap_hwmod {
 };

 int omap_hwmod_init(struct omap_hwmod **ohs);
+int omap_hwmod_late_init(void);
 struct omap_hwmod *omap_hwmod_lookup(const char *name);
 int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
 			void *data);
-- 
1.6.0.4

[-- Attachment #2: 0001-omap-Move-omap_hwmod_late_init-to-mdesc-timer-i.patch --]
[-- Type: application/octet-stream, Size: 2846 bytes --]

From e0bb923cb6fdde0f3f39184647238d6d1c6f5bf2 Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date: Tue, 22 Feb 2011 16:46:29 +0530
Subject: [PATCH] omap: Move omap_hwmod_late_init() to mdesc->timer->init() code

To adhere to recent early_init changes, commit '44dc0' made
omap_hwmod_late_init() to core_initcall to avoid ioremap() failures.

Later 'e7c7d7' removed _mpu_rt_va population omap_hwmod_late_init()

So now if we move the  omap_hwmod_late_init() to mdesc->timer->init(),
timer1 should work with hwmod instead of any special hwmod settings.

This was proposed by Paul Walmsley <paul@pwsan.com>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod.c             |    3 +--
 arch/arm/mach-omap2/timer-gp.c               |    4 +++-
 arch/arm/plat-omap/include/plat/omap_hwmod.h |    1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 9e89a58..b39cb40 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1646,7 +1646,7 @@ static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data)
  * to struct clk pointers for each registered omap_hwmod.  Also calls
  * _setup() on each hwmod.  Returns 0.
  */
-static int __init omap_hwmod_late_init(void)
+int __init omap_hwmod_late_init(void)
 {
 	int r;
 
@@ -1664,7 +1664,6 @@ static int __init omap_hwmod_late_init(void)
 
 	return 0;
 }
-core_initcall(omap_hwmod_late_init);
 
 /**
  * omap_hwmod_enable - enable an omap_hwmod
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 7b7c268..319ca42 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -37,8 +37,9 @@
 #include <linux/clockchips.h>
 
 #include <asm/mach/time.h>
-#include <plat/dmtimer.h>
 #include <asm/localtimer.h>
+#include <plat/dmtimer.h>
+#include <plat/omap_hwmod.h>
 
 #include "timer-gp.h"
 
@@ -231,6 +232,7 @@ static void __init omap2_gp_clocksource_init(void)
 
 static void __init omap2_gp_timer_init(void)
 {
+	omap_hwmod_late_init();
 #ifdef CONFIG_LOCAL_TIMERS
 	if (cpu_is_omap44xx()) {
 		twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index fedd829..e2bdbb3 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -536,6 +536,7 @@ struct omap_hwmod {
 };
 
 int omap_hwmod_init(struct omap_hwmod **ohs);
+int omap_hwmod_late_init(void);
 struct omap_hwmod *omap_hwmod_lookup(const char *name);
 int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data),
 			void *data);
-- 
1.6.0.4


  reply	other threads:[~2011-02-22 13:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22  9:49 Linux-next as of 20110222 broken on OMAP4 Anand Gadiyar
2011-02-22 10:24 ` Govindraj
2011-02-22 10:28   ` Anand Gadiyar
2011-02-22 12:51 ` Cousson, Benoit
2011-02-22 13:13   ` Santosh Shilimkar [this message]
2011-02-22 19:13   ` Tony Lindgren
2011-02-23  4:50     ` DebBarma, Tarun Kanti
2011-02-23 12:07       ` Kishore Kadiyala
2011-02-23 12:20         ` DebBarma, Tarun Kanti
2011-02-23 12:52           ` Kishore Kadiyala

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=113477ac814f1e227f26f4963d7d624a@mail.gmail.com \
    --to=santosh.shilimkar@ti.com \
    --cc=b-cousson@ti.com \
    --cc=gadiyar@ti.com \
    --cc=linux-omap@vger.kernel.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