aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-02-26 06:12:43 -0500
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-04-20 11:17:21 -0400
commit4abb367722c2dc06972658c8fad5b4763114477c (patch)
tree2332a446f57d8b68fd61c12b41505f18c11ee561 /arch/arm/mach-at91
parent8cf93b9ceaf4534cdeda5727782001f8fecb1688 (diff)
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')
-rw-r--r--arch/arm/mach-at91/at91sam9263.c10
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c20
2 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 7fae36502fbb..ed91c7e9f7c2 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -199,6 +199,16 @@ static struct clk_lookup periph_clocks_lookups[] = {
199 CLKDEV_CON_ID("pioC", &pioCDE_clk), 199 CLKDEV_CON_ID("pioC", &pioCDE_clk),
200 CLKDEV_CON_ID("pioD", &pioCDE_clk), 200 CLKDEV_CON_ID("pioD", &pioCDE_clk),
201 CLKDEV_CON_ID("pioE", &pioCDE_clk), 201 CLKDEV_CON_ID("pioE", &pioCDE_clk),
202 /* more usart lookup table for DT entries */
203 CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
204 CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk),
205 CLKDEV_CON_DEV_ID("usart", "fff90000.serial", &usart1_clk),
206 CLKDEV_CON_DEV_ID("usart", "fff94000.serial", &usart2_clk),
207 /* more tc lookup table for DT entries */
208 CLKDEV_CON_DEV_ID("t0_clk", "fff7c000.timer", &tcb_clk),
209 CLKDEV_CON_DEV_ID("hclk", "a00000.ohci", &ohci_clk),
210 CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk),
211 CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk),
202}; 212};
203 213
204static struct clk_lookup usart_clocks_lookups[] = { 214static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index dfe5bc006d5e..175e0009eaa9 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 = {
953 .num_resources = ARRAY_SIZE(tcb_resources), 953 .num_resources = ARRAY_SIZE(tcb_resources),
954}; 954};
955 955
956#if defined(CONFIG_OF)
957static struct of_device_id tcb_ids[] = {
958 { .compatible = "atmel,at91rm9200-tcb" },
959 { /*sentinel*/ }
960};
961#endif
962
956static void __init at91_add_device_tc(void) 963static void __init at91_add_device_tc(void)
957{ 964{
965#if defined(CONFIG_OF)
966 struct device_node *np;
967
968 np = of_find_matching_node(NULL, tcb_ids);
969 if (np) {
970 of_node_put(np);
971 return;
972 }
973#endif
974
958 platform_device_register(&at91sam9263_tcb_device); 975 platform_device_register(&at91sam9263_tcb_device);
959} 976}
960#else 977#else
@@ -1483,6 +1500,9 @@ void __init at91_add_device_serial(void) {}
1483 */ 1500 */
1484static int __init at91_add_standard_devices(void) 1501static int __init at91_add_standard_devices(void)
1485{ 1502{
1503 if (of_have_populated_dt())
1504 return 0;
1505
1486 at91_add_device_rtt(); 1506 at91_add_device_rtt();
1487 at91_add_device_watchdog(); 1507 at91_add_device_watchdog();
1488 at91_add_device_tc(); 1508 at91_add_device_tc();