Date: Sun, 16 Apr 2017 17:53:45 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317033 - head/sys/arm/freescale/imx Message-ID: <201704161753.v3GHrj6v042569@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704161753.v3GHrj6v042569>