]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Fix omap1 McBSP without CONFIG_OMAP_DSP v2.6.18-omap1
authorTony Lindgren <tony@atomide.com>
Mon, 23 Oct 2006 13:03:01 +0000 (16:03 +0300)
committerTony Lindgren <tony@atomide.com>
Mon, 23 Oct 2006 13:03:01 +0000 (16:03 +0300)
As some of the McBSP clocks come from DSP side, DSP needs
to be initialized even without CONFIG_OMAP_DSP.

This feature got broken with recent DSP updates.

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/devices.c
arch/arm/plat-omap/Makefile
arch/arm/plat-omap/dsp/dsp_common.c
arch/arm/plat-omap/dsp/dsp_core.c

index 992a17d8668fe9b4bbba6cf1a2a6de7967257b2f..adae4f80d2fb2ca224f04e3bfd0fb5407552906b 100644 (file)
@@ -63,7 +63,7 @@ static inline void omap_init_rtc(void) {}
 
 #if defined(CONFIG_OMAP_DSP)
 
-#if defined(CONFIG_ARCH_OMAP1510)
+#if defined(CONFIG_ARCH_OMAP15XX)
 #  define OMAP1_MBOX_SIZE      0x23
 #  define INT_DSP_MAILBOX1     INT_1510_DSP_MAILBOX1
 #elif defined(CONFIG_ARCH_OMAP16XX)
index e49bef89bf39b246e3bc5ca5b4e1369093e0c59a..8759383763ee7c1f510f1e2f414b74e158bb6fdf 100644 (file)
@@ -26,4 +26,5 @@ obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o
 obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o
 
 # DSP subsystem
-obj-$(CONFIG_OMAP_DSP) += dsp/ mailbox.o
+obj-y += dsp/
+obj-$(CONFIG_OMAP_DSP) += mailbox.o
index 873509b71030eaa31ea6c32a157cd4f616e96dbf..087971ad8c02e4da9f46ae29374324f91f0e3dcf 100644 (file)
@@ -43,6 +43,8 @@
 #define dsp_boot_config(mode)  writel((mode), DSP_IPI_DSPBOOTCONFIG)
 #endif
 
+struct omap_dsp *omap_dsp;
+
 #if defined(CONFIG_ARCH_OMAP1)
 struct clk *dsp_ck_handle;
 struct clk *api_ck_handle;
@@ -371,7 +373,8 @@ static void dsp_cpustat_update(void)
                        __dsp_core_enable();
 #endif
                        cpustat.stat = CPUSTAT_RUN;
-                       enable_irq(omap_dsp->mmu_irq);
+                       if (omap_dsp != NULL)
+                               enable_irq(omap_dsp->mmu_irq);
                }
                return;
        }
@@ -379,7 +382,8 @@ static void dsp_cpustat_update(void)
        /* cpustat.req < CPUSTAT_RUN */
 
        if (cpustat.stat == CPUSTAT_RUN) {
-               disable_irq(omap_dsp->mmu_irq);
+               if (omap_dsp != NULL)
+                       disable_irq(omap_dsp->mmu_irq);
 #ifdef CONFIG_ARCH_OMAP1
                clk_disable(api_ck_handle);
 #endif
index ab3b921689c2118625d677685d25c44162e56f90..ceeb5e5c97c4cf006978418bae5ae2eeafb7cf6b 100644 (file)
@@ -40,7 +40,6 @@ MODULE_AUTHOR("Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>");
 MODULE_DESCRIPTION("OMAP DSP driver module");
 MODULE_LICENSE("GPL");
 
-struct omap_dsp *omap_dsp;
 static struct sync_seq *mbseq;
 static u16 mbseq_expect_tmp;
 static u16 *mbseq_expect = &mbseq_expect_tmp;