|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 08/15] xen/arm: use device api to detect GIC version
Hi Julien,
>
>> +
>> + dt_for_each_device_node(dt_host, node)
>> + {
>> + rc = device_init(node, DEVICE_GIC, NULL);
>> + if ( !rc )
>> + num_gics++;
>
> Xen only supports a single GIC for now. You have to initialized the
> correct one (see dt_find_interrupt_controller).
dt_find_interrupt_controller expects compatibility string as below to fetch
the gic node which can be passed to device_init().
static const struct dt_device_match gic_ids[] __initconst =
{
DT_MATCH_GIC,
{ /* sentinel */ },
};
In such case, generic driver has to pass compatibility strings of both
GIC v3 & GIC v2 to find the node in dt. Is this ok?
Other way is to break when num_gics = 1 when it finds the first gic node.
>
> Regards,
>
> --
> Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |