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>
This commit is contained in:
Anup Patel
2019-12-30 11:31:59 +05:30
committed by Anup Patel
parent fc6bd90457
commit 46a90d90e7
8 changed files with 65 additions and 50 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}