Index: kernel/genarch/src/drivers/am335x/timer.c
===================================================================
--- kernel/genarch/src/drivers/am335x/timer.c	(revision d1cf4dc9f8f3174602eafbc26265f2fef6a1a9e9)
+++ kernel/genarch/src/drivers/am335x/timer.c	(revision 06c4609e117631c8fe0ad6ea39549b972a853e10)
@@ -56,5 +56,6 @@
 
 void
-am335x_timer_init(am335x_timer_t *timer, am335x_timer_id_t id, unsigned hz)
+am335x_timer_init(am335x_timer_t *timer, am335x_timer_id_t id, unsigned hz,
+    unsigned srcclk_hz)
 {
 	uintptr_t base_addr;
@@ -86,10 +87,8 @@
 	regs->tclr |= AM335x_TIMER_TCLR_AR_FLAG;
 
-	/* XXX Here we assume that the timer clock source
-	 * is running at 32 Khz but this is not always the
-	 * case; DMTIMER[2 - 7] can use the internal system 24 Mhz
-	 * clock source or an external clock also.
-	 */
-	unsigned const count = 0xFFFFFFFE - 32768 / hz;
+	/* Disable the emulation mode */
+	regs->tiocp_cfg |= AM335x_TIMER_TIOCPCFG_EMUFREE_FLAG;
+
+	unsigned const count = 0xFFFFFFFE - (srcclk_hz / hz);
 	regs->tcrr = count;
 	regs->tldr = count;
