summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2019-01-23 05:33:20 +0300
committerAnup Patel <anup@brainfault.org>2019-01-23 06:09:26 +0300
commit36394d2f2429c48d1db4e26ad25f9541c8c1027f (patch)
tree5b9531f46c3053b4ad70f4775b1836289ecd682a /include
parentd25774ff962c7448d6e46e102e183d11abfd2ef2 (diff)
downloadopensbi-36394d2f2429c48d1db4e26ad25f9541c8c1027f.tar.xz
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>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_platform.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h
index 10c9703..e761571 100644
--- a/include/sbi/sbi_platform.h
+++ b/include/sbi/sbi_platform.h
@@ -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)