]> Pileus Git - ~andy/linux/blobdiff - sound/soc/pxa/pxa2xx-i2s.c
Merge phase #4 (X2APIC, APIC unification, CPU identification unification) of git...
[~andy/linux] / sound / soc / pxa / pxa2xx-i2s.c
index ad4c31ddb3d400cbdf7b58bcc75cf26ea53d3e6c..2fb58298513b32c88e5cf2f74184db37a883d163 100644 (file)
@@ -21,6 +21,7 @@
 #include <sound/pcm.h>
 #include <sound/initval.h>
 #include <sound/soc.h>
+#include <sound/pxa2xx-lib.h>
 
 #include <mach/hardware.h>
 #include <mach/pxa-regs.h>
 #include "pxa2xx-pcm.h"
 #include "pxa2xx-i2s.h"
 
+struct pxa2xx_gpio {
+       u32 sys;
+       u32     rx;
+       u32 tx;
+       u32 clk;
+       u32 frm;
+};
+
 /*
  * I2S Controller Register and Bit Definitions
  */
@@ -105,11 +114,6 @@ static struct pxa2xx_gpio gpio_bus[] = {
                .frm = GPIO31_SYNC_I2S_MD,
        },
        { /* I2S SoC Master */
-#ifdef CONFIG_PXA27x
-               .sys = GPIO113_I2S_SYSCLK_MD,
-#else
-               .sys = GPIO32_SYSCLK_I2S_MD,
-#endif
                .rx = GPIO29_SDATA_IN_I2S_MD,
                .tx = GPIO30_SDATA_OUT_I2S_MD,
                .clk = GPIO28_BITCLK_OUT_I2S_MD,
@@ -383,6 +387,11 @@ static struct platform_driver pxa2xx_i2s_driver = {
 
 static int __init pxa2xx_i2s_init(void)
 {
+       if (cpu_is_pxa27x())
+               gpio_bus[1].sys = GPIO113_I2S_SYSCLK_MD;
+       else
+               gpio_bus[1].sys = GPIO32_SYSCLK_I2S_MD;
+
        clk_i2s = ERR_PTR(-ENOENT);
        return platform_driver_register(&pxa2xx_i2s_driver);
 }