lib: utils/timer: Allow ACLINT MTIMER supporting only 32-bit MMIO

We can have ACLINT MTIMER devices which only support 32-bit MMIO
accesses on RV64 system so this patch adds a boolean DT property
"mtimer,no-64bit-mmio" to detect this from MTIMER DT node.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
Anup Patel
2021-07-24 10:29:56 +05:30
committed by Anup Patel
parent f3a0eb8583
commit b35f7826b0

View File

@@ -58,6 +58,9 @@ static int timer_mtimer_cold_init(void *fdt, int nodeoff,
mt->mtime_size = size[0];
mt->mtimecmp_addr = addr[1];
mt->mtimecmp_size = size[1];
/* Parse additional ACLINT MTIMER properties */
if (fdt_getprop(fdt, nodeoff, "mtimer,no-64bit-mmio", &rc))
mt->has_64bit_mmio = false;
}
rc = aclint_mtimer_cold_init(mt, mtmaster);