diff options
| author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-02-26 19:12:43 +0800 | 
|---|---|---|
| committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-04-20 23:17:21 +0800 | 
| commit | 4abb367722c2dc06972658c8fad5b4763114477c (patch) | |
| tree | 2332a446f57d8b68fd61c12b41505f18c11ee561 /arch/arm/mach-at91/at91sam9263_devices.c | |
| parent | 8cf93b9ceaf4534cdeda5727782001f8fecb1688 (diff) | |
| download | olio-linux-3.10-4abb367722c2dc06972658c8fad5b4763114477c.tar.xz olio-linux-3.10-4abb367722c2dc06972658c8fad5b4763114477c.zip  | |
ARM: at91: add at91sam9263 DT support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263_devices.c')
| -rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 20 | 
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index dfe5bc006d5..175e0009eaa 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c @@ -953,8 +953,25 @@ static struct platform_device at91sam9263_tcb_device = {  	.num_resources	= ARRAY_SIZE(tcb_resources),  }; +#if defined(CONFIG_OF) +static struct of_device_id tcb_ids[] = { +	{ .compatible = "atmel,at91rm9200-tcb" }, +	{ /*sentinel*/ } +}; +#endif +  static void __init at91_add_device_tc(void)  { +#if defined(CONFIG_OF) +	struct device_node *np; + +	np = of_find_matching_node(NULL, tcb_ids); +	if (np) { +		of_node_put(np); +		return; +	} +#endif +  	platform_device_register(&at91sam9263_tcb_device);  }  #else @@ -1483,6 +1500,9 @@ void __init at91_add_device_serial(void) {}   */  static int __init at91_add_standard_devices(void)  { +	if (of_have_populated_dt()) +		return 0; +  	at91_add_device_rtt();  	at91_add_device_watchdog();  	at91_add_device_tc();  |