lib: utils: Add M-mode {R/W} flags to the MMIO regions

Add the M-mode readable/writable flags to mmio regions
of various drivers.

Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Tested-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Himanshu Chauhan
2023-01-09 05:20:42 +00:00
committed by Anup Patel
parent 3e2f573e70
commit 59a08cd7d6
4 changed files with 24 additions and 7 deletions

View File

@@ -88,7 +88,10 @@ int aclint_mswi_cold_init(struct aclint_mswi_data *mswi)
region_size = ((mswi->size - pos) < ACLINT_MSWI_ALIGN) ?
(mswi->size - pos) : ACLINT_MSWI_ALIGN;
sbi_domain_memregion_init(mswi->addr + pos, region_size,
SBI_DOMAIN_MEMREGION_MMIO, &reg);
(SBI_DOMAIN_MEMREGION_MMIO |
SBI_DOMAIN_MEMREGION_M_READABLE |
SBI_DOMAIN_MEMREGION_M_WRITABLE),
&reg);
rc = sbi_domain_root_add_memregion(&reg);
if (rc)
return rc;