summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Chien Peter Lin <[email protected]>2023-11-30 20:42:07 +0800
committerAnup Patel <[email protected]>2023-12-06 17:57:28 +0530
commit535c661d87e1fc2ce31e08cab03fed0dd2742335 (patch)
treee7fbadece4e073b08fe6147f38a0635dc59f72aa
parent2e50c24399d64c42114c7952fca9e22ec0fb8d09 (diff)
platform: rzfive: Enable Andes PMU for RZ/Five
Enable Andes PMU extension support for RZ/Five. We also staticize renesas_rzfive_early_init() as it is not used outside of this unit. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Atish Patra <[email protected]> Reviewed-by: Lad Prabhakar <[email protected]> Tested-by: Lad Prabhakar <[email protected]> Reviewed-by: Anup Patel <[email protected]>
-rw-r--r--platform/generic/Kconfig1
-rw-r--r--platform/generic/renesas/rzfive/rzfive.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/platform/generic/Kconfig b/platform/generic/Kconfig
index 89e56035..c9b60117 100644
--- a/platform/generic/Kconfig
+++ b/platform/generic/Kconfig
@@ -39,6 +39,7 @@ config PLATFORM_RENESAS_RZFIVE
bool "Renesas RZ/Five support"
select ANDES45_PMA
select ANDES_SBI
+ select ANDES_PMU
default n
config PLATFORM_SIFIVE_FU540
diff --git a/platform/generic/renesas/rzfive/rzfive.c b/platform/generic/renesas/rzfive/rzfive.c
index a69797b1..b5b5e651 100644
--- a/platform/generic/renesas/rzfive/rzfive.c
+++ b/platform/generic/renesas/rzfive/rzfive.c
@@ -5,6 +5,7 @@
*/
#include <andes/andes45_pma.h>
+#include <andes/andes_pmu.h>
#include <andes/andes_sbi.h>
#include <platform_override.h>
#include <sbi/sbi_domain.h>
@@ -29,7 +30,7 @@ static int renesas_rzfive_final_init(bool cold_boot, const struct fdt_match *mat
array_size(renesas_rzfive_pma_regions));
}
-int renesas_rzfive_early_init(bool cold_boot, const struct fdt_match *match)
+static int renesas_rzfive_early_init(bool cold_boot, const struct fdt_match *match)
{
/*
* Renesas RZ/Five RISC-V SoC has Instruction local memory and
@@ -57,4 +58,6 @@ const struct platform_override renesas_rzfive = {
.early_init = renesas_rzfive_early_init,
.final_init = renesas_rzfive_final_init,
.vendor_ext_provider = andes_sbi_vendor_ext_provider,
+ .extensions_init = andes_pmu_extensions_init,
+ .pmu_init = andes_pmu_init,
};