/* Set up the GIC */
void __init gic_init(void)
{
+ static const struct dt_device_match gic_ids[] __initconst =
+ {
+ DT_MATCH_GIC,
+ { /* sentinel */ },
+ };
struct dt_device_node *node;
int res;
- node = dt_find_interrupt_controller("arm,cortex-a15-gic");
+ node = dt_find_interrupt_controller(gic_ids);
if ( !node )
panic("Unable to find compatible GIC in the device tree\n");
}
}
-struct dt_device_node * __init dt_find_interrupt_controller(const char *compat)
+struct dt_device_node * __init
+dt_find_interrupt_controller(const struct dt_device_match *matches)
{
struct dt_device_node *np = NULL;
- while ( (np = dt_find_compatible_node(np, NULL, compat)) )
+ while ( (np = dt_find_matching_node(np, matches)) )
{
if ( !dt_find_property(np, "interrupt-controller", NULL) )
continue;
#ifndef __ASSEMBLY__
#include <xen/device_tree.h>
+#define DT_MATCH_GIC DT_MATCH_COMPATIBLE("arm,cortex-a15-gic")
+
extern int domain_vgic_init(struct domain *d);
extern void domain_vgic_free(struct domain *d);
*
* If found, return the interrupt controller device node.
*/
-struct dt_device_node * __init dt_find_interrupt_controller(const char *compat);
+struct dt_device_node * __init
+dt_find_interrupt_controller(const struct dt_device_match *matches);
#define dt_prop_cmp(s1, s2) strcmp((s1), (s2))
#define dt_node_cmp(s1, s2) strcasecmp((s1), (s2))