mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
include: Drop MMIO from SBI_PLATFORM_HAS_MMIO_TIMER_VALUE
It is not necessary that platform has MMIO-based timer value register. It can also have some custom (implementation specific) CSR for timer value. This patch renames SBI_PLATFORM_HAS_MMIO_TIMER_VALUE to SBI_PLATFORM_HAS_TIMER_VALUE to imply "platform timer value" instead of "mmio timer value". Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
@@ -25,8 +25,8 @@
|
||||
|
||||
/** Possible feature flags of a platform */
|
||||
enum sbi_platform_features {
|
||||
/** Platform has MMIO timer value */
|
||||
SBI_PLATFORM_HAS_MMIO_TIMER_VALUE = (1 << 0),
|
||||
/** Platform has timer value */
|
||||
SBI_PLATFORM_HAS_TIMER_VALUE = (1 << 0),
|
||||
/** Platform has HART hotplug support */
|
||||
SBI_PLATFORM_HAS_HART_HOTPLUG = (1 << 1),
|
||||
/** Platform has PMP support */
|
||||
@@ -41,7 +41,7 @@ enum sbi_platform_features {
|
||||
|
||||
/** Default feature set for a platform */
|
||||
#define SBI_PLATFORM_DEFAULT_FEATURES \
|
||||
(SBI_PLATFORM_HAS_MMIO_TIMER_VALUE | \
|
||||
(SBI_PLATFORM_HAS_TIMER_VALUE | \
|
||||
SBI_PLATFORM_HAS_PMP | \
|
||||
SBI_PLATFORM_HAS_SCOUNTEREN | \
|
||||
SBI_PLATFORM_HAS_MCOUNTEREN | \
|
||||
@@ -114,9 +114,9 @@ struct sbi_platform {
|
||||
/** Get pointer to sbi_platform for current HART */
|
||||
#define sbi_platform_thishart_ptr() \
|
||||
((struct sbi_platform *)(sbi_scratch_thishart_ptr()->platform_addr))
|
||||
/** Check whether the platform supports MMIO timer value */
|
||||
#define sbi_platform_has_mmio_timer_value(__p) \
|
||||
((__p)->features & SBI_PLATFORM_HAS_MMIO_TIMER_VALUE)
|
||||
/** Check whether the platform supports timer value */
|
||||
#define sbi_platform_has_timer_value(__p) \
|
||||
((__p)->features & SBI_PLATFORM_HAS_TIMER_VALUE)
|
||||
/** Check whether the platform supports HART hotplug */
|
||||
#define sbi_platform_has_hart_hotplug(__p) \
|
||||
((__p)->features & SBI_PLATFORM_HAS_HART_HOTPLUG)
|
||||
|
Reference in New Issue
Block a user