* Fixes for multi-omap configurion
@ 2008-08-21 8:20 Jarkko Nikula
2008-08-21 8:20 ` [PATCH] ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config Jarkko Nikula
2008-08-21 8:20 ` [PATCH] ARM: OMAP: Fix omap_wdt " Jarkko Nikula
0 siblings, 2 replies; 6+ messages in thread
From: Jarkko Nikula @ 2008-08-21 8:20 UTC (permalink / raw)
To: linux-omap
Hi
There are at least three drivers crashing if running N800 defconfig +
CONFIG_ARCH_OMAP2430=y on N810. Here are fixes for omap2_mcspi and
omap_wdt but the musb I'll let to Felibe et al. :-)
<1>Unable to handle kernel NULL pointer dereference at virtual address
00000000
<1>pgd = c0004000
<1>[00000000] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.27-rc3-omap1 #170)
PC is at musb_platform_init+0x24/0xc0
LR is at 0x0
...
--
Jarkko
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config
2008-08-21 8:20 Fixes for multi-omap configurion Jarkko Nikula
@ 2008-08-21 8:20 ` Jarkko Nikula
2008-08-23 23:17 ` Tony Lindgren
2008-08-21 8:20 ` [PATCH] ARM: OMAP: Fix omap_wdt " Jarkko Nikula
1 sibling, 1 reply; 6+ messages in thread
From: Jarkko Nikula @ 2008-08-21 8:20 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
SPI driver will do unhandled fault on OMAP2420 if trying to probe
non-existing SPI busses. Register those additional busses runtime only
for cpus having them.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
arch/arm/mach-omap2/devices.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index cc5c294..bd49a0f 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -255,10 +255,12 @@ static void omap_init_mcspi(void)
platform_device_register(&omap2_mcspi1);
platform_device_register(&omap2_mcspi2);
#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
- platform_device_register(&omap2_mcspi3);
+ if (cpu_is_omap2430() || cpu_is_omap343x())
+ platform_device_register(&omap2_mcspi3);
#endif
#ifdef CONFIG_ARCH_OMAP3
- platform_device_register(&omap2_mcspi4);
+ if (cpu_is_omap343x())
+ platform_device_register(&omap2_mcspi4);
#endif
}
--
1.5.6.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config
2008-08-21 8:20 ` [PATCH] ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config Jarkko Nikula
@ 2008-08-23 23:17 ` Tony Lindgren
0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2008-08-23 23:17 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap
* Jarkko Nikula <jarkko.nikula@nokia.com> [080821 01:21]:
> SPI driver will do unhandled fault on OMAP2420 if trying to probe
> non-existing SPI busses. Register those additional busses runtime only
> for cpus having them.
Pushing today.
Tony
> Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
> ---
> arch/arm/mach-omap2/devices.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index cc5c294..bd49a0f 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -255,10 +255,12 @@ static void omap_init_mcspi(void)
> platform_device_register(&omap2_mcspi1);
> platform_device_register(&omap2_mcspi2);
> #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
> - platform_device_register(&omap2_mcspi3);
> + if (cpu_is_omap2430() || cpu_is_omap343x())
> + platform_device_register(&omap2_mcspi3);
> #endif
> #ifdef CONFIG_ARCH_OMAP3
> - platform_device_register(&omap2_mcspi4);
> + if (cpu_is_omap343x())
> + platform_device_register(&omap2_mcspi4);
> #endif
> }
>
> --
> 1.5.6.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: OMAP: Fix omap_wdt driver failure on 2420 when running multi-omap config
2008-08-21 8:20 Fixes for multi-omap configurion Jarkko Nikula
2008-08-21 8:20 ` [PATCH] ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config Jarkko Nikula
@ 2008-08-21 8:20 ` Jarkko Nikula
2008-08-21 9:32 ` Jarkko Nikula
1 sibling, 1 reply; 6+ messages in thread
From: Jarkko Nikula @ 2008-08-21 8:20 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
omap_wdt driver will do unhandled fault on 2420 if support for 2430 is
compiled in since wrong base address is defined in that case. Assign
omap_wdt base address runtime depending on cpu type.
---
arch/arm/plat-omap/devices.c | 30 +++++++++++++-----------------
1 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index f22ccbb..3bd1da2 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -454,25 +454,8 @@ static inline void omap_init_uwire(void) {}
#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
-#if defined(CONFIG_ARCH_OMAP34XX)
-#define OMAP_WDT_BASE 0x48314000
-#elif defined(CONFIG_ARCH_OMAP24XX)
-
-#ifdef CONFIG_ARCH_OMAP2430
-/* WDT2 */
-#define OMAP_WDT_BASE 0x49016000
-#else
-#define OMAP_WDT_BASE 0x48022000
-#endif
-
-#else
-#define OMAP_WDT_BASE 0xfffeb000
-#endif
-
static struct resource wdt_resources[] = {
{
- .start = OMAP_WDT_BASE,
- .end = OMAP_WDT_BASE + 0x4f,
.flags = IORESOURCE_MEM,
},
};
@@ -486,6 +469,19 @@ static struct platform_device omap_wdt_device = {
static void omap_init_wdt(void)
{
+ if (cpu_is_omap16xx())
+ wdt_resources[0].start = 0xfffeb000;
+ else if (cpu_is_omap2420())
+ wdt_resources[0].start = 0x48022000; /* WDT2 */
+ else if (cpu_is_omap2430())
+ wdt_resources[0].start = 0x49016000; /* WDT2 */
+ else if (cpu_is_omap343x())
+ wdt_resources[0].start = 0x48314000; /* WDT2 */
+ else
+ return;
+
+ wdt_resources[0].end = wdt_resources[0].start + 0x4f;
+
(void) platform_device_register(&omap_wdt_device);
}
#else
--
1.5.6.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ARM: OMAP: Fix omap_wdt driver failure on 2420 when running multi-omap config
2008-08-21 8:20 ` [PATCH] ARM: OMAP: Fix omap_wdt " Jarkko Nikula
@ 2008-08-21 9:32 ` Jarkko Nikula
2008-08-23 23:18 ` Tony Lindgren
0 siblings, 1 reply; 6+ messages in thread
From: Jarkko Nikula @ 2008-08-21 9:32 UTC (permalink / raw)
To: linux-omap
Signed-off line was missing...
----------------------------->
omap_wdt driver will do unhandled fault on 2420 if support for 2430 is
compiled in since wrong base address is defined in that case. Assign
omap_wdt base address runtime depending on cpu type.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
arch/arm/plat-omap/devices.c | 30 +++++++++++++-----------------
1 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index f22ccbb..3bd1da2 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -454,25 +454,8 @@ static inline void omap_init_uwire(void) {}
#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
-#if defined(CONFIG_ARCH_OMAP34XX)
-#define OMAP_WDT_BASE 0x48314000
-#elif defined(CONFIG_ARCH_OMAP24XX)
-
-#ifdef CONFIG_ARCH_OMAP2430
-/* WDT2 */
-#define OMAP_WDT_BASE 0x49016000
-#else
-#define OMAP_WDT_BASE 0x48022000
-#endif
-
-#else
-#define OMAP_WDT_BASE 0xfffeb000
-#endif
-
static struct resource wdt_resources[] = {
{
- .start = OMAP_WDT_BASE,
- .end = OMAP_WDT_BASE + 0x4f,
.flags = IORESOURCE_MEM,
},
};
@@ -486,6 +469,19 @@ static struct platform_device omap_wdt_device = {
static void omap_init_wdt(void)
{
+ if (cpu_is_omap16xx())
+ wdt_resources[0].start = 0xfffeb000;
+ else if (cpu_is_omap2420())
+ wdt_resources[0].start = 0x48022000; /* WDT2 */
+ else if (cpu_is_omap2430())
+ wdt_resources[0].start = 0x49016000; /* WDT2 */
+ else if (cpu_is_omap343x())
+ wdt_resources[0].start = 0x48314000; /* WDT2 */
+ else
+ return;
+
+ wdt_resources[0].end = wdt_resources[0].start + 0x4f;
+
(void) platform_device_register(&omap_wdt_device);
}
#else
--
1.5.6.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ARM: OMAP: Fix omap_wdt driver failure on 2420 when running multi-omap config
2008-08-21 9:32 ` Jarkko Nikula
@ 2008-08-23 23:18 ` Tony Lindgren
0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2008-08-23 23:18 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap
* Jarkko Nikula <jarkko.nikula@nokia.com> [080821 02:34]:
> Signed-off line was missing...
>
> ----------------------------->
>
> omap_wdt driver will do unhandled fault on 2420 if support for 2430 is
> compiled in since wrong base address is defined in that case. Assign
> omap_wdt base address runtime depending on cpu type.
Pushing today.
Tony
> Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
> ---
> arch/arm/plat-omap/devices.c | 30 +++++++++++++-----------------
> 1 files changed, 13 insertions(+), 17 deletions(-)
>
> diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
> index f22ccbb..3bd1da2 100644
> --- a/arch/arm/plat-omap/devices.c
> +++ b/arch/arm/plat-omap/devices.c
> @@ -454,25 +454,8 @@ static inline void omap_init_uwire(void) {}
>
> #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
>
> -#if defined(CONFIG_ARCH_OMAP34XX)
> -#define OMAP_WDT_BASE 0x48314000
> -#elif defined(CONFIG_ARCH_OMAP24XX)
> -
> -#ifdef CONFIG_ARCH_OMAP2430
> -/* WDT2 */
> -#define OMAP_WDT_BASE 0x49016000
> -#else
> -#define OMAP_WDT_BASE 0x48022000
> -#endif
> -
> -#else
> -#define OMAP_WDT_BASE 0xfffeb000
> -#endif
> -
> static struct resource wdt_resources[] = {
> {
> - .start = OMAP_WDT_BASE,
> - .end = OMAP_WDT_BASE + 0x4f,
> .flags = IORESOURCE_MEM,
> },
> };
> @@ -486,6 +469,19 @@ static struct platform_device omap_wdt_device = {
>
> static void omap_init_wdt(void)
> {
> + if (cpu_is_omap16xx())
> + wdt_resources[0].start = 0xfffeb000;
> + else if (cpu_is_omap2420())
> + wdt_resources[0].start = 0x48022000; /* WDT2 */
> + else if (cpu_is_omap2430())
> + wdt_resources[0].start = 0x49016000; /* WDT2 */
> + else if (cpu_is_omap343x())
> + wdt_resources[0].start = 0x48314000; /* WDT2 */
> + else
> + return;
> +
> + wdt_resources[0].end = wdt_resources[0].start + 0x4f;
> +
> (void) platform_device_register(&omap_wdt_device);
> }
> #else
> --
> 1.5.6.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-08-23 23:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-21 8:20 Fixes for multi-omap configurion Jarkko Nikula
2008-08-21 8:20 ` [PATCH] ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config Jarkko Nikula
2008-08-23 23:17 ` Tony Lindgren
2008-08-21 8:20 ` [PATCH] ARM: OMAP: Fix omap_wdt " Jarkko Nikula
2008-08-21 9:32 ` Jarkko Nikula
2008-08-23 23:18 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox