1.1 --- a/src/sh4/timer.c Fri Dec 23 11:44:55 2005 +0000
1.2 +++ b/src/sh4/timer.c Mon Dec 26 10:48:55 2005 +0000
1.5 - * $Id: timer.c,v 1.1 2005-12-23 11:44:55 nkeynes Exp $
1.6 + * $Id: timer.c,v 1.2 2005-12-25 05:57:00 nkeynes Exp $
1.8 * SH4 Timer/Clock peripheral modules (CPG, TMU, RTC), combined together to
1.9 * keep things simple (they intertwine a bit).
1.11 MMIO_WRITE( TMU, reg, val );
1.14 -void TMU_run_slice( int microsecs )
1.15 +void TMU_run_slice( uint32_t nanosecs )
1.17 int tcr = MMIO_READ( TMU, TSTR );
1.18 - int cycles = microsecs * 16 * 200;
1.19 + int cycles = nanosecs / sh4_peripheral_period;
1.21 int count = cycles / timer_divider[0];
1.22 int *val = MMIO_REG( TMU, TCNT0 );