[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 06/12] xen/arm: Introduce a generic way to describe device



>>> On 16.01.15 at 15:24, <julien.grall@xxxxxxxxxx> wrote:
> ---
>  xen/common/device.c           | 21 +++++++++++++++++++++
>  xen/common/device_tree.c      |  3 +++

Is there a Makefile change missing here?

> --- /dev/null
> +++ b/xen/common/device.c
> @@ -0,0 +1,21 @@
> +#include <xen/types.h>
> +#include <xen/device.h>
> +
> +void device_initialize(struct device *dev, enum device_type type)
> +{
> +    dev->type = type;
> +
> +#ifdef HAS_DEVICE_TREE
> +    if ( type == DEV_DT )
> +        dev->of_node = dev_to_dt(dev);
> +#endif
> +}
> +
> +/*
> + * Local variables:
> + * mode: C
> + * c-file-style: "BSD"
> + * c-basic-offset: 4
> + * indent-tabs-mode: nil
> + * End:
> + */
> diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
> index 34a1b9e..d1c716f 100644
> --- a/xen/common/device_tree.c
> +++ b/xen/common/device_tree.c
> @@ -1454,6 +1454,9 @@ static unsigned long __init unflatten_dt_node(const 
> void *fdt,
>              ((char *)pp->value)[sz - 1] = 0;
>              dt_dprintk("fixed up name for %s -> %s\n", pathp,
>                         (char *)pp->value);
> +            /* Generic device initialization */
> +            np->dev.type = DEV_DT;
> +            np->dev.of_node = np;

Why is this not device_initialize(&np->dev, DEV_DT)?

> --- /dev/null
> +++ b/xen/include/asm-x86/device.h
> @@ -0,0 +1,25 @@
> +#ifndef __ASM_X86_DEVICE_H
> +#define __ASM_X86_DEVICE_H
> +
> +#include <xen/pci.h>
> +
> +/*
> + * x86 is only supported PCI. Therefore it's possible to directly use

x86 only supports ...

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.