Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2017 14:42:58 +0000 (UTC)
From:      Ruslan Bukin <br@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314390 - head/sys/dev/usb/controller
Message-ID:  <201702281442.v1SEgwKU088390@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: br
Date: Tue Feb 28 14:42:57 2017
New Revision: 314390
URL: https://svnweb.freebsd.org/changeset/base/314390

Log:
  Add compatible string.
  
  This restores USB attaching on SOCKIT board after reusing
  standard DTS files.
  
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/dev/usb/controller/dwc_otg_fdt.c

Modified: head/sys/dev/usb/controller/dwc_otg_fdt.c
==============================================================================
--- head/sys/dev/usb/controller/dwc_otg_fdt.c	Tue Feb 28 14:02:16 2017	(r314389)
+++ head/sys/dev/usb/controller/dwc_otg_fdt.c	Tue Feb 28 14:42:57 2017	(r314390)
@@ -57,6 +57,12 @@ __FBSDID("$FreeBSD$");
 
 static device_probe_t dwc_otg_probe;
 
+static struct ofw_compat_data compat_data[] = {
+	{ "synopsys,designware-hs-otg2",	1 },
+	{ "snps,dwc2",				1 },
+	{ NULL,					0 }
+};
+
 static int
 dwc_otg_probe(device_t dev)
 {
@@ -64,7 +70,7 @@ dwc_otg_probe(device_t dev)
 	if (!ofw_bus_status_okay(dev))
 		return (ENXIO);
 
-	if (!ofw_bus_is_compatible(dev, "synopsys,designware-hs-otg2"))
+	if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data)
 		return (ENXIO);
 
 	device_set_desc(dev, "DWC OTG 2.0 integrated USB controller");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702281442.v1SEgwKU088390>