diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2009-07-24 06:43:01 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 11:02:15 -0400 |
commit | 40262b2b6efac507005a2c981175266bf81152a7 (patch) | |
tree | 8d5ed29c6ffb02702e6d790966f97f24a5bff796 /arch/arm | |
parent | 6ff89e9d62014b0e21fad96cf4d72d68b3aa0d8c (diff) |
ARM: 5621/1: at91/dmaengine: integration of at_hdmac driver in at91sam9g45 series
This is the integration of DMA engine driver into at91sam9g45 series
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')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index d746e8621bc2..45720c84f0bf 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -24,11 +24,59 @@ | |||
24 | #include <mach/at91sam9g45.h> | 24 | #include <mach/at91sam9g45.h> |
25 | #include <mach/at91sam9g45_matrix.h> | 25 | #include <mach/at91sam9g45_matrix.h> |
26 | #include <mach/at91sam9_smc.h> | 26 | #include <mach/at91sam9_smc.h> |
27 | #include <mach/at_hdmac.h> | ||
27 | 28 | ||
28 | #include "generic.h" | 29 | #include "generic.h" |
29 | 30 | ||
30 | 31 | ||
31 | /* -------------------------------------------------------------------- | 32 | /* -------------------------------------------------------------------- |
33 | * HDMAC - AHB DMA Controller | ||
34 | * -------------------------------------------------------------------- */ | ||
35 | |||
36 | #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) | ||
37 | static u64 hdmac_dmamask = DMA_BIT_MASK(32); | ||
38 | |||
39 | static struct at_dma_platform_data atdma_pdata = { | ||
40 | .nr_channels = 8, | ||
41 | }; | ||
42 | |||
43 | static struct resource hdmac_resources[] = { | ||
44 | [0] = { | ||
45 | .start = AT91_BASE_SYS + AT91_DMA, | ||
46 | .end = AT91_BASE_SYS + AT91_DMA + SZ_512 - 1, | ||
47 | .flags = IORESOURCE_MEM, | ||
48 | }, | ||
49 | [2] = { | ||
50 | .start = AT91SAM9G45_ID_DMA, | ||
51 | .end = AT91SAM9G45_ID_DMA, | ||
52 | .flags = IORESOURCE_IRQ, | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | static struct platform_device at_hdmac_device = { | ||
57 | .name = "at_hdmac", | ||
58 | .id = -1, | ||
59 | .dev = { | ||
60 | .dma_mask = &hdmac_dmamask, | ||
61 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
62 | .platform_data = &atdma_pdata, | ||
63 | }, | ||
64 | .resource = hdmac_resources, | ||
65 | .num_resources = ARRAY_SIZE(hdmac_resources), | ||
66 | }; | ||
67 | |||
68 | void __init at91_add_device_hdmac(void) | ||
69 | { | ||
70 | dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask); | ||
71 | dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask); | ||
72 | platform_device_register(&at_hdmac_device); | ||
73 | } | ||
74 | #else | ||
75 | void __init at91_add_device_hdmac(void) {} | ||
76 | #endif | ||
77 | |||
78 | |||
79 | /* -------------------------------------------------------------------- | ||
32 | * USB Host (OHCI) | 80 | * USB Host (OHCI) |
33 | * -------------------------------------------------------------------- */ | 81 | * -------------------------------------------------------------------- */ |
34 | 82 | ||
@@ -1220,6 +1268,7 @@ void __init at91_add_device_serial(void) {} | |||
1220 | */ | 1268 | */ |
1221 | static int __init at91_add_standard_devices(void) | 1269 | static int __init at91_add_standard_devices(void) |
1222 | { | 1270 | { |
1271 | at91_add_device_hdmac(); | ||
1223 | at91_add_device_rtc(); | 1272 | at91_add_device_rtc(); |
1224 | at91_add_device_rtt(); | 1273 | at91_add_device_rtt(); |
1225 | at91_add_device_watchdog(); | 1274 | at91_add_device_watchdog(); |