This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / arm / mach-omap / mcbsp.c
index 7c4ad77..d334395 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/wait.h>
 #include <linux/completion.h>
 #include <linux/interrupt.h>
-#include <linux/err.h>
 
 #include <asm/delay.h>
 #include <asm/io.h>
@@ -29,8 +28,6 @@
 #include <asm/arch/irqs.h>
 #include <asm/arch/mcbsp.h>
 
-#include <asm/hardware/clock.h>
-
 #ifdef CONFIG_MCBSP_DEBUG
 #define DBG(x...)      printk(x)
 #else
@@ -64,8 +61,6 @@ struct omap_mcbsp {
 };
 
 static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT];
-static struct clk *mcbsp_dsp_ck = 0;
-static struct clk *mcbsp_api_ck = 0;
 
 
 static void omap_mcbsp_dump_reg(u8 id)
@@ -158,8 +153,8 @@ void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config
        OMAP_MCBSP_WRITE(io_base, XCR1, config->xcr1);
        OMAP_MCBSP_WRITE(io_base, SRGR2, config->srgr2);
        OMAP_MCBSP_WRITE(io_base, SRGR1, config->srgr1);
-       OMAP_MCBSP_WRITE(io_base, MCR2, config->mcr2);
-       OMAP_MCBSP_WRITE(io_base, MCR1, config->mcr1);
+       OMAP_MCBSP_WRITE(io_base, SRGR2, config->mcr2);
+       OMAP_MCBSP_WRITE(io_base, SRGR1, config->mcr1);
        OMAP_MCBSP_WRITE(io_base, PCR0, config->pcr0);
 }
 
@@ -186,7 +181,6 @@ static int omap_mcbsp_check(unsigned int id)
        return -1;
 }
 
-#define EN_XORPCK              1
 #define DSP_RSTCT2              0xe1008014
 
 static void omap_mcbsp_dsp_request(void)
@@ -194,8 +188,10 @@ static void omap_mcbsp_dsp_request(void)
        if (cpu_is_omap1510() || cpu_is_omap1610() || cpu_is_omap1710()) {
                omap_writew((omap_readw(ARM_RSTCT1) | (1 << 1) | (1 << 2)),
                            ARM_RSTCT1);
-               clk_enable(mcbsp_dsp_ck);
-               clk_enable(mcbsp_api_ck);
+               omap_writew((omap_readw(ARM_CKCTL) | 1 << EN_DSPCK),
+                           ARM_CKCTL);
+               omap_writew((omap_readw(ARM_IDLECT2) | (1 << EN_APICK)),
+                           ARM_IDLECT2);
 
                /* enable 12MHz clock to mcbsp 1 & 3 */
                __raw_writew(__raw_readw(DSP_IDLECT2) | (1 << EN_XORPCK),
@@ -592,7 +588,7 @@ static const struct omap_mcbsp_info mcbsp_1510[] = {
 };
 #endif
 
-#if defined(CONFIG_ARCH_OMAP16XX)
+#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710)
 static const struct omap_mcbsp_info mcbsp_1610[] = {
        [0] = { .virt_base = OMAP1610_MCBSP1_BASE,
                .dma_rx_sync = OMAP_DMA_MCBSP1_RX,
@@ -618,18 +614,6 @@ static int __init omap_mcbsp_init(void)
        static const struct omap_mcbsp_info *mcbsp_info;
 
        printk("Initializing OMAP McBSP system\n");
-
-       mcbsp_dsp_ck = clk_get(0, "dsp_ck");
-       if (IS_ERR(mcbsp_dsp_ck)) {
-               printk(KERN_ERR "mcbsp: could not acquire dsp_ck handle.\n");
-               return PTR_ERR(mcbsp_dsp_ck);
-       }
-       mcbsp_api_ck = clk_get(0, "api_ck");
-       if (IS_ERR(mcbsp_dsp_ck)) {
-               printk(KERN_ERR "mcbsp: could not acquire api_ck handle.\n");
-               return PTR_ERR(mcbsp_api_ck);
-       }
-
 #ifdef CONFIG_ARCH_OMAP730
        if (cpu_is_omap730()) {
                mcbsp_info = mcbsp_730;
@@ -642,7 +626,7 @@ static int __init omap_mcbsp_init(void)
                mcbsp_count = ARRAY_SIZE(mcbsp_1510);
        }
 #endif
-#if defined(CONFIG_ARCH_OMAP16XX)
+#if defined(CONFIG_ARCH_OMAP1610) || defined(CONFIG_ARCH_OMAP1710)
        if (cpu_is_omap1610() || cpu_is_omap1710()) {
                mcbsp_info = mcbsp_1610;
                mcbsp_count = ARRAY_SIZE(mcbsp_1610);