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
69e634f1
Commit
69e634f1
authored
Mar 12, 2008
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] Clocksource: Only install r4k counter as clocksource if present.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
127f1668
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
arch/mips/kernel/csrc-r4k.c
arch/mips/kernel/csrc-r4k.c
+6
-1
include/asm-mips/time.h
include/asm-mips/time.h
+3
-2
No files found.
arch/mips/kernel/csrc-r4k.c
View file @
69e634f1
...
...
@@ -22,12 +22,17 @@ static struct clocksource clocksource_mips = {
.
flags
=
CLOCK_SOURCE_IS_CONTINUOUS
,
};
void
__init
init_mips_clocksource
(
void
)
int
__init
init_mips_clocksource
(
void
)
{
if
(
!
cpu_has_counter
||
!
mips_hpt_frequency
)
return
-
ENXIO
;
/* Calclate a somewhat reasonable rating value */
clocksource_mips
.
rating
=
200
+
mips_hpt_frequency
/
10000000
;
clocksource_set_clock
(
&
clocksource_mips
,
mips_hpt_frequency
);
clocksource_register
(
&
clocksource_mips
);
return
0
;
}
include/asm-mips/time.h
View file @
69e634f1
...
...
@@ -64,10 +64,11 @@ static inline int mips_clockevent_init(void)
* Initialize the count register as a clocksource
*/
#ifdef CONFIG_CEVT_R4K
extern
void
init_mips_clocksource
(
void
);
extern
int
init_mips_clocksource
(
void
);
#else
static
inline
void
init_mips_clocksource
(
void
)
static
inline
int
init_mips_clocksource
(
void
)
{
return
0
;
}
#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