aboutsummaryrefslogtreecommitdiff
path: root/core/timer.c
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2018-04-23 12:15:31 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-04-30 19:04:42 -0500
commit6421fc56dc289c8d14a1ce9eddbb88d3687fbb77 (patch)
tree1e62f2f3795e0476f092107d76a68b1a432e7394 /core/timer.c
parent6739c890a2f298ed382b9557840a493fb97df44b (diff)
downloadskiboot-6421fc56dc289c8d14a1ce9eddbb88d3687fbb77.zip
skiboot-6421fc56dc289c8d14a1ce9eddbb88d3687fbb77.tar.gz
skiboot-6421fc56dc289c8d14a1ce9eddbb88d3687fbb77.tar.bz2
Move P8 timer code to separate file
Lets move P8 timer support code from slw.c to sbe-p8.c (as suggested by BenH). There is a difference between timer support in P8 and P9. Hence I think it makes sense to name it as sbe-p8.c. Note that this is pure code movement and renaming functions/variables. No functionality changes. Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core/timer.c')
-rw-r--r--core/timer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/timer.c b/core/timer.c
index b10a564..21f62a4 100644
--- a/core/timer.c
+++ b/core/timer.c
@@ -4,6 +4,7 @@
#include <fsp.h>
#include <device.h>
#include <opal.h>
+#include <sbe-p8.h>
#ifdef __TEST__
#define this_cpu() ((void *)-1)
@@ -109,7 +110,7 @@ static void __schedule_timer_at(struct timer *t, uint64_t when)
/* Pick up the next timer and upddate the SBE HW timer */
lt = list_top(&timer_list, struct timer, link);
if (lt)
- slw_update_timer_expiry(lt->target);
+ p8_sbe_update_timer_expiry(lt->target);
}
void schedule_timer_at(struct timer *t, uint64_t when)
@@ -166,7 +167,7 @@ static void __check_poll_timers(uint64_t now)
* arbitrarily 1us.
*/
if (t->running) {
- slw_update_timer_expiry(now + usecs_to_tb(1));
+ p8_sbe_update_timer_expiry(now + usecs_to_tb(1));
break;
}
@@ -257,7 +258,7 @@ void late_init_timers(void)
*
* If a platform quirk exists, use that, else use the default.
*
- * If we have an SLW timer facility, we run this 10 times slower,
+ * If we have an SBE timer facility, we run this 10 times slower,
* we could possibly completely get rid of it.
*
* We use a value in milliseconds, we don't want this to ever be
@@ -265,7 +266,7 @@ void late_init_timers(void)
*/
if (platform.heartbeat_time) {
heartbeat = platform.heartbeat_time();
- } else if (slw_timer_ok() || fsp_present()) {
+ } else if (p8_sbe_timer_ok() || fsp_present()) {
heartbeat = HEARTBEAT_DEFAULT_MS * 10;
}