summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-10 17:02:16 +0000
committer(no author) <(no author)@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-10 17:02:16 +0000
commitae3d814af1d240472a1fd4845cdb28b45719d859 (patch)
tree1aed95b4c6f89e2369fccc4669f4dd6ba9b7f5e1
parent9b752b403f60b4d64e4165d20877241abcbfe2d4 (diff)
enable clock of TC2 before configuring it
git-svn-id: https://svn.openpcd.org:2342/trunk@178 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
-rw-r--r--openpcd/firmware/src/picc/tc_fdt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openpcd/firmware/src/picc/tc_fdt.c b/openpcd/firmware/src/picc/tc_fdt.c
index 37194ad..041001d 100644
--- a/openpcd/firmware/src/picc/tc_fdt.c
+++ b/openpcd/firmware/src/picc/tc_fdt.c
@@ -31,6 +31,9 @@ void tc_fdt_init(void)
AT91C_PA26_TIOA2 | AT91C_PA27_TIOB2);
AT91F_PMC_EnablePeriphClock(AT91C_BASE_PMC,
((unsigned int) 1 << AT91C_ID_TC2));
+ /* Enable Clock for TC2 */
+ tcb->TCB_TC2.TC_CCR = AT91C_TC_CLKEN;
+
/* Clock XC1, Wave Mode, No automatic reset on RC comp
* TIOA2 in RA comp = set, TIOA2 on RC comp = clear,
* TIOB2 as input, EEVT = TIOB2, Reset/Trigger on EEVT */
personal git repositories of Harald Welte. Your mileage may vary