aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/mach-at32ap/at32ap700x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/mach-at32ap/at32ap700x.c')
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 6302bfd58514..22c302ad9b3f 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -606,19 +606,32 @@ static inline void set_ebi_sfr_bits(u32 mask)
606} 606}
607 607
608/* -------------------------------------------------------------------- 608/* --------------------------------------------------------------------
609 * System Timer/Counter (TC) 609 * Timer/Counter (TC)
610 * -------------------------------------------------------------------- */ 610 * -------------------------------------------------------------------- */
611static struct resource at32_systc0_resource[] = { 611
612static struct resource at32_tcb0_resource[] = {
612 PBMEM(0xfff00c00), 613 PBMEM(0xfff00c00),
613 IRQ(22), 614 IRQ(22),
614}; 615};
615struct platform_device at32_systc0_device = { 616static struct platform_device at32_tcb0_device = {
616 .name = "systc", 617 .name = "atmel_tcb",
617 .id = 0, 618 .id = 0,
618 .resource = at32_systc0_resource, 619 .resource = at32_tcb0_resource,
619 .num_resources = ARRAY_SIZE(at32_systc0_resource), 620 .num_resources = ARRAY_SIZE(at32_tcb0_resource),
621};
622DEV_CLK(t0_clk, at32_tcb0, pbb, 3);
623
624static struct resource at32_tcb1_resource[] = {
625 PBMEM(0xfff01000),
626 IRQ(23),
627};
628static struct platform_device at32_tcb1_device = {
629 .name = "atmel_tcb",
630 .id = 1,
631 .resource = at32_tcb1_resource,
632 .num_resources = ARRAY_SIZE(at32_tcb1_resource),
620}; 633};
621DEV_CLK(pclk, at32_systc0, pbb, 3); 634DEV_CLK(t0_clk, at32_tcb1, pbb, 4);
622 635
623/* -------------------------------------------------------------------- 636/* --------------------------------------------------------------------
624 * PIO 637 * PIO
@@ -670,7 +683,8 @@ void __init at32_add_system_devices(void)
670 platform_device_register(&pdc_device); 683 platform_device_register(&pdc_device);
671 platform_device_register(&dmaca0_device); 684 platform_device_register(&dmaca0_device);
672 685
673 platform_device_register(&at32_systc0_device); 686 platform_device_register(&at32_tcb0_device);
687 platform_device_register(&at32_tcb1_device);
674 688
675 platform_device_register(&pio0_device); 689 platform_device_register(&pio0_device);
676 platform_device_register(&pio1_device); 690 platform_device_register(&pio1_device);
@@ -1737,7 +1751,8 @@ struct clk *at32_clock_list[] = {
1737 &pio2_mck, 1751 &pio2_mck,
1738 &pio3_mck, 1752 &pio3_mck,
1739 &pio4_mck, 1753 &pio4_mck,
1740 &at32_systc0_pclk, 1754 &at32_tcb0_t0_clk,
1755 &at32_tcb1_t0_clk,
1741 &atmel_usart0_usart, 1756 &atmel_usart0_usart,
1742 &atmel_usart1_usart, 1757 &atmel_usart1_usart,
1743 &atmel_usart2_usart, 1758 &atmel_usart2_usart,