From b5e39c15a55b3e46643bf3b46bb6c664b6cb50a4 Mon Sep 17 00:00:00 2001 From: Vitja Makarov Date: Fri, 4 Sep 2009 09:36:53 +0000 Subject: iaudio7: Implement udelay, mostly based on D2 port, except Z-clock initialization git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22620 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/tcc77x/system-tcc77x.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'firmware/target/arm/tcc77x/system-tcc77x.c') diff --git a/firmware/target/arm/tcc77x/system-tcc77x.c b/firmware/target/arm/tcc77x/system-tcc77x.c index 90e53afb14..29227b52a3 100644 --- a/firmware/target/arm/tcc77x/system-tcc77x.c +++ b/firmware/target/arm/tcc77x/system-tcc77x.c @@ -187,6 +187,14 @@ static void clock_init(void) "nop \n\t" "nop \n\t" ); + + /* Enable Z-Clock */ + PCLKCFG5 |= (1<<31) | (4<<28); /* Timer Z-Clock enable, XIN direct*/ + + /* Set TC32 timer to be our USEC_TIMER (Xin divided by 12 = 1MHz) */ + TC32MCNT = 0; + TC32LDV = 0; + TC32EN = (1<<24) | 11; } static void cpu_init(void) -- cgit v1.2.3