Use the modern spelling of ofw_bus_node_is_compatible in sys/arm.
Sponsored by: ABT Systems Ltd
This commit is contained in:
parent
88cc0bb940
commit
87acb7f815
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308531
@ -195,7 +195,7 @@ aw_ccu_search_compatible(void)
|
||||
|
||||
root = OF_finddevice("/");
|
||||
for (compat = compat_data; compat->ocd_str != NULL; compat++)
|
||||
if (fdt_is_compatible(root, compat->ocd_str))
|
||||
if (ofw_bus_node_is_compatible(root, compat->ocd_str))
|
||||
break;
|
||||
|
||||
return (compat);
|
||||
|
@ -81,7 +81,7 @@ static boolean_t alpine_validate_cpu(u_int, phandle_t, u_int, pcell_t *);
|
||||
static boolean_t
|
||||
alpine_validate_cpu(u_int id, phandle_t child, u_int addr_cell, pcell_t *reg)
|
||||
{
|
||||
return fdt_is_compatible(child, "arm,cortex-a15");
|
||||
return ofw_bus_node_is_compatible(child, "arm,cortex-a15");
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -312,7 +312,7 @@ gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt,
|
||||
|
||||
if (self == 0) {
|
||||
for (ocd = compat_data; ocd->ocd_str != NULL; ocd++) {
|
||||
if (fdt_is_compatible(iparent, ocd->ocd_str)) {
|
||||
if (ofw_bus_node_is_compatible(iparent, ocd->ocd_str)) {
|
||||
self = iparent;
|
||||
break;
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/fdt/fdt_common.h>
|
||||
#include <dev/ofw/openfirm.h>
|
||||
#include <dev/ofw/ofw_bus_subr.h>
|
||||
|
||||
#include <machine/fdt.h>
|
||||
|
||||
@ -56,7 +57,7 @@ fdt_aic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||
{
|
||||
int offset;
|
||||
|
||||
if (fdt_is_compatible(node, "atmel,at91rm9200-aic"))
|
||||
if (ofw_bus_node_is_compatible(node, "atmel,at91rm9200-aic"))
|
||||
offset = 0;
|
||||
else
|
||||
return (ENXIO);
|
||||
|
@ -1261,7 +1261,7 @@ bcm2835_cpufreq_identify(driver_t *driver, device_t parent)
|
||||
|
||||
root = OF_finddevice("/");
|
||||
for (compat = compat_data; compat->ocd_str != NULL; compat++)
|
||||
if (fdt_is_compatible(root, compat->ocd_str))
|
||||
if (ofw_bus_node_is_compatible(root, compat->ocd_str))
|
||||
break;
|
||||
|
||||
if (compat->ocd_data == 0)
|
||||
|
@ -232,7 +232,7 @@ static int
|
||||
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||
int *pol)
|
||||
{
|
||||
if (!fdt_is_compatible(node, "lpc,pic"))
|
||||
if (!ofw_bus_node_is_compatible(node, "lpc,pic"))
|
||||
return (ENXIO);
|
||||
|
||||
*interrupt = fdt32_to_cpu(intr[0]);
|
||||
|
@ -643,7 +643,7 @@ mv_gpio_init(void)
|
||||
*/
|
||||
ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0]));
|
||||
|
||||
if (fdt_is_compatible(ctrl, e->compat))
|
||||
if (ofw_bus_node_is_compatible(ctrl, e->compat))
|
||||
/* Call a handler. */
|
||||
if ((rv = e->handler(ctrl,
|
||||
(pcell_t *)&gpios, len)))
|
||||
|
@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/fdt/fdt_common.h>
|
||||
#include <dev/ofw/openfirm.h>
|
||||
#include <dev/ofw/ofw_bus_subr.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/fdt.h>
|
||||
@ -230,7 +231,8 @@ fdt_pm(phandle_t node)
|
||||
if (dev_mask & (1 << i))
|
||||
continue;
|
||||
|
||||
compat = fdt_is_compatible(node, fdt_pm_mask_table[i].compat);
|
||||
compat = ofw_bus_node_is_compatible(node,
|
||||
fdt_pm_mask_table[i].compat);
|
||||
#if defined(SOC_MV_KIRKWOOD)
|
||||
if (compat && (cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) {
|
||||
dev_mask |= (1 << i);
|
||||
@ -2092,7 +2094,7 @@ win_cpu_from_dt(void)
|
||||
* Retrieve CESA SRAM data.
|
||||
*/
|
||||
if ((node = OF_finddevice("sram")) != -1)
|
||||
if (fdt_is_compatible(node, "mrvl,cesa-sram"))
|
||||
if (ofw_bus_node_is_compatible(node, "mrvl,cesa-sram"))
|
||||
goto moveon;
|
||||
|
||||
if ((node = OF_finddevice("/")) == 0)
|
||||
@ -2120,7 +2122,7 @@ win_cpu_from_dt(void)
|
||||
|
||||
/* Check if there is a second CESA node */
|
||||
while ((node = OF_peer(node)) != 0) {
|
||||
if (fdt_is_compatible(node, "mrvl,cesa-sram")) {
|
||||
if (ofw_bus_node_is_compatible(node, "mrvl,cesa-sram")) {
|
||||
if (fdt_regsize(node, &sram_base, &sram_size) != 0)
|
||||
return (EINVAL);
|
||||
break;
|
||||
@ -2170,7 +2172,7 @@ fdt_win_setup(void)
|
||||
|
||||
soc_node = &soc_nodes[i];
|
||||
|
||||
if (!fdt_is_compatible(child, soc_node->compat))
|
||||
if (!ofw_bus_node_is_compatible(child,soc_node->compat))
|
||||
continue;
|
||||
|
||||
err = fdt_regsize(child, &base, &size);
|
||||
@ -2319,8 +2321,8 @@ fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||
int *pol)
|
||||
{
|
||||
|
||||
if (!fdt_is_compatible(node, "mrvl,pic") &&
|
||||
!fdt_is_compatible(node, "mrvl,mpic"))
|
||||
if (!ofw_bus_node_is_compatible(node, "mrvl,pic") &&
|
||||
!ofw_bus_node_is_compatible(node, "mrvl,mpic"))
|
||||
return (ENXIO);
|
||||
|
||||
*interrupt = fdt32_to_cpu(intr[0]);
|
||||
|
@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <arm/mv/mvwin.h>
|
||||
|
||||
#include <dev/fdt/fdt_common.h>
|
||||
#include <dev/ofw/ofw_bus_subr.h>
|
||||
|
||||
static int platform_mpp_init(void);
|
||||
#if defined(SOC_MV_ARMADAXP)
|
||||
@ -103,7 +104,7 @@ platform_mpp_init(void)
|
||||
* Try to access the MPP node directly i.e. through /aliases/mpp.
|
||||
*/
|
||||
if ((node = OF_finddevice("mpp")) != -1)
|
||||
if (fdt_is_compatible(node, "mrvl,mpp"))
|
||||
if (ofw_bus_node_is_compatible(node, "mrvl,mpp"))
|
||||
goto moveon;
|
||||
/*
|
||||
* Find the node the long way.
|
||||
@ -290,8 +291,8 @@ platform_sram_devmap(struct devmap_entry *map)
|
||||
* SRAM range.
|
||||
*/
|
||||
if ((child = OF_finddevice("/sram")) != 0)
|
||||
if (fdt_is_compatible(child, "mrvl,cesa-sram") ||
|
||||
fdt_is_compatible(child, "mrvl,scratchpad"))
|
||||
if (ofw_bus_node_is_compatible(child, "mrvl,cesa-sram") ||
|
||||
ofw_bus_node_is_compatible(child, "mrvl,scratchpad"))
|
||||
goto moveon;
|
||||
|
||||
if ((root = OF_finddevice("/")) == 0)
|
||||
@ -406,7 +407,7 @@ platform_devmap_init(void)
|
||||
i += 2;
|
||||
}
|
||||
|
||||
if (fdt_is_compatible(child, "mrvl,lbc")) {
|
||||
if (ofw_bus_node_is_compatible(child, "mrvl,lbc")) {
|
||||
/* Check available space */
|
||||
if (OF_getprop(child, "bank-count", (void *)&bank_count,
|
||||
sizeof(bank_count)) <= 0)
|
||||
|
@ -429,12 +429,12 @@ mv_pcib_attach(device_t self)
|
||||
|
||||
node = ofw_bus_get_node(self);
|
||||
parnode = OF_parent(node);
|
||||
if (fdt_is_compatible(node, "mrvl,pcie")) {
|
||||
if (ofw_bus_node_is_compatible(node, "mrvl,pcie")) {
|
||||
sc->sc_type = MV_TYPE_PCIE;
|
||||
sc->sc_win_target = MV_WIN_PCIE_TARGET(unit);
|
||||
sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(unit);
|
||||
sc->sc_io_win_attr = MV_WIN_PCIE_IO_ATTR(unit);
|
||||
} else if (fdt_is_compatible(node, "mrvl,pci")) {
|
||||
} else if (ofw_bus_node_is_compatible(node, "mrvl,pci")) {
|
||||
sc->sc_type = MV_TYPE_PCI;
|
||||
sc->sc_win_target = MV_WIN_PCI_TARGET;
|
||||
sc->sc_mem_win_attr = MV_WIN_PCI_MEM_ATTR;
|
||||
|
@ -614,7 +614,7 @@ rk30_gpio_init(void)
|
||||
*/
|
||||
ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0]));
|
||||
|
||||
if (fdt_is_compatible(ctrl, e->compat))
|
||||
if (ofw_bus_node_is_compatible(ctrl, e->compat))
|
||||
/* Call a handler. */
|
||||
if ((rv = e->handler(ctrl,
|
||||
(pcell_t *)&gpios, len)))
|
||||
|
@ -351,7 +351,7 @@ am335x_syscons_find_panel_node(phandle_t start)
|
||||
phandle_t result;
|
||||
|
||||
for (child = OF_child(start); child != 0; child = OF_peer(child)) {
|
||||
if (fdt_is_compatible(child, "ti,am335x-lcd"))
|
||||
if (ofw_bus_node_is_compatible(child, "ti,am335x-lcd"))
|
||||
return (child);
|
||||
if ((result = am335x_syscons_find_panel_node(child)))
|
||||
return (result);
|
||||
|
@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/fdt/fdt_common.h>
|
||||
#include <dev/ofw/openfirm.h>
|
||||
#include <dev/ofw/ofw_bus_subr.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/vmparam.h>
|
||||
@ -52,7 +53,7 @@ fdt_intc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||
int *pol)
|
||||
{
|
||||
|
||||
if (!fdt_is_compatible(node, "arm,versatile-vic"))
|
||||
if (!ofw_bus_node_is_compatible(node, "arm,versatile-vic"))
|
||||
return (ENXIO);
|
||||
|
||||
*interrupt = fdt32_to_cpu(intr[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user