[RFC PATCH 4/5] platform: generic/andes: ae350: register the Andes PMA device

Randolph Lin randolph at andestech.com
Fri Nov 13 01:32:11 PST 2026


Register andes_pma_device with the PMA framework, so that an AE350 board
can set its PMA regions from the "riscv,pma-regions" DT node.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Randolph Lin <randolph at andestech.com>
---
 platform/generic/andes/ae350.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/platform/generic/andes/ae350.c b/platform/generic/andes/ae350.c
index 7aafe545..aceca2f3 100644
--- a/platform/generic/andes/ae350.c
+++ b/platform/generic/andes/ae350.c
@@ -5,6 +5,7 @@
  */
 
 #include <andes/andes.h>
+#include <andes/andes_pma.h>
 #include <andes/andes_pmu.h>
 #include <andes/andes_sbi.h>
 #include <platform_override.h>
@@ -14,6 +15,7 @@
 #include <sbi/sbi_scratch.h>
 #include <sbi_utils/fdt/fdt_helper.h>
 #include <sbi_utils/hsm/fdt_hsm_andes_atcsmu.h>
+#include <sbi_utils/pma/pma.h>
 
 static unsigned long andes_hart_data_offset;
 extern void _start_warm(void);
@@ -99,7 +101,7 @@ static int ae350_platform_init(const void *fdt, int nodeoff, const struct fdt_ma
 	generic_platform_ops.pmu_init = andes_pmu_init;
 	generic_platform_ops.vendor_ext_provider = andes_sbi_vendor_ext_provider;
 
-	return 0;
+	return pma_set_device(&andes_pma_device);
 }
 
 static const struct fdt_match andes_ae350_match[] = {
-- 
2.34.1




More information about the opensbi mailing list