Use ofw_bus_node_is_compatible in more drivers used on arm.

Sponsored by:	ABT Systems Ltd
This commit is contained in:
Andrew Turner 2016-11-11 15:42:12 +00:00
parent f1cd40a19d
commit a2696bf3c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308533
3 changed files with 5 additions and 4 deletions

View File

@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
#include <arm/include/platformvar.h>
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_bus_subr.h>
#include <dev/fdt/fdt_common.h>
#include "platform_if.h"
@ -58,7 +59,7 @@ fdt_platform_probe(platform_t plat)
/* Is the device is compatible? */
root = OF_finddevice("/");
compat = FDT_PLATFORM(plat)->fdt_compatible;
if (fdt_is_compatible(root, compat) != 0)
if (ofw_bus_node_is_compatible(root, compat) != 0)
return 0;
/* Not compatible, return an error */

View File

@ -123,7 +123,7 @@ uart_fdt_find_compatible(phandle_t node, const struct ofw_compat_data *cd)
const struct ofw_compat_data *ocd;
for (ocd = cd; ocd->ocd_str != NULL; ocd++) {
if (fdt_is_compatible(node, ocd->ocd_str))
if (ofw_bus_node_is_compatible(node, ocd->ocd_str))
return (ocd);
}
return (NULL);

View File

@ -1566,8 +1566,8 @@ smsc_fdt_find_eth_node(phandle_t start)
/* Traverse through entire tree to find usb ethernet nodes. */
for (node = OF_child(start); node != 0; node = OF_peer(node)) {
if (fdt_is_compatible(node, "net,ethernet") &&
fdt_is_compatible(node, "usb,device"))
if (ofw_bus_node_is_compatible(node, "net,ethernet") &&
ofw_bus_node_is_compatible(node, "usb,device"))
return (node);
child = smsc_fdt_find_eth_node(node);
if (child != -1)