// 16bit code to handle system clocks.
//
-// Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net>
+// Copyright (C) 2008-2010 Kevin O'Connor <kevin@koconnor.net>
// Copyright (C) 2002 MandrakeSoft S.A.
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
u32 ticks = (hours * 60 + minutes) * 60 + seconds;
ticks = ((u64)ticks * PIT_TICK_RATE) / PIT_TICK_INTERVAL;
SET_BDA(timer_counter, ticks);
- SET_BDA(timer_rollover, 0);
- enable_hwirq(0, entry_08);
- enable_hwirq(8, entry_70);
+ enable_hwirq(0, FUNC16(entry_08));
+ enable_hwirq(8, FUNC16(entry_70));
}
{
if (!msecs)
return GET_BDA(timer_counter);
- u32 kticks = DIV_ROUND_UP((u64)(msecs * PIT_TICK_RATE), PIT_TICK_INTERVAL);
+ u32 kticks = DIV_ROUND_UP((u64)msecs * PIT_TICK_RATE, PIT_TICK_INTERVAL);
u32 ticks = DIV_ROUND_UP(kticks, 1000);
return calc_future_timer_ticks(ticks);
}