]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Request DSP memory for McBSP
authorTony Lindgren <tony@atomide.com>
Thu, 29 Nov 2007 23:38:16 +0000 (15:38 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 8 Feb 2008 18:37:57 +0000 (10:37 -0800)
On OMAP1 some McBSP features depend on DSP. Also export
polling functions as suggested by Luis Cargnini.

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/mcbsp.c

index 2af5bd5a134420b5aee8b68d0c6d4fe154acf3fb..9cf83c4da9fa116155d8d17b6fb54bd40f99294e 100644 (file)
@@ -201,6 +201,14 @@ static int omap_mcbsp_check(unsigned int id)
 static void omap_mcbsp_dsp_request(void)
 {
        if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
+               int ret;
+
+               ret = omap_dsp_request_mem();
+               if (ret < 0) {
+                       printk(KERN_ERR "Could not get dsp memory: %i\n", ret);
+                       return;
+               }
+
                clk_enable(mcbsp_dsp_ck);
                clk_enable(mcbsp_api_ck);
 
@@ -219,6 +227,7 @@ static void omap_mcbsp_dsp_request(void)
 static void omap_mcbsp_dsp_free(void)
 {
        if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
+               omap_dsp_release_mem();
                clk_disable(mcbsp_dspxor_ck);
                clk_disable(mcbsp_dsp_ck);
                clk_disable(mcbsp_api_ck);
@@ -1024,6 +1033,8 @@ EXPORT_SYMBOL(omap_mcbsp_set_io_type);
 EXPORT_SYMBOL(omap_mcbsp_free);
 EXPORT_SYMBOL(omap_mcbsp_start);
 EXPORT_SYMBOL(omap_mcbsp_stop);
+EXPORT_SYMBOL(omap_mcbsp_pollread);
+EXPORT_SYMBOL(omap_mcbsp_pollwrite);
 EXPORT_SYMBOL(omap_mcbsp_xmit_word);
 EXPORT_SYMBOL(omap_mcbsp_recv_word);
 EXPORT_SYMBOL(omap_mcbsp_xmit_buffer);