summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2022-08-24 12:59:27 +0300
committerAnup Patel <anup@brainfault.org>2022-09-01 14:23:25 +0300
commitee69f8eeb3c16bfdb4bb3d8b5033fb8a7816f7b6 (patch)
tree288b6fec063e56ba59895e0113a9944aecb72679
parentd10c1f4acde1753ec5818728e9f864b9838f09d1 (diff)
downloadopensbi-ee69f8eeb3c16bfdb4bb3d8b5033fb8a7816f7b6.tar.xz
lib: sbi: Print platform PMU device at boot-time
Let us print the platform PMU device name at the boot-time so that users know whether the underlying platform has custom per-HART PMU operations. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
-rw-r--r--lib/sbi/sbi_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c
index d57efa7..a8500e5 100644
--- a/lib/sbi/sbi_init.c
+++ b/lib/sbi/sbi_init.c
@@ -63,6 +63,7 @@ static void sbi_boot_print_banner(struct sbi_scratch *scratch)
static void sbi_boot_print_general(struct sbi_scratch *scratch)
{
char str[128];
+ const struct sbi_pmu_device *pdev;
const struct sbi_hsm_device *hdev;
const struct sbi_ipi_device *idev;
const struct sbi_timer_device *tdev;
@@ -93,6 +94,9 @@ static void sbi_boot_print_general(struct sbi_scratch *scratch)
hdev = sbi_hsm_get_device();
sbi_printf("Platform HSM Device : %s\n",
(hdev) ? hdev->name : "---");
+ pdev = sbi_pmu_get_device();
+ sbi_printf("Platform PMU Device : %s\n",
+ (pdev) ? pdev->name : "---");
srdev = sbi_system_reset_get_device(SBI_SRST_RESET_TYPE_COLD_REBOOT, 0);
sbi_printf("Platform Reboot Device : %s\n",
(srdev) ? srdev->name : "---");