diff options
| author | Samuel Holland <[email protected]> | 2025-02-20 10:42:30 -0800 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2025-03-24 17:57:20 +0530 |
| commit | 949c83a799e91cb57903932a84ec63fd14de5dc6 (patch) | |
| tree | 189090d89cf1be9bec3f277c7d50e267d8d4d415 /lib/utils/reset | |
| parent | 757f7acafdd25e0ff71a444bbe9f670bc33a3b7f (diff) | |
lib: sbi: Use sbi_hart_count() and sbi_for_each_hartindex()
Simplify the code and improve consistency by using the new macros where
possible. sbi_hart_count() obsoletes sbi_scratch_last_hartindex().
Signed-off-by: Samuel Holland <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils/reset')
| -rw-r--r-- | lib/utils/reset/fdt_reset_atcwdt200.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/utils/reset/fdt_reset_atcwdt200.c b/lib/utils/reset/fdt_reset_atcwdt200.c index 97ec7431..2304582a 100644 --- a/lib/utils/reset/fdt_reset_atcwdt200.c +++ b/lib/utils/reset/fdt_reset_atcwdt200.c @@ -12,7 +12,6 @@ #include <sbi/sbi_ecall_interface.h> #include <sbi/sbi_error.h> #include <sbi/sbi_hart.h> -#include <sbi/sbi_platform.h> #include <sbi/sbi_system.h> #include <sbi_utils/fdt/fdt_driver.h> #include <sbi_utils/fdt/fdt_helper.h> @@ -59,9 +58,7 @@ static int ae350_system_reset_check(u32 type, u32 reason) static void ae350_system_reset(u32 type, u32 reason) { - const struct sbi_platform *plat = sbi_platform_thishart_ptr(); - - for (int i = 0; i < sbi_platform_hart_count(plat); i++) + sbi_for_each_hartindex(i) if (smu_set_reset_vector(&smu, FLASH_BASE, i)) goto fail; |
