lib: sbi: Update pmp_get() to return decoded size directly
authorBin Meng <bmeng.cn@gmail.com>
Tue, 17 Mar 2020 14:59:38 +0000 (07:59 -0700)
committerAnup Patel <anup@brainfault.org>
Wed, 18 Mar 2020 03:28:26 +0000 (08:58 +0530)
commit5fbcd625bc8f8980164b4c905dc8097269461419
treeebc4aef34a53d85b5768a066199f127ff723a409
parent327ba362119a9cb36ff03575723546d8abcb5465
lib: sbi: Update pmp_get() to return decoded size directly

Currently pmp_get() returns the log2 length of the PMP memory
region size. The caller has to calculate the size based on that
and the same codes are duplicated.

Update this function to return decoded size directly.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
include/sbi/riscv_asm.h
lib/sbi/riscv_asm.c
lib/sbi/sbi_hart.c