svn commit: r317033 - head/sys/arm/freescale/imx
Ian Lepore
ian at FreeBSD.org
Sun Apr 16 17:53:46 UTC 2017
Author: ian
Date: Sun Apr 16 17:53:44 2017
New Revision: 317033
URL: https://svnweb.freebsd.org/changeset/base/317033
Log:
Convert probing to use an ofw_compat_data array, and add imx6ul to the list.
Modified:
head/sys/arm/freescale/imx/imx6_usbphy.c
Modified: head/sys/arm/freescale/imx/imx6_usbphy.c
==============================================================================
--- head/sys/arm/freescale/imx/imx6_usbphy.c Sun Apr 16 16:48:25 2017 (r317032)
+++ head/sys/arm/freescale/imx/imx6_usbphy.c Sun Apr 16 17:53:44 2017 (r317033)
@@ -68,6 +68,12 @@ struct usbphy_softc {
u_int phy_num;
};
+static struct ofw_compat_data compat_data[] = {
+ {"fsl,imx6q-usbphy", true},
+ {"fsl,imx6ul-usbphy", true},
+ {NULL, false}
+};
+
static int
usbphy_detach(device_t dev)
{
@@ -167,7 +173,7 @@ usbphy_probe(device_t dev)
if (!ofw_bus_status_okay(dev))
return (ENXIO);
- if (ofw_bus_is_compatible(dev, "fsl,imx6q-usbphy") == 0)
+ if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data)
return (ENXIO);
device_set_desc(dev, "Freescale i.MX6 USB PHY");
More information about the svn-src-head
mailing list