summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2006-10-23 16:03:01 +0300
committerTony Lindgren <tony@atomide.com>2006-10-23 16:03:01 +0300
commit40749d1d5792748372ae3becf638944b896ef8f1 (patch)
tree47a9f3b53039322d862a62eff37fd17a7729c5f6
parenta57e230cfe7f492a14a3dfc7539de33dfb3a0994 (diff)
ARM: OMAP: Fix omap1 McBSP without CONFIG_OMAP_DSPv2.6.18-omap1
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>
-rw-r--r--arch/arm/mach-omap1/devices.c2
-rw-r--r--arch/arm/plat-omap/Makefile3
-rw-r--r--arch/arm/plat-omap/dsp/dsp_common.c8
-rw-r--r--arch/arm/plat-omap/dsp/dsp_core.c1
4 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 992a17d8668..adae4f80d2f 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -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)
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index e49bef89bf3..8759383763e 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -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
diff --git a/arch/arm/plat-omap/dsp/dsp_common.c b/arch/arm/plat-omap/dsp/dsp_common.c
index 873509b7103..087971ad8c0 100644
--- a/arch/arm/plat-omap/dsp/dsp_common.c
+++ b/arch/arm/plat-omap/dsp/dsp_common.c
@@ -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
diff --git a/arch/arm/plat-omap/dsp/dsp_core.c b/arch/arm/plat-omap/dsp/dsp_core.c
index ab3b921689c..ceeb5e5c97c 100644
--- a/arch/arm/plat-omap/dsp/dsp_core.c
+++ b/arch/arm/plat-omap/dsp/dsp_core.c
@@ -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;