summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_platform.h
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2019-01-22 12:17:03 +0300
committerAnup Patel <anup@brainfault.org>2019-01-23 06:09:26 +0300
commit9895d446ae947c2c3d060808bcb66870afaeb659 (patch)
treea548ceec34b355e59679bc379a06633d0341378a /include/sbi/sbi_platform.h
parent74fd2e5bb217278fcb2c0020038ea5f19bd5d22f (diff)
downloadopensbi-9895d446ae947c2c3d060808bcb66870afaeb659.tar.xz
lib: Remove target_hart and hartid parameter from TIMER callbacks
The target_hart and hartid paramter of TIMER callbacks is not required because it always current hartid which can be obtained using sbi_current_hartid() API. Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include/sbi/sbi_platform.h')
-rw-r--r--include/sbi/sbi_platform.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h
index 648b953..be70903 100644
--- a/include/sbi/sbi_platform.h
+++ b/include/sbi/sbi_platform.h
@@ -96,11 +96,11 @@ struct sbi_platform {
/** Get MMIO timer value */
u64 (*timer_value)(void);
/** Start MMIO timer event for a target HART */
- void (*timer_event_start)(u32 target_hart, u64 next_event);
+ void (*timer_event_start)(u64 next_event);
/** Stop MMIO timer event for a target HART */
- void (*timer_event_stop)(u32 target_hart);
+ void (*timer_event_stop)(void);
/** Initialize MMIO timer for given HART */
- int (*timer_init)(u32 hartid, bool cold_boot);
+ int (*timer_init)(bool cold_boot);
/** Reboot the platform */
int (*system_reboot)(u32 type);
@@ -393,44 +393,39 @@ static inline u64 sbi_platform_timer_value(struct sbi_platform *plat)
* Start MMIO timer event for a target HART
*
* @param plat pointer to struct struct sbi_platform
- * @param target_hart HART ID of timer event target
* @param next_event timer value when timer event will happen
*/
static inline void sbi_platform_timer_event_start(struct sbi_platform *plat,
- u32 target_hart,
u64 next_event)
{
if (plat && plat->timer_event_start)
- plat->timer_event_start(target_hart, next_event);
+ plat->timer_event_start(next_event);
}
/**
* Stop MMIO timer event for a target HART
*
* @param plat pointer to struct sbi_platform
- * @param target_hart HART ID of timer event target
*/
-static inline void sbi_platform_timer_event_stop(struct sbi_platform *plat,
- u32 target_hart)
+static inline void sbi_platform_timer_event_stop(struct sbi_platform *plat)
{
if (plat && plat->timer_event_stop)
- plat->timer_event_stop(target_hart);
+ plat->timer_event_stop();
}
/**
* Initialize the platform MMIO timer for given HART
*
* @param plat pointer to struct sbi_platform
- * @param hartid HART ID
* @param cold_boot whether cold boot (TRUE) or warm_boot (FALSE)
*
* @return 0 on success and negative error code on failure
*/
static inline int sbi_platform_timer_init(struct sbi_platform *plat,
- u32 hartid, bool cold_boot)
+ bool cold_boot)
{
if (plat && plat->timer_init)
- return plat->timer_init(hartid, cold_boot);
+ return plat->timer_init(cold_boot);
return 0;
}