aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-s3c2410/include/mach/irqs.h6
-rw-r--r--arch/arm/plat-s3c/include/plat/devs.h1
-rw-r--r--arch/arm/plat-s3c24xx/devs.c50
-rw-r--r--sound/soc/s3c24xx/s3c24xx-ac97.h6
4 files changed, 57 insertions, 6 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/irqs.h b/arch/arm/mach-s3c2410/include/mach/irqs.h
index 2a2384ffa7b1..6c12c6312ad8 100644
--- a/arch/arm/mach-s3c2410/include/mach/irqs.h
+++ b/arch/arm/mach-s3c2410/include/mach/irqs.h
@@ -164,6 +164,12 @@
164#define IRQ_S3CUART_TX3 IRQ_S3C2443_TX3 164#define IRQ_S3CUART_TX3 IRQ_S3C2443_TX3
165#define IRQ_S3CUART_ERR3 IRQ_S3C2443_ERR3 165#define IRQ_S3CUART_ERR3 IRQ_S3C2443_ERR3
166 166
167#ifdef CONFIG_CPU_S3C2440
168#define IRQ_S3C244x_AC97 IRQ_S3C2440_AC97
169#else
170#define IRQ_S3C244x_AC97 IRQ_S3C2443_AC97
171#endif
172
167/* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */ 173/* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */
168#define FIQ_START IRQ_EINT0 174#define FIQ_START IRQ_EINT0
169 175
diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h
index 2e170827e0b0..2e6599411c28 100644
--- a/arch/arm/plat-s3c/include/plat/devs.h
+++ b/arch/arm/plat-s3c/include/plat/devs.h
@@ -56,5 +56,6 @@ extern struct platform_device s3c_device_usb_hsotg;
56#ifdef CONFIG_CPU_S3C2440 56#ifdef CONFIG_CPU_S3C2440
57 57
58extern struct platform_device s3c_device_camif; 58extern struct platform_device s3c_device_camif;
59extern struct platform_device s3c_device_ac97;
59 60
60#endif 61#endif
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index 4eb378c89a39..4553ad6c7adc 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -26,6 +26,8 @@
26#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27#include <mach/fb.h> 27#include <mach/fb.h>
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <mach/dma.h>
30#include <mach/irqs.h>
29#include <asm/irq.h> 31#include <asm/irq.h>
30 32
31#include <plat/regs-serial.h> 33#include <plat/regs-serial.h>
@@ -473,4 +475,52 @@ struct platform_device s3c_device_camif = {
473 475
474EXPORT_SYMBOL(s3c_device_camif); 476EXPORT_SYMBOL(s3c_device_camif);
475 477
478/* AC97 */
479
480static struct resource s3c_ac97_resource[] = {
481 [0] = {
482 .start = S3C2440_PA_AC97,
483 .end = S3C2440_PA_AC97 + S3C2440_SZ_AC97 -1,
484 .flags = IORESOURCE_MEM,
485 },
486 [1] = {
487 .start = IRQ_S3C244x_AC97,
488 .end = IRQ_S3C244x_AC97,
489 .flags = IORESOURCE_IRQ,
490 },
491 [2] = {
492 .name = "PCM out",
493 .start = DMACH_PCM_OUT,
494 .end = DMACH_PCM_OUT,
495 .flags = IORESOURCE_DMA,
496 },
497 [3] = {
498 .name = "PCM in",
499 .start = DMACH_PCM_IN,
500 .end = DMACH_PCM_IN,
501 .flags = IORESOURCE_DMA,
502 },
503 [4] = {
504 .name = "Mic in",
505 .start = DMACH_MIC_IN,
506 .end = DMACH_MIC_IN,
507 .flags = IORESOURCE_DMA,
508 },
509};
510
511static u64 s3c_device_ac97_dmamask = 0xffffffffUL;
512
513struct platform_device s3c_device_ac97 = {
514 .name = "s3c-ac97",
515 .id = -1,
516 .num_resources = ARRAY_SIZE(s3c_ac97_resource),
517 .resource = s3c_ac97_resource,
518 .dev = {
519 .dma_mask = &s3c_device_ac97_dmamask,
520 .coherent_dma_mask = 0xffffffffUL
521 }
522};
523
524EXPORT_SYMBOL(s3c_device_ac97);
525
476#endif // CONFIG_CPU_S32440 526#endif // CONFIG_CPU_S32440
diff --git a/sound/soc/s3c24xx/s3c24xx-ac97.h b/sound/soc/s3c24xx/s3c24xx-ac97.h
index a96dcadf28b4..e96f941a810b 100644
--- a/sound/soc/s3c24xx/s3c24xx-ac97.h
+++ b/sound/soc/s3c24xx/s3c24xx-ac97.h
@@ -20,12 +20,6 @@
20#define AC_CMD_ADDR(x) (x << 16) 20#define AC_CMD_ADDR(x) (x << 16)
21#define AC_CMD_DATA(x) (x & 0xffff) 21#define AC_CMD_DATA(x) (x & 0xffff)
22 22
23#ifdef CONFIG_CPU_S3C2440
24#define IRQ_S3C244x_AC97 IRQ_S3C2440_AC97
25#else
26#define IRQ_S3C244x_AC97 IRQ_S3C2443_AC97
27#endif
28
29extern struct snd_soc_dai s3c2443_ac97_dai[]; 23extern struct snd_soc_dai s3c2443_ac97_dai[];
30 24
31#endif /*S3C24XXAC97_H_*/ 25#endif /*S3C24XXAC97_H_*/