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
nexedi
linux
Commits
d0b53c03
Commit
d0b53c03
authored
Jun 17, 2004
by
Deepak Saxena
Committed by
Deepak Saxena
Jun 17, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Consolidate various ARM timer fns. into single timer_tick() call.
Signed-off-by:
Deepak Saxena
<
dsaxena@plexity.net
>
parent
9ab6f322
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
36 additions
and
74 deletions
+36
-74
arch/arm/kernel/time.c
arch/arm/kernel/time.c
+16
-8
arch/arm/mach-clps711x/time.c
arch/arm/mach-clps711x/time.c
+1
-3
arch/arm/mach-clps7500/core.c
arch/arm/mach-clps7500/core.c
+2
-3
arch/arm/mach-ebsa110/core.c
arch/arm/mach-ebsa110/core.c
+1
-3
arch/arm/mach-epxa10db/time.c
arch/arm/mach-epxa10db/time.c
+1
-3
arch/arm/mach-footbridge/time.c
arch/arm/mach-footbridge/time.c
+2
-11
arch/arm/mach-integrator/time.c
arch/arm/mach-integrator/time.c
+1
-3
arch/arm/mach-iop3xx/iop321-time.c
arch/arm/mach-iop3xx/iop321-time.c
+1
-1
arch/arm/mach-ixp4xx/common.c
arch/arm/mach-ixp4xx/common.c
+1
-1
arch/arm/mach-lh7a40x/time.c
arch/arm/mach-lh7a40x/time.c
+1
-4
arch/arm/mach-omap/time.c
arch/arm/mach-omap/time.c
+1
-3
arch/arm/mach-pxa/time.c
arch/arm/mach-pxa/time.c
+1
-5
arch/arm/mach-rpc/riscpc.c
arch/arm/mach-rpc/riscpc.c
+1
-3
arch/arm/mach-s3c2410/time.c
arch/arm/mach-s3c2410/time.c
+1
-6
arch/arm/mach-sa1100/time.c
arch/arm/mach-sa1100/time.c
+1
-5
arch/arm/mach-shark/core.c
arch/arm/mach-shark/core.c
+1
-3
arch/arm/mach-versatile/core.c
arch/arm/mach-versatile/core.c
+1
-3
include/asm-arm/mach/time.h
include/asm-arm/mach/time.h
+2
-6
No files found.
arch/arm/kernel/time.c
View file @
d0b53c03
...
...
@@ -52,15 +52,11 @@ EXPORT_SYMBOL(rtc_lock);
/* change this if you have some constant time drift */
#define USECS_PER_JIFFY (1000000/HZ)
static
int
dummy_set_rtc
(
void
)
{
return
0
;
}
/*
* hook for setting the RTC's idea of the current time.
*/
int
(
*
set_rtc
)(
void
)
=
dummy_set_rtc
;
int
(
*
set_rtc
)(
void
);
static
unsigned
long
dummy_gettimeoffset
(
void
)
{
...
...
@@ -86,7 +82,7 @@ unsigned long long __attribute__((weak)) sched_clock(void)
/*
* Handle kernel profile stuff...
*/
void
do_profile
(
struct
pt_regs
*
regs
)
static
inline
void
do_profile
(
struct
pt_regs
*
regs
)
{
profile_hook
(
regs
);
...
...
@@ -116,7 +112,7 @@ static unsigned long next_rtc_update;
* called as close as possible to 500 ms before the new second
* starts.
*/
void
do_set_rtc
(
void
)
static
inline
void
do_set_rtc
(
void
)
{
if
(
time_status
&
STA_UNSYNC
||
set_rtc
==
NULL
)
return
;
...
...
@@ -240,7 +236,8 @@ device_initcall(leds_init);
EXPORT_SYMBOL
(
leds_event
);
#endif
void
do_leds
(
void
)
#ifdef CONFIG_LEDS_TIMER
static
inline
void
do_leds
(
void
)
{
static
unsigned
int
count
=
50
;
...
...
@@ -249,6 +246,9 @@ void do_leds(void)
leds_event
(
led_timer
);
}
}
#else
#define do_leds()
#endif
void
do_gettimeofday
(
struct
timeval
*
tv
)
{
...
...
@@ -315,6 +315,14 @@ int do_settimeofday(struct timespec *tv)
EXPORT_SYMBOL
(
do_settimeofday
);
void
timer_tick
(
struct
pt_regs
*
regs
)
{
do_profile
(
regs
);
do_leds
();
do_set_rtc
();
do_timer
(
regs
);
}
void
(
*
init_arch_time
)(
void
);
void
__init
time_init
(
void
)
...
...
arch/arm/mach-clps711x/time.c
View file @
d0b53c03
...
...
@@ -49,9 +49,7 @@ static unsigned long clps711x_gettimeoffset(void)
static
irqreturn_t
p720t_timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
do_leds
();
do_timer
(
regs
);
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-clps7500/core.c
View file @
d0b53c03
...
...
@@ -271,10 +271,9 @@ extern void ioctime_init(void);
static
irqreturn_t
clps7500_timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
do_timer
(
regs
);
do_set_rtc
();
do_profile
(
regs
);
timer_tick
(
regs
);
/* Why not using do_leds interface?? */
{
/* Twinkle the lights. */
static
int
count
,
state
=
0xff00
;
...
...
arch/arm/mach-ebsa110/core.c
View file @
d0b53c03
...
...
@@ -160,9 +160,7 @@ ebsa110_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
__raw_writeb
(
count
&
0xff
,
PIT_T1
);
__raw_writeb
(
count
>>
8
,
PIT_T1
);
do_leds
();
do_timer
(
regs
);
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-epxa10db/time.c
View file @
d0b53c03
...
...
@@ -47,9 +47,7 @@ epxa10db_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
// ...clear the interrupt
*
TIMER0_CR
(
IO_ADDRESS
(
EXC_TIMER00_BASE
))
|=
TIMER0_CR_CI_MSK
;
do_leds
();
do_timer
(
regs
);
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-footbridge/time.c
View file @
d0b53c03
...
...
@@ -83,12 +83,7 @@ static unsigned long isa_gettimeoffset(void)
static
irqreturn_t
isa_timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
if
(
machine_is_netwinder
())
do_leds
();
do_timer
(
regs
);
do_set_rtc
();
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
@@ -206,11 +201,7 @@ timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
*
CSR_TIMER1_CLR
=
0
;
/* Do the LEDs things */
do_leds
();
do_timer
(
regs
);
do_set_rtc
();
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-integrator/time.c
View file @
d0b53c03
...
...
@@ -139,9 +139,7 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
// ...clear the interrupt
timer1
->
TimerClear
=
1
;
do_leds
();
do_timer
(
regs
);
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-iop3xx/iop321-time.c
View file @
d0b53c03
...
...
@@ -63,7 +63,7 @@ iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
asm
volatile
(
"mcr p6, 0, %0, c6, c1, 0"
:
:
"r"
(
tisr
));
do_timer
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-ixp4xx/common.c
View file @
d0b53c03
...
...
@@ -228,7 +228,7 @@ static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs
* Catch up with the real idea of time
*/
do
{
do_timer
(
regs
);
timer_tick
(
regs
);
last_jiffy_time
+=
LATCH
;
}
while
((
*
IXP4XX_OSTS
-
last_jiffy_time
)
>
LATCH
);
...
...
arch/arm/mach-lh7a40x/time.c
View file @
d0b53c03
...
...
@@ -41,10 +41,7 @@ static irqreturn_t
lh7a40x_timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
TIMER_EOI
=
0
;
do_profile
(
regs
);
do_leds
();
do_set_rtc
();
do_timer
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-omap/time.c
View file @
d0b53c03
...
...
@@ -183,9 +183,7 @@ omap_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
ilatency
=
MPUTICKS_PER_SEC
/
100
-
read_mputimer2
();
systimer_mark
=
now
-
ilatency
;
do_leds
();
do_timer
(
regs
);
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-pxa/time.c
View file @
d0b53c03
...
...
@@ -74,8 +74,6 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
int
next_match
;
do_profile
(
regs
);
/* Loop until we get ahead of the free running timer.
* This ensures an exact clock tick count and time accuracy.
* IRQs are disabled inside the loop to ensure coherence between
...
...
@@ -92,9 +90,7 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
* exactly one tick period which should be a pretty rare event.
*/
do
{
do_leds
();
do_set_rtc
();
do_timer
(
regs
);
timer_tick
(
regs
);
OSSR
=
OSSR_M0
;
/* Clear match on timer 0 */
next_match
=
(
OSMR0
+=
LATCH
);
}
while
(
(
signed
long
)(
next_match
-
OSCR
)
<=
8
);
...
...
arch/arm/mach-rpc/riscpc.c
View file @
d0b53c03
...
...
@@ -88,9 +88,7 @@ void __init rpc_map_io(void)
static
irqreturn_t
rpc_timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
do_timer
(
regs
);
do_set_rtc
();
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-s3c2410/time.c
View file @
d0b53c03
...
...
@@ -74,12 +74,7 @@ static unsigned long s3c2410_gettimeoffset (void)
static
irqreturn_t
s3c2410_timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
do_leds
();
do_timer
(
regs
);
do_set_rtc
();
//s3c2410_rtc_check();
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-sa1100/time.c
View file @
d0b53c03
...
...
@@ -78,15 +78,11 @@ sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
unsigned
int
next_match
;
do
{
do_leds
();
do_timer
(
regs
);
timer_tick
(
regs
);
OSSR
=
OSSR_M0
;
/* Clear match on timer 0 */
next_match
=
(
OSMR0
+=
LATCH
);
do_set_rtc
();
}
while
((
signed
long
)(
next_match
-
OSCR
)
<=
0
);
do_profile
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-shark/core.c
View file @
d0b53c03
...
...
@@ -35,9 +35,7 @@ static void __init shark_map_io(void)
static
irqreturn_t
shark_timer_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
do_leds
();
do_timer
(
regs
);
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
arch/arm/mach-versatile/core.c
View file @
d0b53c03
...
...
@@ -606,9 +606,7 @@ static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_re
// ...clear the interrupt
timer0
->
TimerClear
=
1
;
do_leds
();
do_timer
(
regs
);
do_profile
(
regs
);
timer_tick
(
regs
);
return
IRQ_HANDLED
;
}
...
...
include/asm-arm/mach/time.h
View file @
d0b53c03
...
...
@@ -12,13 +12,9 @@
extern
void
(
*
init_arch_time
)(
void
);
void
do_set_rtc
(
void
);
void
do_profile
(
struct
pt_regs
*
);
void
do_leds
(
void
);
extern
int
(
*
set_rtc
)(
void
);
extern
unsigned
long
(
*
gettimeoffset
)(
void
);
void
timer_tick
(
struct
pt_regs
*
);
#endif
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