diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-03-19 16:46:32 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-20 05:41:43 -0400 |
commit | b2f1df8d2fc14bf7e6d9d967043d4b60c2efd8dc (patch) | |
tree | 065282434bde6ef9b4357c042705c5fcef3782ea /arch/arm/mach-at91 | |
parent | c0206e228e34d8b414fcc63db45b831843adea06 (diff) | |
parent | 5cd9eb2736a572a9ef2689829f47ffd4262adc00 (diff) |
Merge branch 'renesas/timer' into next/timer
Conflicts:
arch/arm/mach-shmobile/timer.c
This resolves a nonobvious merge conflict between renesas
timer changes in the global timer changes with those
from the renesas soc branch and last minute bug fixes that
went into v3.3.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 8 |
2 files changed, 11 insertions, 16 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index b7582dd10dc3..96e2adcd5a84 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -38,10 +38,6 @@ | |||
38 | #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) | 38 | #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) |
39 | static u64 hdmac_dmamask = DMA_BIT_MASK(32); | 39 | static u64 hdmac_dmamask = DMA_BIT_MASK(32); |
40 | 40 | ||
41 | static struct at_dma_platform_data atdma_pdata = { | ||
42 | .nr_channels = 8, | ||
43 | }; | ||
44 | |||
45 | static struct resource hdmac_resources[] = { | 41 | static struct resource hdmac_resources[] = { |
46 | [0] = { | 42 | [0] = { |
47 | .start = AT91SAM9G45_BASE_DMA, | 43 | .start = AT91SAM9G45_BASE_DMA, |
@@ -56,12 +52,11 @@ static struct resource hdmac_resources[] = { | |||
56 | }; | 52 | }; |
57 | 53 | ||
58 | static struct platform_device at_hdmac_device = { | 54 | static struct platform_device at_hdmac_device = { |
59 | .name = "at_hdmac", | 55 | .name = "at91sam9g45_dma", |
60 | .id = -1, | 56 | .id = -1, |
61 | .dev = { | 57 | .dev = { |
62 | .dma_mask = &hdmac_dmamask, | 58 | .dma_mask = &hdmac_dmamask, |
63 | .coherent_dma_mask = DMA_BIT_MASK(32), | 59 | .coherent_dma_mask = DMA_BIT_MASK(32), |
64 | .platform_data = &atdma_pdata, | ||
65 | }, | 60 | }, |
66 | .resource = hdmac_resources, | 61 | .resource = hdmac_resources, |
67 | .num_resources = ARRAY_SIZE(hdmac_resources), | 62 | .num_resources = ARRAY_SIZE(hdmac_resources), |
@@ -69,9 +64,15 @@ static struct platform_device at_hdmac_device = { | |||
69 | 64 | ||
70 | void __init at91_add_device_hdmac(void) | 65 | void __init at91_add_device_hdmac(void) |
71 | { | 66 | { |
72 | dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask); | 67 | #if defined(CONFIG_OF) |
73 | dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask); | 68 | struct device_node *of_node = |
74 | platform_device_register(&at_hdmac_device); | 69 | of_find_node_by_name(NULL, "dma-controller"); |
70 | |||
71 | if (of_node) | ||
72 | of_node_put(of_node); | ||
73 | else | ||
74 | #endif | ||
75 | platform_device_register(&at_hdmac_device); | ||
75 | } | 76 | } |
76 | #else | 77 | #else |
77 | void __init at91_add_device_hdmac(void) {} | 78 | void __init at91_add_device_hdmac(void) {} |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 61908dce9784..9be71c11d0f0 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -33,10 +33,6 @@ | |||
33 | #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) | 33 | #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) |
34 | static u64 hdmac_dmamask = DMA_BIT_MASK(32); | 34 | static u64 hdmac_dmamask = DMA_BIT_MASK(32); |
35 | 35 | ||
36 | static struct at_dma_platform_data atdma_pdata = { | ||
37 | .nr_channels = 2, | ||
38 | }; | ||
39 | |||
40 | static struct resource hdmac_resources[] = { | 36 | static struct resource hdmac_resources[] = { |
41 | [0] = { | 37 | [0] = { |
42 | .start = AT91SAM9RL_BASE_DMA, | 38 | .start = AT91SAM9RL_BASE_DMA, |
@@ -51,12 +47,11 @@ static struct resource hdmac_resources[] = { | |||
51 | }; | 47 | }; |
52 | 48 | ||
53 | static struct platform_device at_hdmac_device = { | 49 | static struct platform_device at_hdmac_device = { |
54 | .name = "at_hdmac", | 50 | .name = "at91sam9rl_dma", |
55 | .id = -1, | 51 | .id = -1, |
56 | .dev = { | 52 | .dev = { |
57 | .dma_mask = &hdmac_dmamask, | 53 | .dma_mask = &hdmac_dmamask, |
58 | .coherent_dma_mask = DMA_BIT_MASK(32), | 54 | .coherent_dma_mask = DMA_BIT_MASK(32), |
59 | .platform_data = &atdma_pdata, | ||
60 | }, | 55 | }, |
61 | .resource = hdmac_resources, | 56 | .resource = hdmac_resources, |
62 | .num_resources = ARRAY_SIZE(hdmac_resources), | 57 | .num_resources = ARRAY_SIZE(hdmac_resources), |
@@ -64,7 +59,6 @@ static struct platform_device at_hdmac_device = { | |||
64 | 59 | ||
65 | void __init at91_add_device_hdmac(void) | 60 | void __init at91_add_device_hdmac(void) |
66 | { | 61 | { |
67 | dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask); | ||
68 | platform_device_register(&at_hdmac_device); | 62 | platform_device_register(&at_hdmac_device); |
69 | } | 63 | } |
70 | #else | 64 | #else |