summaryrefslogtreecommitdiffstats
path: root/common/reset_source.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/reset_source.c')
-rw-r--r--common/reset_source.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/reset_source.c b/common/reset_source.c
index 3a11d26..6026af1 100644
--- a/common/reset_source.c
+++ b/common/reset_source.c
@@ -27,8 +27,18 @@ static const char * const reset_src_names[] = {
[RESET_JTAG] = "JTAG",
};
+static enum reset_src_type reset_source;
+
+enum reset_src_type reset_source_get(void)
+{
+ return reset_source;
+}
+EXPORT_SYMBOL(reset_source_get);
+
void reset_source_set(enum reset_src_type st)
{
+ reset_source = st;
+
setenv("global.system.reset", reset_src_names[st]);
}
EXPORT_SYMBOL(reset_source_set);