Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux_grx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Intel
linux_grx
Commits
e38e2ea1
Commit
e38e2ea1
authored
8 years ago
by
leichuan
Committed by
Kenneth Johansson
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
GPTC heartbeat timer count down mode
parent
b15b56a0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/clocksource/intel-gptc-timer.c
+7
-2
7 additions, 2 deletions
drivers/clocksource/intel-gptc-timer.c
with
7 additions
and
2 deletions
drivers/clocksource/intel-gptc-timer.c
+
7
−
2
View file @
e38e2ea1
...
@@ -357,7 +357,10 @@ static void gptc_per_timer_init(struct gptc_timer *timer)
...
@@ -357,7 +357,10 @@ static void gptc_per_timer_init(struct gptc_timer *timer)
{
{
gptc_count_dir
(
timer
);
gptc_count_dir
(
timer
);
gptc_enable_32bit_timer
(
timer
);
gptc_enable_32bit_timer
(
timer
);
gptc_reset_counter
(
timer
);
if
(
timer
->
type
==
TIMER_TYPE_HEARTBEAT
)
gptc_reload_counter
(
timer
,
1
);
/* TODO for interval */
else
gptc_reset_counter
(
timer
);
if
(
timer
->
type
==
TIMER_TYPE_CLK_SRC
||
if
(
timer
->
type
==
TIMER_TYPE_CLK_SRC
||
timer
->
type
==
TIMER_TYPE_HEARTBEAT
)
timer
->
type
==
TIMER_TYPE_HEARTBEAT
)
gptc_reload_and_run
(
timer
);
gptc_reload_and_run
(
timer
);
...
@@ -374,8 +377,10 @@ static const char *const timer_type_to_str(u32 type)
...
@@ -374,8 +377,10 @@ static const char *const timer_type_to_str(u32 type)
case
TIMER_TYPE_WDT
:
case
TIMER_TYPE_WDT
:
return
"wdt"
;
return
"wdt"
;
case
TIMER_TYPE_HEARTBEAT
:
case
TIMER_TYPE_HEARTBEAT
:
return
"heartbeat"
;
return
"heartbeat"
;
default:
default:
return
"none"
;
return
"none"
;
}
}
...
@@ -554,7 +559,7 @@ static int gptc_of_parse_timer(struct gptc *gptc)
...
@@ -554,7 +559,7 @@ static int gptc_of_parse_timer(struct gptc *gptc)
case
TIMER_TYPE_HEARTBEAT
:
case
TIMER_TYPE_HEARTBEAT
:
INIT_LIST_HEAD
(
&
timer
->
heartbeat
);
INIT_LIST_HEAD
(
&
timer
->
heartbeat
);
timer
->
irq
=
0
;
timer
->
irq
=
0
;
timer
->
dir
=
GPTC_COUNT_
UP
;
timer
->
dir
=
GPTC_COUNT_
DOWN
;
timer
->
cpuid
=
0
;
timer
->
cpuid
=
0
;
list_add_tail
(
&
timer
->
heartbeat
,
&
gptc_heartbeat_list
);
list_add_tail
(
&
timer
->
heartbeat
,
&
gptc_heartbeat_list
);
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment