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
564c9dc8
Commit
564c9dc8
authored
Jun 29, 2005
by
Tony Lindgren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: OMAP: Updated OMAP timer to use generic ARM dyntick
Updated OMAP timer to use generic ARM dyntick
parent
69f6c75c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
29 deletions
+13
-29
arch/arm/mach-omap/omap1/time.c
arch/arm/mach-omap/omap1/time.c
+13
-29
No files found.
arch/arm/mach-omap/omap1/time.c
View file @
564c9dc8
...
...
@@ -180,8 +180,8 @@ static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id,
static
struct
irqaction
omap_mpu_timer_irq
=
{
.
name
=
"mpu timer"
,
.
flags
=
SA_INTERRUPT
,
.
handler
=
omap_mpu_timer_interrupt
.
flags
=
SA_INTERRUPT
|
SA_TIMER
,
.
handler
=
omap_mpu_timer_interrupt
,
};
static
unsigned
long
omap_mpu_timer1_overflows
;
...
...
@@ -195,7 +195,7 @@ static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id,
static
struct
irqaction
omap_mpu_timer1_irq
=
{
.
name
=
"mpu timer1 overflow"
,
.
flags
=
SA_INTERRUPT
,
.
handler
=
omap_mpu_timer1_interrupt
.
handler
=
omap_mpu_timer1_interrupt
,
};
static
__init
void
omap_init_mpu_timer
(
void
)
...
...
@@ -260,7 +260,6 @@ static unsigned modulo_count = 0; /* Counts 1/HZ units */
* so with HZ = 100, TVR = 327.68.
*/
#define OMAP_32K_TIMER_TICK_PERIOD ((32768 / HZ) - 1)
#define MAX_SKIP_JIFFIES 25
#define TIMER_32K_SYNCHRONIZED 0xfffbc410
#define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \
...
...
@@ -362,26 +361,14 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id,
#ifdef CONFIG_NO_IDLE_HZ
/*
* Programs the next timer interrupt needed. Called when dynamic tick is
* enabled, and to reprogram the ticks to skip from pm_idle.
* enabled, and to reprogram the ticks to skip from pm_idle. Note that
* we can keep the timer continuous, and don't need to set it to run in
* one-shot mode. This is because the timer will get reprogrammed again
* after next interrupt.
*/
void
omap_32k_timer_
next_dyn_tick_interrupt
(
void
)
void
omap_32k_timer_
reprogram
(
unsigned
long
next_tick
)
{
unsigned
long
next
;
if
(
!
system_timer
->
dyn_tick
->
state
&
DYN_TICK_ENABLED
)
return
;
next
=
next_timer_interrupt
()
-
jiffies
;
if
(
next
>
MAX_SKIP_JIFFIES
)
next
=
MAX_SKIP_JIFFIES
;
/*
* We can keep the timer continuous, no need to set it to
* run in one-shot mode. When using dynamic tick, the timer
* will get reprogrammed again after the next interrupt.
*/
omap_32k_timer_start
(
JIFFIES_TO_HW_TICKS
(
next
,
32768
)
+
1
);
omap_32k_timer_start
(
JIFFIES_TO_HW_TICKS
(
next_tick
,
32768
)
+
1
);
}
static
struct
irqaction
omap_32k_timer_irq
;
...
...
@@ -389,7 +376,7 @@ extern struct timer_update_handler timer_update;
static
int
omap_32k_timer_enable_dyn_tick
(
void
)
{
omap_32k_timer_next_dyn_tick_interrupt
();
/* No need to reprogram timer, just use the next interrupt */
return
0
;
}
...
...
@@ -402,15 +389,15 @@ static int omap_32k_timer_disable_dyn_tick(void)
static
struct
dyn_tick_timer
omap_dyn_tick_timer
=
{
.
enable
=
omap_32k_timer_enable_dyn_tick
,
.
disable
=
omap_32k_timer_disable_dyn_tick
,
.
reprogram
=
omap_32k_timer_
next_dyn_tick_interrupt
,
.
reprogram
=
omap_32k_timer_
reprogram
,
.
handler
=
omap_32k_timer_interrupt
,
};
#endif
/* CONFIG_NO_IDLE_HZ */
static
struct
irqaction
omap_32k_timer_irq
=
{
.
name
=
"32KHz timer"
,
.
flags
=
SA_INTERRUPT
,
.
handler
=
omap_32k_timer_interrupt
.
flags
=
SA_INTERRUPT
|
SA_TIMER
,
.
handler
=
omap_32k_timer_interrupt
,
};
static
__init
void
omap_init_32k_timer
(
void
)
...
...
@@ -418,9 +405,6 @@ static __init void omap_init_32k_timer(void)
#ifdef CONFIG_NO_IDLE_HZ
omap_timer
.
dyn_tick
=
&
omap_dyn_tick_timer
;
/* Tell __do_irq not to duplicate timer ticks with dyn-tick */
omap_32k_timer_irq
.
flags
|=
SA_TIMER
;
#endif
setup_irq
(
INT_OS_TIMER
,
&
omap_32k_timer_irq
);
...
...
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