diff options
author | Mark Brown <broonie@sirena.org.uk> | 2008-06-10 07:30:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-07-09 16:31:51 -0400 |
commit | 9f19d6382854d6b2d58cc364253779479e14facc (patch) | |
tree | 1a91dc4f969fe7514de35d96c23f6e31b967c37b /arch/arm/mach-pxa/devices.c | |
parent | 7a8576204333d133d58cbcc59dacf49a5546e3e4 (diff) |
[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.c | 32 |
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 @@ | |||
14 | #include <asm/arch/ohci.h> | 14 | #include <asm/arch/ohci.h> |
15 | #include <asm/arch/pxa27x_keypad.h> | 15 | #include <asm/arch/pxa27x_keypad.h> |
16 | #include <asm/arch/camera.h> | 16 | #include <asm/arch/camera.h> |
17 | #include <asm/arch/audio.h> | ||
17 | 18 | ||
18 | #include "devices.h" | 19 | #include "devices.h" |
19 | #include "generic.h" | 20 | #include "generic.h" |
@@ -298,6 +299,37 @@ struct platform_device pxa_device_rtc = { | |||
298 | .id = -1, | 299 | .id = -1, |
299 | }; | 300 | }; |
300 | 301 | ||
302 | static struct resource pxa_ac97_resources[] = { | ||
303 | [0] = { | ||
304 | .start = 0x40500000, | ||
305 | .end = 0x40500000 + 0xfff, | ||
306 | .flags = IORESOURCE_MEM, | ||
307 | }, | ||
308 | [1] = { | ||
309 | .start = IRQ_AC97, | ||
310 | .end = IRQ_AC97, | ||
311 | .flags = IORESOURCE_IRQ, | ||
312 | }, | ||
313 | }; | ||
314 | |||
315 | static u64 pxa_ac97_dmamask = 0xffffffffUL; | ||
316 | |||
317 | struct platform_device pxa_device_ac97 = { | ||
318 | .name = "pxa2xx-ac97", | ||
319 | .id = -1, | ||
320 | .dev = { | ||
321 | .dma_mask = &pxa_ac97_dmamask, | ||
322 | .coherent_dma_mask = 0xffffffff, | ||
323 | }, | ||
324 | .num_resources = ARRAY_SIZE(pxa_ac97_resources), | ||
325 | .resource = pxa_ac97_resources, | ||
326 | }; | ||
327 | |||
328 | void __init pxa_set_ac97_info(pxa2xx_audio_ops_t *ops) | ||
329 | { | ||
330 | pxa_register_device(&pxa_device_ac97, ops); | ||
331 | } | ||
332 | |||
301 | #ifdef CONFIG_PXA25x | 333 | #ifdef CONFIG_PXA25x |
302 | 334 | ||
303 | static struct resource pxa25x_resource_pwm0[] = { | 335 | static struct resource pxa25x_resource_pwm0[] = { |