]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: SAMSUNG: Add platform device for idma
authorSangbeom Kim <sbkim73@samsung.com>
Thu, 21 Jul 2011 05:12:19 +0000 (14:12 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Thu, 21 Jul 2011 05:12:19 +0000 (14:12 +0900)
Exynos4 and S5PC110(S5PV210) has Internal dma(idma) in AUDSS.
To support idma, register idma platform device.
and Exynos4 and S5PC110 has different IDMA address.
TO handle different IDMA address, register idma platform data

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos4/dev-audio.c
arch/arm/mach-exynos4/include/mach/regs-audss.h [new file with mode: 0644]
arch/arm/mach-exynos4/mach-smdkv310.c
arch/arm/mach-s5pv210/dev-audio.c
arch/arm/mach-s5pv210/include/mach/regs-audss.h [new file with mode: 0644]
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/plat-samsung/dev-asocdma.c
arch/arm/plat-samsung/include/plat/audio.h
arch/arm/plat-samsung/include/plat/devs.h

index 983069a5323912f6b7f0775681166db200089b29..5a9f9c2e53bfd4ae2eb47eeaa78f7b20369f965f 100644 (file)
@@ -21,6 +21,7 @@
 #include <mach/map.h>
 #include <mach/dma.h>
 #include <mach/irqs.h>
+#include <mach/regs-audss.h>
 
 static const char *rclksrc[] = {
        [0] = "busclk",
@@ -55,6 +56,7 @@ static struct s3c_audio_pdata i2sv5_pdata = {
                        .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI
                                         | QUIRK_NEED_RSTCLR,
                        .src_clk = rclksrc,
+                       .idma_addr = EXYNOS4_AUDSS_INT_MEM,
                },
        },
 };
diff --git a/arch/arm/mach-exynos4/include/mach/regs-audss.h b/arch/arm/mach-exynos4/include/mach/regs-audss.h
new file mode 100644 (file)
index 0000000..ca5a8b6
--- /dev/null
@@ -0,0 +1,18 @@
+/* arch/arm/mach-exynos4/include/mach/regs-audss.h
+ *
+ * Copyright (c) 2011 Samsung Electronics
+ *             http://www.samsung.com
+ *
+ * Exynos4 Audio SubSystem clock register definitions
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef __PLAT_REGS_AUDSS_H
+#define __PLAT_REGS_AUDSS_H __FILE__
+
+#define EXYNOS4_AUDSS_INT_MEM  (0x03000000)
+
+#endif /* _PLAT_REGS_AUDSS_H */
index 40b0a53891bd05c369257ac9365e510f772b79f2..ccc8fa11b54124c886513ae94e4780bcf97955ef 100644 (file)
@@ -184,6 +184,7 @@ static struct platform_device *smdkv310_devices[] __initdata = {
        &exynos4_device_spdif,
        &exynos4_device_sysmmu,
        &samsung_asoc_dma,
+       &samsung_asoc_idma,
        &smdkv310_smsc911x,
        &exynos4_device_ahci,
 };
index 8d58f1926241d3358d8a48aea2ef253b2bf4f4c3..0be95f1ea2fe8726fbc7e2f3293054922460d26e 100644 (file)
@@ -52,6 +52,7 @@ static struct s3c_audio_pdata i2sv5_pdata = {
                        .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI
                                         | QUIRK_NEED_RSTCLR,
                        .src_clk = rclksrc,
+                       .idma_addr = S5PV210_AUDSS_INT_MEM,
                },
        },
 };
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-audss.h b/arch/arm/mach-s5pv210/include/mach/regs-audss.h
new file mode 100644 (file)
index 0000000..eacc1f7
--- /dev/null
@@ -0,0 +1,18 @@
+/* arch/arm/mach-s5pv210/include/mach/regs-audss.h
+ *
+ * Copyright (c) 2011 Samsung Electronics
+ *             http://www.samsung.com
+ *
+ * S5PV210 Audio SubSystem clock register definitions
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef __PLAT_REGS_AUDSS_H
+#define __PLAT_REGS_AUDSS_H __FILE__
+
+#define S5PV210_AUDSS_INT_MEM  (0xC0000000)
+
+#endif /* _PLAT_REGS_AUDSS_H */
index c6a9e86c2d5ced263e25e5580a2fc53b7115a469..c6900f8bf3ce778478f2e114bd70b3293c76f70b 100644 (file)
@@ -267,6 +267,7 @@ static struct platform_device *smdkv210_devices[] __initdata = {
        &s5pv210_device_iis0,
        &s5pv210_device_spdif,
        &samsung_asoc_dma,
+       &samsung_asoc_idma,
        &samsung_device_keypad,
        &smdkv210_dm9000,
        &smdkv210_lcd_lte480wv,
index a068c4f42d5641183e0bc9e33f2bff54f530b0f4..97e35d3c064dd2ec848fa0ab7af803e9ce9325f4 100644 (file)
@@ -23,3 +23,13 @@ struct platform_device samsung_asoc_dma = {
        }
 };
 EXPORT_SYMBOL(samsung_asoc_dma);
+
+struct platform_device samsung_asoc_idma = {
+       .name           = "samsung-idma",
+       .id             = -1,
+       .dev            = {
+               .dma_mask               = &audio_dmamask,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
+       }
+};
+EXPORT_SYMBOL(samsung_asoc_idma);
index a0826ed2f9febc680611c52c2d08b20844441d35..aa9875f77c40489527279342ca8b1d1da89866c4 100644 (file)
@@ -44,6 +44,7 @@ struct samsung_i2s {
         * Also corresponds to clocks of I2SMOD[10]
         */
        const char **src_clk;
+       dma_addr_t idma_addr;
 };
 
 /**
index 29fa1cf9c6f869d948d4b57edd26e3bdf080dc32..540969047a7b8a5f5a7ae7fd95fcfe10c4861cd5 100644 (file)
@@ -40,6 +40,7 @@ extern struct platform_device s3c64xx_device_spi0;
 extern struct platform_device s3c64xx_device_spi1;
 
 extern struct platform_device samsung_asoc_dma;
+extern struct platform_device samsung_asoc_idma;
 
 extern struct platform_device s3c64xx_device_pcm0;
 extern struct platform_device s3c64xx_device_pcm1;