diff options
author | marius <marius@FreeBSD.org> | 2010-04-10 11:52:12 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-04-10 11:52:12 +0000 |
commit | af63aa47ca8e507ea249380e9c4c7659a303ee6f (patch) | |
tree | f1b6758ebc22a7a36a90c075e73c4c3ebfa7a633 /sys/dev/uart/uart_cpu_sparc64.c | |
parent | c48055dea1028997c98d1f43c73db7cb0d62ccf1 (diff) | |
download | FreeBSD-src-af63aa47ca8e507ea249380e9c4c7659a303ee6f.zip FreeBSD-src-af63aa47ca8e507ea249380e9c4c7659a303ee6f.tar.gz |
Add sbbc(4), a driver for the BootBus controller found in Serengeti and
StarCat systems which provides time-of-day services for both as well as
console service for Serengeti, i.e. Sun Fire V1280. While the latter is
described with a device type of serial in the OFW device tree, it isn't
actually an UART. Nevertheless the console service is handled by uart(4)
as this allowed to re-use quite a bit of MD and MI code. Actually, this
idea is stolen from Linux which interfaces the sun4v hypervisor console
with the Linux counterpart of uart(4).
Diffstat (limited to 'sys/dev/uart/uart_cpu_sparc64.c')
-rw-r--r-- | sys/dev/uart/uart_cpu_sparc64.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/uart/uart_cpu_sparc64.c b/sys/dev/uart/uart_cpu_sparc64.c index 0f40cb7..c89b39f 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); |