svn commit: r314390 - head/sys/dev/usb/controller
Ruslan Bukin
br at FreeBSD.org
Tue Feb 28 14:42:59 UTC 2017
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");
More information about the svn-src-all
mailing list