aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/devices.c
diff options
context:
space:
mode:
authorMark Brown <broonie@sirena.org.uk>2008-06-10 12:30:05 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-09 21:31:51 +0100
commit9f19d6382854d6b2d58cc364253779479e14facc (patch)
tree1a91dc4f969fe7514de35d96c23f6e31b967c37b /arch/arm/mach-pxa/devices.c
parent[ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC drivers (diff)
downloadlinux-dev-9f19d6382854d6b2d58cc364253779479e14facc.tar.xz
linux-dev-9f19d6382854d6b2d58cc364253779479e14facc.zip
[ARM] 5085/2: PXA: Move AC97 over to the new central device declaration model
As well as moving all the device declarations to a single one in devices.c this causes all platforms to register the I/O and interrupt resources for the AC97 controller. Cc: eric miao <eric.miao@marvell.com> Cc: Mike Rapoport <mike@compulab.co.il> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Jürgen Schindele <linux@schindele.name> Cc: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r--arch/arm/mach-pxa/devices.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 123ee19ca795..a6f2390ce662 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -14,6 +14,7 @@
#include <asm/arch/ohci.h>
#include <asm/arch/pxa27x_keypad.h>
#include <asm/arch/camera.h>
+#include <asm/arch/audio.h>
#include "devices.h"
#include "generic.h"
@@ -298,6 +299,37 @@ struct platform_device pxa_device_rtc = {
.id = -1,
};
+static struct resource pxa_ac97_resources[] = {
+ [0] = {
+ .start = 0x40500000,
+ .end = 0x40500000 + 0xfff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_AC97,
+ .end = IRQ_AC97,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static u64 pxa_ac97_dmamask = 0xffffffffUL;
+
+struct platform_device pxa_device_ac97 = {
+ .name = "pxa2xx-ac97",
+ .id = -1,
+ .dev = {
+ .dma_mask = &pxa_ac97_dmamask,
+ .coherent_dma_mask = 0xffffffff,
+ },
+ .num_resources = ARRAY_SIZE(pxa_ac97_resources),
+ .resource = pxa_ac97_resources,
+};
+
+void __init pxa_set_ac97_info(pxa2xx_audio_ops_t *ops)
+{
+ pxa_register_device(&pxa_device_ac97, ops);
+}
+
#ifdef CONFIG_PXA25x
static struct resource pxa25x_resource_pwm0[] = {