Skip to content

Commit

Permalink
ARM: S3C24XX: Add platform device for AC97 controller
Browse files Browse the repository at this point in the history
Move the definition of the "generic" IRQ in the process.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Mark Brown authored and Ben Dooks committed Aug 14, 2009
1 parent 229fd8f commit d91e9a7
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 6 deletions.
6 changes: 6 additions & 0 deletions arch/arm/mach-s3c2410/include/mach/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@
#define IRQ_S3CUART_TX3 IRQ_S3C2443_TX3
#define IRQ_S3CUART_ERR3 IRQ_S3C2443_ERR3

#ifdef CONFIG_CPU_S3C2440
#define IRQ_S3C244x_AC97 IRQ_S3C2440_AC97
#else
#define IRQ_S3C244x_AC97 IRQ_S3C2443_AC97
#endif

/* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */
#define FIQ_START IRQ_EINT0

Expand Down
1 change: 1 addition & 0 deletions arch/arm/plat-s3c/include/plat/devs.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ extern struct platform_device s3c_device_usb_hsotg;
#ifdef CONFIG_CPU_S3C2440

extern struct platform_device s3c_device_camif;
extern struct platform_device s3c_device_ac97;

#endif
50 changes: 50 additions & 0 deletions arch/arm/plat-s3c24xx/devs.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <asm/mach/irq.h>
#include <mach/fb.h>
#include <mach/hardware.h>
#include <mach/dma.h>
#include <mach/irqs.h>
#include <asm/irq.h>

#include <plat/regs-serial.h>
Expand Down Expand Up @@ -473,4 +475,52 @@ struct platform_device s3c_device_camif = {

EXPORT_SYMBOL(s3c_device_camif);

/* AC97 */

static struct resource s3c_ac97_resource[] = {
[0] = {
.start = S3C2440_PA_AC97,
.end = S3C2440_PA_AC97 + S3C2440_SZ_AC97 -1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_S3C244x_AC97,
.end = IRQ_S3C244x_AC97,
.flags = IORESOURCE_IRQ,
},
[2] = {
.name = "PCM out",
.start = DMACH_PCM_OUT,
.end = DMACH_PCM_OUT,
.flags = IORESOURCE_DMA,
},
[3] = {
.name = "PCM in",
.start = DMACH_PCM_IN,
.end = DMACH_PCM_IN,
.flags = IORESOURCE_DMA,
},
[4] = {
.name = "Mic in",
.start = DMACH_MIC_IN,
.end = DMACH_MIC_IN,
.flags = IORESOURCE_DMA,
},
};

static u64 s3c_device_ac97_dmamask = 0xffffffffUL;

struct platform_device s3c_device_ac97 = {
.name = "s3c-ac97",
.id = -1,
.num_resources = ARRAY_SIZE(s3c_ac97_resource),
.resource = s3c_ac97_resource,
.dev = {
.dma_mask = &s3c_device_ac97_dmamask,
.coherent_dma_mask = 0xffffffffUL
}
};

EXPORT_SYMBOL(s3c_device_ac97);

#endif // CONFIG_CPU_S32440
6 changes: 0 additions & 6 deletions sound/soc/s3c24xx/s3c24xx-ac97.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
#define AC_CMD_ADDR(x) (x << 16)
#define AC_CMD_DATA(x) (x & 0xffff)

#ifdef CONFIG_CPU_S3C2440
#define IRQ_S3C244x_AC97 IRQ_S3C2440_AC97
#else
#define IRQ_S3C244x_AC97 IRQ_S3C2443_AC97
#endif

extern struct snd_soc_dai s3c2443_ac97_dai[];

#endif /*S3C24XXAC97_H_*/

0 comments on commit d91e9a7

Please sign in to comment.