summaryrefslogtreecommitdiff
path: root/sys/dev/uart
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2010-04-10 11:52:12 +0000
committerMarius Strobl <marius@FreeBSD.org>2010-04-10 11:52:12 +0000
commitd5dba21cf60d22de98652c3c1e187a463db04ce2 (patch)
treef1b6758ebc22a7a36a90c075e73c4c3ebfa7a633 /sys/dev/uart
parent5679850859ab462dfb1c879d2f2bc8ee09ec47c6 (diff)
Notes
Diffstat (limited to 'sys/dev/uart')
-rw-r--r--sys/dev/uart/uart.h1
-rw-r--r--sys/dev/uart/uart_cpu_sparc64.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/uart/uart.h b/sys/dev/uart/uart.h
index eb66da0f0159..bd7861d376b4 100644
--- a/sys/dev/uart/uart.h
+++ b/sys/dev/uart/uart.h
@@ -67,6 +67,7 @@ struct uart_class;
extern struct uart_class uart_ns8250_class __attribute__((weak));
extern struct uart_class uart_quicc_class __attribute__((weak));
extern struct uart_class uart_sab82532_class __attribute__((weak));
+extern struct uart_class uart_sbbc_class __attribute__((weak));
extern struct uart_class uart_z8530_class __attribute__((weak));
#ifdef PC98
diff --git a/sys/dev/uart/uart_cpu_sparc64.c b/sys/dev/uart/uart_cpu_sparc64.c
index 0f40cb70bd73..c89b39fcc9eb 100644
--- a/sys/dev/uart/uart_cpu_sparc64.c
+++ b/sys/dev/uart/uart_cpu_sparc64.c
@@ -133,6 +133,14 @@ uart_cpu_getdev_console(phandle_t options, char *dev, size_t devsz)
return (-1);
if (strcmp(buf, "serial") != 0)
return (-1);
+ /* For a Serengeti console device point to the bootbus controller. */
+ if (OF_getprop(input, "name", buf, sizeof(buf)) > 0 &&
+ !strcmp(buf, "sgcn")) {
+ if ((chosen = OF_finddevice("/chosen")) == -1)
+ return (-1);
+ if (OF_getprop(chosen, "iosram", &input, sizeof(input)) == -1)
+ return (-1);
+ }
return (input);
}
@@ -258,6 +266,9 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
!strcmp(compat, "su16552")) {
class = &uart_ns8250_class;
di->bas.chan = 0;
+ } else if (!strcmp(compat, "sgsbbc")) {
+ class = &uart_sbbc_class;
+ di->bas.chan = 0;
}
if (class == NULL)
return (ENXIO);