Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
dd3db6eb
Commit
dd3db6eb
authored
Nov 01, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] i8253: Cleanup.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
9aa4cc11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
arch/mips/kernel/i8253.c
arch/mips/kernel/i8253.c
+12
-11
No files found.
arch/mips/kernel/i8253.c
View file @
dd3db6eb
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include <asm/delay.h>
#include <asm/delay.h>
#include <asm/i8253.h>
#include <asm/i8253.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/time.h>
static
DEFINE_SPINLOCK
(
i8253_lock
);
static
DEFINE_SPINLOCK
(
i8253_lock
);
...
@@ -87,11 +88,10 @@ struct clock_event_device pit_clockevent = {
...
@@ -87,11 +88,10 @@ struct clock_event_device pit_clockevent = {
.
features
=
CLOCK_EVT_FEAT_PERIODIC
|
CLOCK_EVT_FEAT_ONESHOT
,
.
features
=
CLOCK_EVT_FEAT_PERIODIC
|
CLOCK_EVT_FEAT_ONESHOT
,
.
set_mode
=
init_pit_timer
,
.
set_mode
=
init_pit_timer
,
.
set_next_event
=
pit_next_event
,
.
set_next_event
=
pit_next_event
,
.
shift
=
32
,
.
irq
=
0
,
.
irq
=
0
,
};
};
irqreturn_t
timer_interrupt
(
int
irq
,
void
*
dev_id
)
static
irqreturn_t
timer_interrupt
(
int
irq
,
void
*
dev_id
)
{
{
pit_clockevent
.
event_handler
(
&
pit_clockevent
);
pit_clockevent
.
event_handler
(
&
pit_clockevent
);
...
@@ -111,19 +111,20 @@ static struct irqaction irq0 = {
...
@@ -111,19 +111,20 @@ static struct irqaction irq0 = {
*/
*/
void
__init
setup_pit_timer
(
void
)
void
__init
setup_pit_timer
(
void
)
{
{
struct
clock_event_device
*
cd
=
&
pit_clockevent
;
unsigned
int
cpu
=
smp_processor_id
();
/*
/*
* Start pit with the boot cpu mask and make it global after the
* Start pit with the boot cpu mask and make it global after the
* IO_APIC has been initialized.
* IO_APIC has been initialized.
*/
*/
pit_clockevent
.
cpumask
=
cpumask_of_cpu
(
0
);
cd
->
cpumask
=
cpumask_of_cpu
(
cpu
);
pit_clockevent
.
mult
=
div_sc
(
CLOCK_TICK_RATE
,
NSEC_PER_SEC
,
32
);
clockevent_set_clock
(
cd
,
CLOCK_TICK_RATE
);
pit_clockevent
.
max_delta_ns
=
cd
->
max_delta_ns
=
clockevent_delta2ns
(
0x7FFF
,
cd
);
clockevent_delta2ns
(
0x7FFF
,
&
pit_clockevent
);
cd
->
min_delta_ns
=
clockevent_delta2ns
(
0xF
,
cd
);
pit_clockevent
.
min_delta_ns
=
clockevents_register_device
(
cd
);
clockevent_delta2ns
(
0xF
,
&
pit_clockevent
);
clockevents_register_device
(
&
pit_clockevent
);
irq0
.
mask
=
cpumask_of_cpu
(
cpu
);
irq0
.
mask
=
cpumask_of_cpu
(
0
);
setup_irq
(
0
,
&
irq0
);
setup_irq
(
0
,
&
irq0
);
}
}
...
...
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