const struct fdt_match *fdt_match_node(void *fdt, int nodeoff,
const struct fdt_match *match_table);
-int fdt_find_match(void *fdt, const struct fdt_match *match_table,
+int fdt_find_match(void *fdt, int startoff,
+ const struct fdt_match *match_table,
const struct fdt_match **out_match);
int fdt_get_node_addr_size(void *fdt, int node, unsigned long *addr,
return NULL;
}
-int fdt_find_match(void *fdt, const struct fdt_match *match_table,
+int fdt_find_match(void *fdt, int startoff,
+ const struct fdt_match *match_table,
const struct fdt_match **out_match)
{
int nodeoff;
return SBI_ENODEV;
while (match_table->compatible) {
- nodeoff = fdt_node_offset_by_compatible(fdt, -1,
+ nodeoff = fdt_node_offset_by_compatible(fdt, startoff,
match_table->compatible);
if (nodeoff >= 0) {
if (out_match)
for (pos = 0; pos < array_size(ipi_drivers); pos++) {
drv = ipi_drivers[pos];
- noff = fdt_find_match(fdt, drv->match_table, &match);
+ noff = fdt_find_match(fdt, -1, drv->match_table, &match);
if (noff < 0)
continue;
for (pos = 0; pos < array_size(irqchip_drivers); pos++) {
drv = irqchip_drivers[pos];
- noff = fdt_find_match(fdt, drv->match_table, &match);
+ noff = fdt_find_match(fdt, -1, drv->match_table, &match);
if (noff < 0)
continue;
for (pos = 0; pos < array_size(reset_drivers); pos++) {
drv = reset_drivers[pos];
- noff = fdt_find_match(fdt, drv->match_table, &match);
+ noff = fdt_find_match(fdt, -1, drv->match_table, &match);
if (noff < 0)
continue;
for (pos = 0; pos < array_size(serial_drivers); pos++) {
drv = serial_drivers[pos];
- noff = fdt_find_match(fdt, drv->match_table, &match);
+ noff = fdt_find_match(fdt, -1, drv->match_table, &match);
if (noff < 0)
continue;
for (pos = 0; pos < array_size(timer_drivers); pos++) {
drv = timer_drivers[pos];
- noff = fdt_find_match(fdt, drv->match_table, &match);
+ noff = fdt_find_match(fdt, -1, drv->match_table, &match);
if (noff < 0)
continue;
if (!plat->match_table)
continue;
- noff = fdt_find_match(fdt, plat->match_table, &match);
+ noff = fdt_find_match(fdt, -1, plat->match_table, &match);
if (noff < 0)
continue;