summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tcc780x/system-tcc780x.c
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2009-03-30 21:15:15 +0000
committerRob Purchase <shotofadds@rockbox.org>2009-03-30 21:15:15 +0000
commit75b37696fba2e0c5c1e9f28449fda7d6c7f9a9ac (patch)
tree30d308bcc748733e5eefd7684aafa2d7e62c67a1 /firmware/target/arm/tcc780x/system-tcc780x.c
parent8739af490e03e243848720c5987f566a56479136 (diff)
downloadrockbox-75b37696fba2e0c5c1e9f28449fda7d6c7f9a9ac.tar.gz
rockbox-75b37696fba2e0c5c1e9f28449fda7d6c7f9a9ac.zip
TCC78x: Implement the user timer, rework some of the timer register #defines, and use udelay() instead of the hacky sleep_ms() in the D2 LCD driver. Doom works now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20585 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc780x/system-tcc780x.c')
-rw-r--r--firmware/target/arm/tcc780x/system-tcc780x.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/target/arm/tcc780x/system-tcc780x.c b/firmware/target/arm/tcc780x/system-tcc780x.c
index 77ae3a4cd9..ab8a6cf218 100644
--- a/firmware/target/arm/tcc780x/system-tcc780x.c
+++ b/firmware/target/arm/tcc780x/system-tcc780x.c
@@ -229,11 +229,14 @@ static void clock_init(void)
229 "nop \n\t" 229 "nop \n\t"
230 ); 230 );
231 231
232 /* configure PCK_TCT to 2Mhz (clock source 4 (Xin) divided by 6) */ 232 /* Configure PCK_TCT to 2Mhz (Xin divided by 6) */
233 PCLK_TCT = PCK_EN | (CKSEL_XIN<<24) | 5; 233 PCLK_TCT = PCK_EN | (CKSEL_XIN<<24) | 5;
234 234
235 /* set TC32 timer to XIN divided by 12 (1MHz) */ 235 /* Set TC32 timer to be our USEC_TIMER (Xin divided by 12 = 1MHz) */
236 TC32EN = (1<<24) | 11; 236 TC32EN = (1<<24) | 11;
237
238 /* Unmask common timer IRQ (shared by tick and user timer) */
239 IEN |= TIMER0_IRQ_MASK;
237} 240}
238#endif 241#endif
239 242