RE: Linux-next as of 20110222 broken on OMAP4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap-
> owner@xxxxxxxxxxxxxxx] 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@xxxxxx>
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@xxxxxxxxx>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
Cc: Paul Walmsley <paul@xxxxxxxxx>
Cc: Tony Lindgren <tony@xxxxxxxxxxx>
---
 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: 0001-omap-Move-omap_hwmod_late_init-to-mdesc-timer-i.patch
Description: Binary data


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux