diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-01-19 04:13:40 -0500 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-03-01 07:38:48 -0500 |
commit | 3a61a5dae49bf3d1afb7f75c8acb3607f26565af (patch) | |
tree | 53616025b0d6ff2af767b3f3ca62704774ce09e5 /arch/arm/mach-at91/at91sam9g45_devices.c | |
parent | 298312971b2fe8b922a1a15e0a6f5b4da89677d8 (diff) |
ARM: at91/tc: add device tree support to atmel_tclib
Device tree support added to atmel_tclib: the generic Timer Counter
library. This is used by the clocksource/clockevent driver tcb_clksrc.
The current DT enabled platforms are also modified to use it:
- .dtsi files are modified to add Timer Counter Block entries
- alias are created to allow identification of each block
- clkdev lookup tables are added for clocks identification.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9g45_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index aee595013d33..4320b2096789 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1090,8 +1090,25 @@ static struct platform_device at91sam9g45_tcb1_device = { | |||
1090 | .num_resources = ARRAY_SIZE(tcb1_resources), | 1090 | .num_resources = ARRAY_SIZE(tcb1_resources), |
1091 | }; | 1091 | }; |
1092 | 1092 | ||
1093 | #if defined(CONFIG_OF) | ||
1094 | static struct of_device_id tcb_ids[] = { | ||
1095 | { .compatible = "atmel,at91rm9200-tcb" }, | ||
1096 | { /*sentinel*/ } | ||
1097 | }; | ||
1098 | #endif | ||
1099 | |||
1093 | static void __init at91_add_device_tc(void) | 1100 | static void __init at91_add_device_tc(void) |
1094 | { | 1101 | { |
1102 | #if defined(CONFIG_OF) | ||
1103 | struct device_node *np; | ||
1104 | |||
1105 | np = of_find_matching_node(NULL, tcb_ids); | ||
1106 | if (np) { | ||
1107 | of_node_put(np); | ||
1108 | return; | ||
1109 | } | ||
1110 | #endif | ||
1111 | |||
1095 | platform_device_register(&at91sam9g45_tcb0_device); | 1112 | platform_device_register(&at91sam9g45_tcb0_device); |
1096 | platform_device_register(&at91sam9g45_tcb1_device); | 1113 | platform_device_register(&at91sam9g45_tcb1_device); |
1097 | } | 1114 | } |