summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/serial-uclass.c2
-rw-r--r--include/fdtdec.h11
-rw-r--r--lib/fdtdec.c15
3 files changed, 1 insertions, 27 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index b09053f140..d1b5777cec 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -39,7 +39,7 @@ static void serial_find_console_or_panic(void)
/* Check for a chosen console */
node = fdtdec_get_chosen_node(gd->fdt_blob, "stdout-path");
if (node < 0)
- node = fdtdec_get_alias_node(gd->fdt_blob, "console");
+ node = fdt_path_offset(gd->fdt_blob, "console");
if (!uclass_get_device_by_of_offset(UCLASS_SERIAL, node, &dev)) {
gd->cur_serial_dev = dev;
return;
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 3da9fab95c..911f216cd8 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -390,17 +390,6 @@ int fdtdec_get_alias_seq(const void *blob, const char *base, int node,
int *seqp);
/**
- * Get the offset of the given alias node
- *
- * This looks up an alias in /aliases then finds the offset of that node.
- *
- * @param blob Device tree blob (if NULL, then error is returned)
- * @param name Alias name, e.g. "console"
- * @return Node offset referred to by that alias, or -ve FDT_ERR_...
- */
-int fdtdec_get_alias_node(const void *blob, const char *name);
-
-/**
* Get the offset of the given chosen node
*
* This looks up a property in /chosen containing the path to another node,
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 7c7e673aeb..f12d6a3e7d 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -370,21 +370,6 @@ int fdtdec_get_alias_seq(const void *blob, const char *base, int offset,
return -ENOENT;
}
-int fdtdec_get_alias_node(const void *blob, const char *name)
-{
- const char *prop;
- int alias_node;
- int len;
-
- if (!blob)
- return -FDT_ERR_NOTFOUND;
- alias_node = fdt_path_offset(blob, "/aliases");
- prop = fdt_getprop(blob, alias_node, name, &len);
- if (!prop)
- return -FDT_ERR_NOTFOUND;
- return fdt_path_offset(blob, prop);
-}
-
int fdtdec_get_chosen_node(const void *blob, const char *name)
{
const char *prop;
OpenPOWER on IntegriCloud