Date: Sat, 26 Jul 2014 17:49:40 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269131 - head/sys/dev/uart Message-ID: <201407261749.s6QHnene038913@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Sat Jul 26 17:49:40 2014 New Revision: 269131 URL: http://svnweb.freebsd.org/changeset/base/269131 Log: Do not fail the low-level device probe simply because the kernel doesn't have support for the Z8530. Embedded PowerPC platforms typically don't. Fail when the device class we actually need is not present. Obtained from: Juniper Networks, Inc. Modified: head/sys/dev/uart/uart_cpu_powerpc.c Modified: head/sys/dev/uart/uart_cpu_powerpc.c ============================================================================== --- head/sys/dev/uart/uart_cpu_powerpc.c Sat Jul 26 17:24:58 2014 (r269130) +++ head/sys/dev/uart/uart_cpu_powerpc.c Sat Jul 26 17:49:40 2014 (r269131) @@ -113,10 +113,6 @@ uart_cpu_getdev(int devtype, struct uart phandle_t input, opts, chosen; int error; - class = &uart_z8530_class; - if (class == NULL) - return (ENXIO); - opts = OF_finddevice("/options"); chosen = OF_finddevice("/chosen"); switch (devtype) { @@ -181,6 +177,9 @@ uart_cpu_getdev(int devtype, struct uart } else return (ENXIO); + if (class == NULL) + return (ENXIO); + error = OF_decode_addr(input, 0, &di->bas.bst, &di->bas.bsh); if (error) return (error);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407261749.s6QHnene038913>