summaryrefslogtreecommitdiff
path: root/lib/utils/reset/fdt_reset_htif.c
diff options
context:
space:
mode:
authorAnup Patel <[email protected]>2020-04-24 17:02:48 +0530
committerAnup Patel <[email protected]>2020-05-01 10:31:37 +0530
commit7cc6fa4d8a65e08048e1dd469087805ce89bf306 (patch)
tree14a42d7fa4873a3ad3a17e2e3dd9b3fce9c1f8c6 /lib/utils/reset/fdt_reset_htif.c
parent76a89403c8efa58582fe35cf942e80be7f5f36f9 (diff)
lib: utils: Add simple FDT reset framework
We add simple reset framework which will select and use reset driver based on details in FDT passed by previous booting stage. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]>
Diffstat (limited to 'lib/utils/reset/fdt_reset_htif.c')
-rw-r--r--lib/utils/reset/fdt_reset_htif.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/utils/reset/fdt_reset_htif.c b/lib/utils/reset/fdt_reset_htif.c
new file mode 100644
index 00000000..e453d05e
--- /dev/null
+++ b/lib/utils/reset/fdt_reset_htif.c
@@ -0,0 +1,22 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2020 Western Digital Corporation or its affiliates.
+ *
+ * Authors:
+ * Anup Patel <[email protected]>
+ */
+
+#include <sbi_utils/reset/fdt_reset.h>
+#include <sbi_utils/fdt/fdt_helper.h>
+#include <sbi_utils/sys/htif.h>
+
+static const struct fdt_match htif_reset_match[] = {
+ { .compatible = "ucb,htif0" },
+ { },
+};
+
+struct fdt_reset fdt_reset_htif = {
+ .match_table = htif_reset_match,
+ .system_reset = htif_system_reset
+};