summaryrefslogtreecommitdiffstats
path: root/common/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/misc.c')
-rw-r--r--common/misc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/common/misc.c b/common/misc.c
index e9fdacc..8066494 100644
--- a/common/misc.c
+++ b/common/misc.c
@@ -125,3 +125,20 @@ EXPORT_SYMBOL(perror);
void (*do_execute)(void *func, int argc, char *argv[]);
EXPORT_SYMBOL(do_execute);
+
+static const char *boardinfo;
+
+const char *barebox_boardinfo(void)
+{
+ if (boardinfo)
+ return boardinfo;
+
+ boardinfo = of_get_model();
+ if (boardinfo)
+ boardinfo = xstrdup(boardinfo);
+ else
+ boardinfo = CONFIG_BOARDINFO;
+
+ return boardinfo;
+}
+EXPORT_SYMBOL(barebox_boardinfo);