Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
52161621
Commit
52161621
authored
May 10, 2004
by
Andrew Morton
Committed by
Linus Torvalds
May 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] CLOCK_TICK_RATE: use PIT_TICK_RATE in *spkr.c
From: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>
parent
80c44e42
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
arch/x86_64/kernel/time.c
arch/x86_64/kernel/time.c
+4
-3
drivers/input/misc/98spkr.c
drivers/input/misc/98spkr.c
+2
-1
drivers/input/misc/Kconfig
drivers/input/misc/Kconfig
+1
-1
drivers/input/misc/pcspkr.c
drivers/input/misc/pcspkr.c
+2
-1
No files found.
arch/x86_64/kernel/time.c
View file @
52161621
...
...
@@ -27,6 +27,7 @@
#include <linux/sysdev.h>
#include <linux/bcd.h>
#include <linux/kallsyms.h>
#include <asm/8253pit.h>
#include <asm/pgtable.h>
#include <asm/vsyscall.h>
#include <asm/timex.h>
...
...
@@ -54,7 +55,7 @@ static int nohpet __initdata = 0;
unsigned
int
cpu_khz
;
/* TSC clocks / usec, not used here */
unsigned
long
hpet_period
;
/* fsecs / HPET clock */
unsigned
long
hpet_tick
;
/* HPET clocks / interrupt */
unsigned
long
vxtime_hz
=
1193182
;
unsigned
long
vxtime_hz
=
PIT_TICK_RATE
;
int
report_lost_ticks
;
/* command line option */
unsigned
long
long
monotonic_base
;
...
...
@@ -600,8 +601,8 @@ static unsigned int __init pit_calibrate_tsc(void)
outb
((
inb
(
0x61
)
&
~
0x02
)
|
0x01
,
0x61
);
outb
(
0xb0
,
0x43
);
outb
((
1193182
/
(
1000
/
50
))
&
0xff
,
0x42
);
outb
((
1193182
/
(
1000
/
50
))
>>
8
,
0x42
);
outb
((
PIT_TICK_RATE
/
(
1000
/
50
))
&
0xff
,
0x42
);
outb
((
PIT_TICK_RATE
/
(
1000
/
50
))
>>
8
,
0x42
);
rdtscll
(
start
);
sync_core
();
while
((
inb
(
0x61
)
&
0x20
)
==
0
);
...
...
drivers/input/misc/98spkr.c
View file @
52161621
...
...
@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
#include <asm/8253pit.h>
#include <asm/io.h>
MODULE_AUTHOR
(
"Osamu Tomita <tomita@cinet.co.jp>"
);
...
...
@@ -44,7 +45,7 @@ static int spkr98_event(struct input_dev *dev, unsigned int type, unsigned int c
}
if
(
value
>
20
&&
value
<
32767
)
count
=
CLOCK
_TICK_RATE
/
value
;
count
=
PIT
_TICK_RATE
/
value
;
spin_lock_irqsave
(
&
i8253_beep_lock
,
flags
);
...
...
drivers/input/misc/Kconfig
View file @
52161621
...
...
@@ -14,7 +14,7 @@ config INPUT_MISC
config INPUT_PCSPKR
tristate "PC Speaker support"
depends on INPUT && INPUT_MISC
depends on
(ALPHA || X86 || X86_64 || MIPS) &&
INPUT && INPUT_MISC
help
Say Y here if you want the standard PC Speaker to be used for
bells and whistles.
...
...
drivers/input/misc/pcspkr.c
View file @
52161621
...
...
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
#include <asm/8253pit.h>
#include <asm/io.h>
MODULE_AUTHOR
(
"Vojtech Pavlik <vojtech@ucw.cz>"
);
...
...
@@ -43,7 +44,7 @@ static int pcspkr_event(struct input_dev *dev, unsigned int type, unsigned int c
}
if
(
value
>
20
&&
value
<
32767
)
count
=
CLOCK
_TICK_RATE
/
value
;
count
=
PIT
_TICK_RATE
/
value
;
spin_lock_irqsave
(
&
i8253_beep_lock
,
flags
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment