[lkml]   [2004]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH] sort out CLOCK_TICK_RATE usage, 2nd try [0/3]

The calculation of the counter values in drivers/input/misc/pcspkr.c is
incorrectly based on CLOCK_TICK_RATE. This goes unnoticed in i386
because there the system clock is driven by the same Programmable
Interval Timer chip as the speaker. But this doesn't hold true on
other archs, e.g. Alpha.

To solve this problem I made these tree patches:

1/3: introduce asm-*/8253pit.h, #defining PIT_TICK_RATE constant.
It seems this is not always the same value.
2/3: use PIT_TICK_RATE in *spkr.c and some other places where the
PIT is directly programmed.
3/3: use CLOCK_TICK_RATE where 1193180 was used in general timing

Tested on Alpha and i386. Many thanks to David Mosberger, Miles Bader
and Zwane Mwaikambo for their comments.

Arch maintainers please have a look whether I got the constants right or
if your architecture has a PIC or speaker at all.

Comments welcome.


| Thorsten Kranzkowski Internet: |
| Mobile: ++49 170 1876134 Snail: Kiebitzstr. 14, 49324 Melle, Germany |
| Ampr:, [] |
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:02    [W:0.077 / U:1.428 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site