From owner-svn-src-head@FreeBSD.ORG Wed Aug 21 04:05:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DC843242; Wed, 21 Aug 2013 04:05:06 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CA4C521F2; Wed, 21 Aug 2013 04:05:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7L456Md044144; Wed, 21 Aug 2013 04:05:06 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7L456DY044143; Wed, 21 Aug 2013 04:05:06 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201308210405.r7L456DY044143@svn.freebsd.org> From: Ian Lepore Date: Wed, 21 Aug 2013 04:05:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254589 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 04:05:06 -0000 Author: ian Date: Wed Aug 21 04:05:06 2013 New Revision: 254589 URL: http://svnweb.freebsd.org/changeset/base/254589 Log: Check for generic ns16550 after all other types. A device may be compatible with 16550 but also have a more specific/capable driver earlier in the list. Modified: head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Wed Aug 21 02:14:23 2013 (r254588) +++ head/sys/dev/uart/uart_bus_fdt.c Wed Aug 21 04:05:06 2013 (r254589) @@ -101,9 +101,7 @@ uart_fdt_probe(device_t dev) int err; sc = device_get_softc(dev); - if (ofw_bus_is_compatible(dev, "ns16550")) - sc->sc_class = &uart_ns8250_class; - else if (ofw_bus_is_compatible(dev, "lpc,uart")) + if (ofw_bus_is_compatible(dev, "lpc,uart")) sc->sc_class = &uart_lpc_class; else if (ofw_bus_is_compatible(dev, "fsl,imx-uart")) sc->sc_class = &uart_imx_class; @@ -113,6 +111,8 @@ uart_fdt_probe(device_t dev) sc->sc_class = &uart_s3c2410_class; else if (ofw_bus_is_compatible(dev, "cadence,uart")) sc->sc_class = &uart_cdnc_class; + else if (ofw_bus_is_compatible(dev, "ns16550")) + sc->sc_class = &uart_ns8250_class; else return (ENXIO);