diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2011-10-10 16:50:43 +0200 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-02-29 18:20:39 +0100 |
commit | 851c52b23c5c27047f1438684750e28c44d73191 (patch) | |
tree | 9c316488967f0cf7df4d5cf6a2907b1f5a1866e9 | |
parent | b9eaa81af2fdc0b710c7afb7d3e425ea27133b72 (diff) | |
download | linux-3.10-851c52b23c5c27047f1438684750e28c44d73191.tar.gz linux-3.10-851c52b23c5c27047f1438684750e28c44d73191.tar.bz2 linux-3.10-851c52b23c5c27047f1438684750e28c44d73191.zip |
ARM: at91/dma: DMA controller registering with DT support
Device tree support on at91sam9g45 family SoC. Only call
platform_device_register() if no dma-controller node is
found in device tree.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 07708d42268..96e2adcd5a8 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c @@ -64,7 +64,15 @@ static struct platform_device at_hdmac_device = { void __init at91_add_device_hdmac(void) { - platform_device_register(&at_hdmac_device); +#if defined(CONFIG_OF) + struct device_node *of_node = + of_find_node_by_name(NULL, "dma-controller"); + + if (of_node) + of_node_put(of_node); + else +#endif + platform_device_register(&at_hdmac_device); } #else void __init at91_add_device_hdmac(void) {} |