|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 09/16] xen/arm: use device api to detect GIC version
Hello Vijaya,
Thank you for the patch.
On 04/15/2014 12:17 PM, vijay.kilari@xxxxxxxxx wrote:
> diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c
> index 7c63bae..1e62dd9 100644
> --- a/xen/arch/arm/gic-v2.c
> +++ b/xen/arch/arm/gic-v2.c
> @@ -31,6 +31,7 @@
> #include <asm/p2m.h>
> #include <asm/domain.h>
> #include <asm/platform.h>
> +#include <asm/device.h>
>
> #include <asm/gic_v2_defs.h>
> #include <asm/gic.h>
> @@ -276,20 +277,10 @@ static void __cpuinit gicv2_hyp_disable(void)
> }
>
> /* Set up the GIC */
> -void __init gicv2_init(void)
> +int __init gicv2_init(struct dt_device_node *node, const void *data)
The function can be static.
[..]
> +static const char * const gicv2_dt_compat[] __initconst =
> +{
> + "arm,cortex-a15-gic",
> + "arm,cortex-a9-gic",
> + NULL
> +};
> +
> +DT_DEVICE_START(gicv2, "GIC", DEVICE_GIC)
I would use "GICv2" instead of "GIC".
> + .compatible = gicv2_dt_compat,
> + .init = gicv2_init,
> +DT_DEVICE_END
> +
> /*
> * Local variables:
> * mode: C
> diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
> index ce21ef6..4a86c42 100644
> --- a/xen/arch/arm/gic.c
> +++ b/xen/arch/arm/gic.c
> @@ -31,6 +31,7 @@
> #include <asm/p2m.h>
> #include <asm/domain.h>
> #include <asm/platform.h>
> +#include <asm/device.h>
>
> #include <asm/gic.h>
>
> @@ -264,8 +265,29 @@ int gic_irq_xlate(const u32 *intspec, unsigned int
> intsize,
> /* Set up the GIC */
> void __init gic_init(void)
> {
> - gicv2_init();
> + int rc;
> + struct dt_device_node *node;
> + uint8_t num_gics = 0;
bool_t gic_present?
> +
> spin_lock_init(&gic_lock);
> +
> + dt_for_each_device_node(dt_host, node)
dt_for_each_device_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 |