diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-09 16:45:51 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-07 06:32:21 -0500 |
commit | 7931d92f4f38100061cf6b8a9737967057f94871 (patch) | |
tree | c3b35defa6baf2a21b40ec478663bb89f4e9b073 /arch/arm/mach-sa1100 | |
parent | 6365bead25efc84a4cf4aa9b0a7638f8a970cdff (diff) |
ARM: sa11x0: add SA-11x0 DMA device
Add sa11x0 DMA platform device and resources to the list of
generic platform devices for SA11x0 machines.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r-- | arch/arm/mach-sa1100/generic.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index bb10ee2cb89f..52ea6229818f 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/dma-mapping.h> | ||
17 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
18 | #include <linux/cpufreq.h> | 19 | #include <linux/cpufreq.h> |
19 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
@@ -350,6 +351,29 @@ static struct platform_device sa11x0rtc_device = { | |||
350 | .id = -1, | 351 | .id = -1, |
351 | }; | 352 | }; |
352 | 353 | ||
354 | static struct resource sa11x0dma_resources[] = { | ||
355 | DEFINE_RES_MEM(__PREG(DDAR(0)), 6 * DMASp), | ||
356 | DEFINE_RES_IRQ(IRQ_DMA0), | ||
357 | DEFINE_RES_IRQ(IRQ_DMA1), | ||
358 | DEFINE_RES_IRQ(IRQ_DMA2), | ||
359 | DEFINE_RES_IRQ(IRQ_DMA3), | ||
360 | DEFINE_RES_IRQ(IRQ_DMA4), | ||
361 | DEFINE_RES_IRQ(IRQ_DMA5), | ||
362 | }; | ||
363 | |||
364 | static u64 sa11x0dma_dma_mask = DMA_BIT_MASK(32); | ||
365 | |||
366 | static struct platform_device sa11x0dma_device = { | ||
367 | .name = "sa11x0-dma", | ||
368 | .id = -1, | ||
369 | .dev = { | ||
370 | .dma_mask = &sa11x0dma_dma_mask, | ||
371 | .coherent_dma_mask = 0xffffffff, | ||
372 | }, | ||
373 | .num_resources = ARRAY_SIZE(sa11x0dma_resources), | ||
374 | .resource = sa11x0dma_resources, | ||
375 | }; | ||
376 | |||
353 | static struct platform_device *sa11x0_devices[] __initdata = { | 377 | static struct platform_device *sa11x0_devices[] __initdata = { |
354 | &sa11x0udc_device, | 378 | &sa11x0udc_device, |
355 | &sa11x0uart1_device, | 379 | &sa11x0uart1_device, |
@@ -358,6 +382,7 @@ static struct platform_device *sa11x0_devices[] __initdata = { | |||
358 | &sa11x0pcmcia_device, | 382 | &sa11x0pcmcia_device, |
359 | &sa11x0fb_device, | 383 | &sa11x0fb_device, |
360 | &sa11x0rtc_device, | 384 | &sa11x0rtc_device, |
385 | &sa11x0dma_device, | ||
361 | }; | 386 | }; |
362 | 387 | ||
363 | static int __init sa1100_init(void) | 388 | static int __init sa1100_init(void) |