Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
mips
kernel
i8253.c
Go to the documentation of this file.
1
/*
2
* i8253.c 8253/PIT functions
3
*
4
*/
5
#include <
linux/clockchips.h
>
6
#include <
linux/i8253.h
>
7
#include <linux/export.h>
8
#include <
linux/smp.h
>
9
#include <
linux/irq.h
>
10
11
#include <asm/time.h>
12
13
static
irqreturn_t
timer_interrupt
(
int
irq,
void
*
dev_id
)
14
{
15
i8253_clockevent
.event_handler(&i8253_clockevent);
16
17
return
IRQ_HANDLED
;
18
}
19
20
static
struct
irqaction
irq0 = {
21
.handler =
timer_interrupt
,
22
.flags =
IRQF_NOBALANCING
|
IRQF_TIMER
,
23
.name =
"timer"
24
};
25
26
void
__init
setup_pit_timer
(
void
)
27
{
28
clockevent_i8253_init
(
true
);
29
setup_irq
(0, &irq0);
30
}
31
32
static
int
__init
init_pit_clocksource(
void
)
33
{
34
if
(
num_possible_cpus
() > 1)
/* PIT does not scale! */
35
return
0;
36
37
return
clocksource_i8253_init
();
38
}
39
arch_initcall
(init_pit_clocksource);
Generated on Thu Jan 10 2013 13:11:10 for Linux Kernel by
1.8.2