aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2009-07-24 06:43:00 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-21 11:02:14 -0400
commit6ff89e9d62014b0e21fad96cf4d72d68b3aa0d8c (patch)
treedab21b0760c053c3ffa668671cba6195ef5699e9 /arch/arm/mach-at91
parent9e6c82cd3e1a739ef48bf8c1decc8e7a7d8de3ac (diff)
ARM: 5620/1: at91/dmaengine: integration of at_hdmac driver in at91sam9rl
This is the integration of DMA engine driver into at91sam9rl device file. The associated driver is at_hdmac. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 728186515cdf..1c2dced8748d 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -21,11 +21,57 @@
21#include <mach/at91sam9rl.h> 21#include <mach/at91sam9rl.h>
22#include <mach/at91sam9rl_matrix.h> 22#include <mach/at91sam9rl_matrix.h>
23#include <mach/at91sam9_smc.h> 23#include <mach/at91sam9_smc.h>
24#include <mach/at_hdmac.h>
24 25
25#include "generic.h" 26#include "generic.h"
26 27
27 28
28/* -------------------------------------------------------------------- 29/* --------------------------------------------------------------------
30 * HDMAC - AHB DMA Controller
31 * -------------------------------------------------------------------- */
32
33#if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE)
34static u64 hdmac_dmamask = DMA_BIT_MASK(32);
35
36static struct at_dma_platform_data atdma_pdata = {
37 .nr_channels = 2,
38};
39
40static struct resource hdmac_resources[] = {
41 [0] = {
42 .start = AT91_BASE_SYS + AT91_DMA,
43 .end = AT91_BASE_SYS + AT91_DMA + SZ_512 - 1,
44 .flags = IORESOURCE_MEM,
45 },
46 [2] = {
47 .start = AT91SAM9RL_ID_DMA,
48 .end = AT91SAM9RL_ID_DMA,
49 .flags = IORESOURCE_IRQ,
50 },
51};
52
53static struct platform_device at_hdmac_device = {
54 .name = "at_hdmac",
55 .id = -1,
56 .dev = {
57 .dma_mask = &hdmac_dmamask,
58 .coherent_dma_mask = DMA_BIT_MASK(32),
59 .platform_data = &atdma_pdata,
60 },
61 .resource = hdmac_resources,
62 .num_resources = ARRAY_SIZE(hdmac_resources),
63};
64
65void __init at91_add_device_hdmac(void)
66{
67 dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask);
68 platform_device_register(&at_hdmac_device);
69}
70#else
71void __init at91_add_device_hdmac(void) {}
72#endif
73
74/* --------------------------------------------------------------------
29 * USB HS Device (Gadget) 75 * USB HS Device (Gadget)
30 * -------------------------------------------------------------------- */ 76 * -------------------------------------------------------------------- */
31 77
@@ -1103,6 +1149,7 @@ void __init at91_add_device_serial(void) {}
1103 */ 1149 */
1104static int __init at91_add_standard_devices(void) 1150static int __init at91_add_standard_devices(void)
1105{ 1151{
1152 at91_add_device_hdmac();
1106 at91_add_device_rtc(); 1153 at91_add_device_rtc();
1107 at91_add_device_rtt(); 1154 at91_add_device_rtt();
1108 at91_add_device_watchdog(); 1155 at91_add_device_watchdog();