aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2019-12-30 11:31:59 +0530
committerAnup Patel <anup@brainfault.org>2020-01-02 09:14:36 +0530
commit46a90d90e7dca6eeb66700b6970171119c51fd66 (patch)
tree1e4c6902a0e8b68277a46e6610a33b898f9391bb /platform
parentfc6bd90457b5553fbb0a17f0b58adb2da28e8db0 (diff)
lib: utils: Support CLINT with 32bit MMIO access on RV64 system
It is possible to have a CLINT implementation which supports only 32bit MMIO accesses on RV64 system so this patch extends our CLINT driver such that platform code can specify whether CLINT supports 64bit MMIO access. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra<atish.patra@wdc.com> Reviewed-by: Zong Li <zong.li@sifive.com>
Diffstat (limited to 'platform')
-rw-r--r--platform/ariane-fpga/platform.c2
-rw-r--r--platform/kendryte/k210/platform.c2
-rw-r--r--platform/qemu/sifive_u/platform.c2
-rw-r--r--platform/qemu/virt/platform.c3
-rw-r--r--platform/sifive/fu540/platform.c3
-rw-r--r--platform/template/platform.c2
6 files changed, 8 insertions, 6 deletions
diff --git a/platform/ariane-fpga/platform.c b/platform/ariane-fpga/platform.c
index daeb9cd..5ebbff8 100644
--- a/platform/ariane-fpga/platform.c
+++ b/platform/ariane-fpga/platform.c
@@ -145,7 +145,7 @@ static int ariane_timer_init(bool cold_boot)
if (cold_boot) {
ret = clint_cold_timer_init(ARIANE_CLINT_ADDR,
- ARIANE_HART_COUNT);
+ ARIANE_HART_COUNT, TRUE);
if (ret)
return ret;
}
diff --git a/platform/kendryte/k210/platform.c b/platform/kendryte/k210/platform.c
index 39771e3..8ad1bf8 100644
--- a/platform/kendryte/k210/platform.c
+++ b/platform/kendryte/k210/platform.c
@@ -88,7 +88,7 @@ static int k210_timer_init(bool cold_boot)
if (cold_boot) {
rc = clint_cold_timer_init(K210_CLINT_BASE_ADDR,
- K210_HART_COUNT);
+ K210_HART_COUNT, TRUE);
if (rc)
return rc;
}
diff --git a/platform/qemu/sifive_u/platform.c b/platform/qemu/sifive_u/platform.c
index 40d6584..b021ca2 100644
--- a/platform/qemu/sifive_u/platform.c
+++ b/platform/qemu/sifive_u/platform.c
@@ -113,7 +113,7 @@ static int sifive_u_timer_init(bool cold_boot)
if (cold_boot) {
rc = clint_cold_timer_init(SIFIVE_U_CLINT_ADDR,
- SIFIVE_U_HART_COUNT);
+ SIFIVE_U_HART_COUNT, TRUE);
if (rc)
return rc;
}
diff --git a/platform/qemu/virt/platform.c b/platform/qemu/virt/platform.c
index 6ef6a19..883555c 100644
--- a/platform/qemu/virt/platform.c
+++ b/platform/qemu/virt/platform.c
@@ -114,7 +114,8 @@ static int virt_timer_init(bool cold_boot)
int rc;
if (cold_boot) {
- rc = clint_cold_timer_init(VIRT_CLINT_ADDR, VIRT_HART_COUNT);
+ rc = clint_cold_timer_init(VIRT_CLINT_ADDR,
+ VIRT_HART_COUNT, TRUE);
if (rc)
return rc;
}
diff --git a/platform/sifive/fu540/platform.c b/platform/sifive/fu540/platform.c
index 81e8e8d..c8ead9d 100644
--- a/platform/sifive/fu540/platform.c
+++ b/platform/sifive/fu540/platform.c
@@ -176,7 +176,8 @@ static int fu540_timer_init(bool cold_boot)
int rc;
if (cold_boot) {
- rc = clint_cold_timer_init(FU540_CLINT_ADDR, FU540_HART_COUNT);
+ rc = clint_cold_timer_init(FU540_CLINT_ADDR,
+ FU540_HART_COUNT, TRUE);
if (rc)
return rc;
}
diff --git a/platform/template/platform.c b/platform/template/platform.c
index d36af48..20ae579 100644
--- a/platform/template/platform.c
+++ b/platform/template/platform.c
@@ -143,7 +143,7 @@ static int platform_timer_init(bool cold_boot)
/* Example if the generic CLINT driver is used */
if (cold_boot) {
ret = clint_cold_timer_init(PLATFORM_CLINT_ADDR,
- PLATFORM_HART_COUNT);
+ PLATFORM_HART_COUNT, TRUE);
if (ret)
return ret;
}