]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/karo/common/env.c
Merge tag 'KARO-TX6-2015-03-24' into uboot-merge
[karo-tx-uboot.git] / board / karo / common / env.c
diff --git a/board/karo/common/env.c b/board/karo/common/env.c
new file mode 100644 (file)
index 0000000..7dbb7c8
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * (C) Copyright 2014 Lothar Waßmann <LW@KARO-electronics.de>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <common.h>
+#include <errno.h>
+#include <libfdt.h>
+#include <fdt_support.h>
+
+#include "karo.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static const char const *cleanup_vars[] = {
+       "bootargs",
+       "fileaddr",
+       "filesize",
+       "safeboot",
+       "wdreset",
+};
+
+void env_cleanup(void)
+{
+       size_t i;
+
+       for (i = 0; i < ARRAY_SIZE(cleanup_vars); i++) {
+               setenv(cleanup_vars[i], NULL);
+       }
+}