Convert probing to use an ofw_compat_data array, and add imx6ul to the list.

This commit is contained in:
Ian Lepore 2017-04-16 17:53:44 +00:00
parent 150890b0c6
commit b8255b91e7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317033

View File

@ -68,6 +68,12 @@ struct usbphy_softc {
u_int phy_num; u_int phy_num;
}; };
static struct ofw_compat_data compat_data[] = {
{"fsl,imx6q-usbphy", true},
{"fsl,imx6ul-usbphy", true},
{NULL, false}
};
static int static int
usbphy_detach(device_t dev) usbphy_detach(device_t dev)
{ {
@ -167,7 +173,7 @@ usbphy_probe(device_t dev)
if (!ofw_bus_status_okay(dev)) if (!ofw_bus_status_okay(dev))
return (ENXIO); return (ENXIO);
if (ofw_bus_is_compatible(dev, "fsl,imx6q-usbphy") == 0) if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data)
return (ENXIO); return (ENXIO);
device_set_desc(dev, "Freescale i.MX6 USB PHY"); device_set_desc(dev, "Freescale i.MX6 USB PHY");