aboutsummaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
authorSamuel Holland <samuel.holland@sifive.com>2024-07-30 21:58:55 -0700
committerAnup Patel <anup@brainfault.org>2024-08-24 13:02:58 +0530
commitfa6dfce017eed32cbae2581bc285bafd52929d42 (patch)
treef8e1432ddaeb28e5e94b078cc941351460922a2e /lib/utils
parent6e5db7b09c6c25be59900a3470923727a4e14033 (diff)
downloadopensbi-fa6dfce017eed32cbae2581bc285bafd52929d42.tar.gz
opensbi-fa6dfce017eed32cbae2581bc285bafd52929d42.tar.bz2
opensbi-fa6dfce017eed32cbae2581bc285bafd52929d42.zip
lib: utils/reset: Pass the FDT to fdt_reset_init()
Indicate that this function does not modify the FDT blob, and deduplicate the call to fdt_get_address(). Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/reset/fdt_reset.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/utils/reset/fdt_reset.c b/lib/utils/reset/fdt_reset.c
index 960c08d0..05deb75e 100644
--- a/lib/utils/reset/fdt_reset.c
+++ b/lib/utils/reset/fdt_reset.c
@@ -42,10 +42,9 @@ int fdt_reset_driver_init(const void *fdt, struct fdt_reset *drv)
return cnt > 0 ? 0 : SBI_ENODEV;
}
-void fdt_reset_init(void)
+void fdt_reset_init(const void *fdt)
{
int pos;
- const void *fdt = fdt_get_address();
for (pos = 0; pos < fdt_reset_drivers_size; pos++)
fdt_reset_driver_init(fdt, fdt_reset_drivers[pos]);