[OpenBIOS] [PATCH 5/6] escc: Don't set aliases for legacy devices

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Aug 2 07:35:26 CEST 2016


We currently overwrite the escc aliases with legacy ones.

This causes us to use a legacy one as a stdout path.

Linux doesn't parse the legacy ones very well causing problems detecting
the default serial console when using a mac model with a serial console.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 drivers/escc.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/escc.c b/drivers/escc.c
index 6515475..4ea8308 100644
--- a/drivers/escc.c
+++ b/drivers/escc.c
@@ -429,14 +429,15 @@ escc_add_channel(const char *path, const char *node, phys_addr_t addr,
 
     /* add aliases */
 
-    aliases = find_dev("/aliases");
-
-    snprintf(buf, sizeof(buf), "%s/ch-%s", path, node);
-    OLDWORLD(snprintf(tty, sizeof(tty), "tty%s", node));
-    OLDWORLD(set_property(aliases, tty, buf, strlen(buf) + 1));
-    snprintf(tty, sizeof(tty), "scc%s", node);
-    set_property(aliases, tty, buf, strlen(buf) + 1);
-
+    if (!legacy) {
+            aliases = find_dev("/aliases");
+
+            snprintf(buf, sizeof(buf), "%s/ch-%s", path, node);
+            OLDWORLD(snprintf(tty, sizeof(tty), "tty%s", node));
+            OLDWORLD(set_property(aliases, tty, buf, strlen(buf) + 1));
+            snprintf(tty, sizeof(tty), "scc%s", node);
+            set_property(aliases, tty, buf, strlen(buf) + 1);
+    }
     /* add properties */
 
     dnode = find_dev(buf);
-- 
2.7.4




More information about the OpenBIOS mailing list