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("/");
|
root = OF_finddevice("/");
|
||||||
for (compat = compat_data; compat->ocd_str != NULL; compat++)
|
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;
|
break;
|
||||||
|
|
||||||
return (compat);
|
return (compat);
|
||||||
|
@ -81,7 +81,7 @@ static boolean_t alpine_validate_cpu(u_int, phandle_t, u_int, pcell_t *);
|
|||||||
static boolean_t
|
static boolean_t
|
||||||
alpine_validate_cpu(u_int id, phandle_t child, u_int addr_cell, pcell_t *reg)
|
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
|
static int
|
||||||
|
@ -312,7 +312,7 @@ gic_decode_fdt(phandle_t iparent, pcell_t *intr, int *interrupt,
|
|||||||
|
|
||||||
if (self == 0) {
|
if (self == 0) {
|
||||||
for (ocd = compat_data; ocd->ocd_str != NULL; ocd++) {
|
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;
|
self = iparent;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <dev/fdt/fdt_common.h>
|
#include <dev/fdt/fdt_common.h>
|
||||||
#include <dev/ofw/openfirm.h>
|
#include <dev/ofw/openfirm.h>
|
||||||
|
#include <dev/ofw/ofw_bus_subr.h>
|
||||||
|
|
||||||
#include <machine/fdt.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;
|
int offset;
|
||||||
|
|
||||||
if (fdt_is_compatible(node, "atmel,at91rm9200-aic"))
|
if (ofw_bus_node_is_compatible(node, "atmel,at91rm9200-aic"))
|
||||||
offset = 0;
|
offset = 0;
|
||||||
else
|
else
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
@ -1261,7 +1261,7 @@ bcm2835_cpufreq_identify(driver_t *driver, device_t parent)
|
|||||||
|
|
||||||
root = OF_finddevice("/");
|
root = OF_finddevice("/");
|
||||||
for (compat = compat_data; compat->ocd_str != NULL; compat++)
|
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;
|
break;
|
||||||
|
|
||||||
if (compat->ocd_data == 0)
|
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,
|
fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
|
||||||
int *pol)
|
int *pol)
|
||||||
{
|
{
|
||||||
if (!fdt_is_compatible(node, "lpc,pic"))
|
if (!ofw_bus_node_is_compatible(node, "lpc,pic"))
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
|
||||||
*interrupt = fdt32_to_cpu(intr[0]);
|
*interrupt = fdt32_to_cpu(intr[0]);
|
||||||
|
@ -643,7 +643,7 @@ mv_gpio_init(void)
|
|||||||
*/
|
*/
|
||||||
ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0]));
|
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. */
|
/* Call a handler. */
|
||||||
if ((rv = e->handler(ctrl,
|
if ((rv = e->handler(ctrl,
|
||||||
(pcell_t *)&gpios, len)))
|
(pcell_t *)&gpios, len)))
|
||||||
|
@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <dev/fdt/fdt_common.h>
|
#include <dev/fdt/fdt_common.h>
|
||||||
#include <dev/ofw/openfirm.h>
|
#include <dev/ofw/openfirm.h>
|
||||||
|
#include <dev/ofw/ofw_bus_subr.h>
|
||||||
|
|
||||||
#include <machine/bus.h>
|
#include <machine/bus.h>
|
||||||
#include <machine/fdt.h>
|
#include <machine/fdt.h>
|
||||||
@ -230,7 +231,8 @@ fdt_pm(phandle_t node)
|
|||||||
if (dev_mask & (1 << i))
|
if (dev_mask & (1 << i))
|
||||||
continue;
|
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 defined(SOC_MV_KIRKWOOD)
|
||||||
if (compat && (cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) {
|
if (compat && (cpu_pm_ctrl & fdt_pm_mask_table[i].mask)) {
|
||||||
dev_mask |= (1 << i);
|
dev_mask |= (1 << i);
|
||||||
@ -2092,7 +2094,7 @@ win_cpu_from_dt(void)
|
|||||||
* Retrieve CESA SRAM data.
|
* Retrieve CESA SRAM data.
|
||||||
*/
|
*/
|
||||||
if ((node = OF_finddevice("sram")) != -1)
|
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;
|
goto moveon;
|
||||||
|
|
||||||
if ((node = OF_finddevice("/")) == 0)
|
if ((node = OF_finddevice("/")) == 0)
|
||||||
@ -2120,7 +2122,7 @@ win_cpu_from_dt(void)
|
|||||||
|
|
||||||
/* Check if there is a second CESA node */
|
/* Check if there is a second CESA node */
|
||||||
while ((node = OF_peer(node)) != 0) {
|
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)
|
if (fdt_regsize(node, &sram_base, &sram_size) != 0)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
break;
|
break;
|
||||||
@ -2170,7 +2172,7 @@ fdt_win_setup(void)
|
|||||||
|
|
||||||
soc_node = &soc_nodes[i];
|
soc_node = &soc_nodes[i];
|
||||||
|
|
||||||
if (!fdt_is_compatible(child, soc_node->compat))
|
if (!ofw_bus_node_is_compatible(child,soc_node->compat))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
err = fdt_regsize(child, &base, &size);
|
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)
|
int *pol)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!fdt_is_compatible(node, "mrvl,pic") &&
|
if (!ofw_bus_node_is_compatible(node, "mrvl,pic") &&
|
||||||
!fdt_is_compatible(node, "mrvl,mpic"))
|
!ofw_bus_node_is_compatible(node, "mrvl,mpic"))
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
|
||||||
*interrupt = fdt32_to_cpu(intr[0]);
|
*interrupt = fdt32_to_cpu(intr[0]);
|
||||||
|
@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <arm/mv/mvwin.h>
|
#include <arm/mv/mvwin.h>
|
||||||
|
|
||||||
#include <dev/fdt/fdt_common.h>
|
#include <dev/fdt/fdt_common.h>
|
||||||
|
#include <dev/ofw/ofw_bus_subr.h>
|
||||||
|
|
||||||
static int platform_mpp_init(void);
|
static int platform_mpp_init(void);
|
||||||
#if defined(SOC_MV_ARMADAXP)
|
#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.
|
* Try to access the MPP node directly i.e. through /aliases/mpp.
|
||||||
*/
|
*/
|
||||||
if ((node = OF_finddevice("mpp")) != -1)
|
if ((node = OF_finddevice("mpp")) != -1)
|
||||||
if (fdt_is_compatible(node, "mrvl,mpp"))
|
if (ofw_bus_node_is_compatible(node, "mrvl,mpp"))
|
||||||
goto moveon;
|
goto moveon;
|
||||||
/*
|
/*
|
||||||
* Find the node the long way.
|
* Find the node the long way.
|
||||||
@ -290,8 +291,8 @@ platform_sram_devmap(struct devmap_entry *map)
|
|||||||
* SRAM range.
|
* SRAM range.
|
||||||
*/
|
*/
|
||||||
if ((child = OF_finddevice("/sram")) != 0)
|
if ((child = OF_finddevice("/sram")) != 0)
|
||||||
if (fdt_is_compatible(child, "mrvl,cesa-sram") ||
|
if (ofw_bus_node_is_compatible(child, "mrvl,cesa-sram") ||
|
||||||
fdt_is_compatible(child, "mrvl,scratchpad"))
|
ofw_bus_node_is_compatible(child, "mrvl,scratchpad"))
|
||||||
goto moveon;
|
goto moveon;
|
||||||
|
|
||||||
if ((root = OF_finddevice("/")) == 0)
|
if ((root = OF_finddevice("/")) == 0)
|
||||||
@ -406,7 +407,7 @@ platform_devmap_init(void)
|
|||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fdt_is_compatible(child, "mrvl,lbc")) {
|
if (ofw_bus_node_is_compatible(child, "mrvl,lbc")) {
|
||||||
/* Check available space */
|
/* Check available space */
|
||||||
if (OF_getprop(child, "bank-count", (void *)&bank_count,
|
if (OF_getprop(child, "bank-count", (void *)&bank_count,
|
||||||
sizeof(bank_count)) <= 0)
|
sizeof(bank_count)) <= 0)
|
||||||
|
@ -429,12 +429,12 @@ mv_pcib_attach(device_t self)
|
|||||||
|
|
||||||
node = ofw_bus_get_node(self);
|
node = ofw_bus_get_node(self);
|
||||||
parnode = OF_parent(node);
|
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_type = MV_TYPE_PCIE;
|
||||||
sc->sc_win_target = MV_WIN_PCIE_TARGET(unit);
|
sc->sc_win_target = MV_WIN_PCIE_TARGET(unit);
|
||||||
sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(unit);
|
sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(unit);
|
||||||
sc->sc_io_win_attr = MV_WIN_PCIE_IO_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_type = MV_TYPE_PCI;
|
||||||
sc->sc_win_target = MV_WIN_PCI_TARGET;
|
sc->sc_win_target = MV_WIN_PCI_TARGET;
|
||||||
sc->sc_mem_win_attr = MV_WIN_PCI_MEM_ATTR;
|
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]));
|
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. */
|
/* Call a handler. */
|
||||||
if ((rv = e->handler(ctrl,
|
if ((rv = e->handler(ctrl,
|
||||||
(pcell_t *)&gpios, len)))
|
(pcell_t *)&gpios, len)))
|
||||||
|
@ -351,7 +351,7 @@ am335x_syscons_find_panel_node(phandle_t start)
|
|||||||
phandle_t result;
|
phandle_t result;
|
||||||
|
|
||||||
for (child = OF_child(start); child != 0; child = OF_peer(child)) {
|
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);
|
return (child);
|
||||||
if ((result = am335x_syscons_find_panel_node(child)))
|
if ((result = am335x_syscons_find_panel_node(child)))
|
||||||
return (result);
|
return (result);
|
||||||
|
@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <dev/fdt/fdt_common.h>
|
#include <dev/fdt/fdt_common.h>
|
||||||
#include <dev/ofw/openfirm.h>
|
#include <dev/ofw/openfirm.h>
|
||||||
|
#include <dev/ofw/ofw_bus_subr.h>
|
||||||
|
|
||||||
#include <machine/bus.h>
|
#include <machine/bus.h>
|
||||||
#include <machine/vmparam.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)
|
int *pol)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!fdt_is_compatible(node, "arm,versatile-vic"))
|
if (!ofw_bus_node_is_compatible(node, "arm,versatile-vic"))
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
|
||||||
*interrupt = fdt32_to_cpu(intr[0]);
|
*interrupt = fdt32_to_cpu(intr[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user