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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to