lib: sbi: Use SBI_HSM_STATE_xyz defines instead of SBI_STATE_xyz defines
authorAnup Patel <anup.patel@wdc.com>
Mon, 1 Feb 2021 10:43:03 +0000 (16:13 +0530)
committerAnup Patel <anup@brainfault.org>
Wed, 3 Mar 2021 04:47:41 +0000 (10:17 +0530)
commit8df1f9a0d33f295fc9f9cd5f6b9b723be96ba13b
tree601583c4879a1cd4e8d0ef0716d375e8bb7eef8a
parent5487cf095daecf72c81e2813dcce13e203398a55
lib: sbi: Use SBI_HSM_STATE_xyz defines instead of SBI_STATE_xyz defines

We replace the use of SBI_STATE_xyz defines with SBI_HSM_STATE_xyz
defines because the HSM state defines are complete enough to implement
HSM state machine in OpenSBI. As a result of this, we can now remove
sbi_hsm_hart_state_to_status() function because it is now redundant
and sbi_hsm_hart_get_state() can directly return HSM state or error.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
include/sbi/sbi_hsm.h
lib/sbi/sbi_ecall_hsm.c
lib/sbi/sbi_hsm.c