summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2017-11-30 11:56:20 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-01-17 09:19:52 +0100
commit76759ec94eb3a32d71c32550b6b50965125afd92 (patch)
tree9ae15f4b79879c001169a0fa8f9649c9b23c0a11 /include
parent6a91cea016ba0ede7c6c22ee644291e19da05785 (diff)
downloadbarebox-76759ec94eb3a32d71c32550b6b50965125afd92.tar.gz
barebox-76759ec94eb3a32d71c32550b6b50965125afd92.tar.xz
of: base: use root_node compatible as suggestion for a hostname
on some SoCs we can use generic PLL and RAM initialization. In this cases we create board file only to provide a host name. With this patch host name will be created from device tree compatible. For example: compatible = "board_vendor,board", "chip_vendor,soc" the host name will be: "board" This function will not overwrite a host name which is already set by board or machine code. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/common.h1
-rw-r--r--include/of.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 54c76d4641..60e5005b8e 100644
--- a/include/common.h
+++ b/include/common.h
@@ -137,6 +137,7 @@ const char *barebox_get_model(void);
void barebox_set_model(const char *);
const char *barebox_get_hostname(void);
void barebox_set_hostname(const char *);
+void barebox_set_hostname_no_overwrite(const char *);
#if defined(CONFIG_MIPS)
#include <asm/addrspace.h>
diff --git a/include/of.h b/include/of.h
index 9bdbbb5ed2..1b9719d603 100644
--- a/include/of.h
+++ b/include/of.h
@@ -148,6 +148,7 @@ extern struct device_node *of_copy_node(struct device_node *parent,
const struct device_node *other);
extern void of_delete_node(struct device_node *node);
+extern const char *of_get_machine_compatible(void);
extern int of_machine_is_compatible(const char *compat);
extern int of_device_is_compatible(const struct device_node *device,
const char *compat);