aboutsummaryrefslogtreecommitdiff
path: root/platform/generic/include/andes/andes_pma.h
diff options
context:
space:
mode:
authorBen Zong-You Xie <ben717@andestech.com>2024-05-31 13:19:04 +0800
committerAnup Patel <anup@brainfault.org>2024-06-18 16:15:22 +0530
commitf09f16430ae7b3543616a38df4411fea8f026759 (patch)
tree1d1ef727c92ff7fbc2adff34b69fe56c55ed1948 /platform/generic/include/andes/andes_pma.h
parent7830e987856eb1319c82664702892b6d50a93e7a (diff)
downloadopensbi-f09f16430ae7b3543616a38df4411fea8f026759.zip
opensbi-f09f16430ae7b3543616a38df4411fea8f026759.tar.gz
opensbi-f09f16430ae7b3543616a38df4411fea8f026759.tar.bz2
platform: generic: andes: Refine Andes PMA related code
This patch refines the Andes PMA related code. The main change is refactor andes_pma_[read|write]_cfg() and andes_pma_[read|write]_addr() into new functions andes_pma_[read|write]_num(). Also, fix some coding style problems. Signed-off-by: Ben Zong-You Xie <ben717@andestech.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'platform/generic/include/andes/andes_pma.h')
-rw-r--r--platform/generic/include/andes/andes_pma.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/generic/include/andes/andes_pma.h b/platform/generic/include/andes/andes_pma.h
index bbc09cd..5ea1247 100644
--- a/platform/generic/include/andes/andes_pma.h
+++ b/platform/generic/include/andes/andes_pma.h
@@ -10,6 +10,8 @@
#define ANDES_MAX_PMA_REGIONS 16
+#define ANDES_PMA_GRANULARITY (1 << 12)
+
/* Naturally aligned power of 2 region */
#define ANDES_PMACFG_ETYP_NAPOT 3