summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-05-23 13:57:05 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-05-23 13:57:05 +0000
commitace8535e82c677f53d6c51c11ff9520c0efc2e80 (patch)
tree1a807d9a1c3ef634ac4a2cc20170e8ade7af69fe /sys/arch
parentfa5ca1dd4c182e260d6cf4fe41aae1538d7d0d1f (diff)
Print the name from the corresponding FDT node to make identifying simplebus(4)
instances easier. ok jsg@, patrick@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm/simplebus/simplebus.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/arm/simplebus/simplebus.c b/sys/arch/arm/simplebus/simplebus.c
index 059ae694fc0..74bc4f134a3 100644
--- a/sys/arch/arm/simplebus/simplebus.c
+++ b/sys/arch/arm/simplebus/simplebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: simplebus.c,v 1.2 2016/05/16 21:26:54 kettenis Exp $ */
+/* $OpenBSD: simplebus.c,v 1.3 2016/05/23 13:57:04 kettenis Exp $ */
/*
* Copyright (c) 2016 Patrick Wildt <patrick@blueri.se>
*
@@ -67,12 +67,18 @@ simplebus_attach(struct device *parent, struct device *self, void *aux)
{
struct simplebus_softc *sc = (struct simplebus_softc *)self;
struct fdt_attach_args *fa = (struct fdt_attach_args *)aux;
+ char name[32];
int node;
sc->sc_node = fa->fa_node;
sc->sc_iot = fa->fa_iot;
sc->sc_dmat = fa->fa_dmat;
+ if (OF_getprop(sc->sc_node, "name", name, sizeof(name)) > 0) {
+ name[sizeof(name) - 1] = 0;
+ printf(": \"%s\"", name);
+ }
+
printf("\n");
/* Scan the whole tree. */