- remove bug

- the function timer_set_frequency ignored its parameter


git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@150 315a16e6-25f9-4109-90ae-ca3045a26c18
This commit is contained in:
stefan 2010-09-08 08:36:02 +00:00
parent a75d5932e5
commit 806ad22a8a

View file

@ -76,7 +76,7 @@ int timer_init(void)
return 0;
}
#define LATCH ((CLOCK_TICK_RATE + TIMER_FREQ/2) / TIMER_FREQ)
#define LATCH(f) ((CLOCK_TICK_RATE + f/2) / f)
int timer_set_frequency(unsigned int freq)
{
@ -85,9 +85,9 @@ int timer_set_frequency(unsigned int freq)
/* set the timer frequency */
outportb(0x43, 0x34);
udelay(10);
outportb(0x40, LATCH & 0xFF); /* low byte */
outportb(0x40, LATCH(freq) & 0xFF); /* low byte */
udelay(10);
outportb(0x40, LATCH >> 8); /* high byte */
outportb(0x40, LATCH(freq) >> 8); /* high byte */
curr_timer_freq = freq;