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>
This commit is contained in:
Ben Zong-You Xie
2024-05-31 13:19:04 +08:00
committed by Anup Patel
parent 7830e98785
commit f09f16430a
2 changed files with 80 additions and 135 deletions

View File

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