lib: sbi: Only register available extensions
authorAndrew Jones <ajones@ventanamicro.com>
Mon, 15 May 2023 11:12:37 +0000 (13:12 +0200)
committerAnup Patel <anup@brainfault.org>
Sun, 21 May 2023 11:23:02 +0000 (16:53 +0530)
commit8b952d4fcd4e1341ed7061bd01b8b12802031ea1
tree9922710d57681bd30fb28f5a3afe48f26af6dd8b
parent042f0c3ea25e995a6db93cd64964b816cb8ffba4
lib: sbi: Only register available extensions

When an extension implements a probe function it means there's a
chance that the extension is not available. Use this function in the
register_extensions callback to determine if the extension should be
registered at all. Where the probe implementation is simple, just
open code the check.

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_ecall_cppc.c
lib/sbi/sbi_ecall_dbcn.c
lib/sbi/sbi_ecall_srst.c
lib/sbi/sbi_ecall_susp.c
lib/sbi/sbi_ecall_vendor.c
lib/sbi/sbi_init.c