Re: [Xen-devel] [RFC PATCH 13/31] xen/arm: Add driver_data field to struct device

2017-12-05 Thread Oleksandr Tyshchenko
Hi, Julien.

On Tue, Dec 5, 2017 at 1:26 PM, Julien Grall  wrote:
>
>
> On 09/11/17 17:10, Oleksandr Tyshchenko wrote:
>>
>> From: Oleksandr Tyshchenko 
>
>
> Please explain the rationale behind adding a new field in struct device.

Basically it is needed for the "direct ported" drivers from Linux. I
added this field in order to
make SCPI protocol driver happy. It operates with
platform_set_drvdata/platform_get_drvdata helpers.

Sure, I will add detailed description if we decide to go this way.

>
>>
>> Signed-off-by: Oleksandr Tyshchenko 
>> CC: Stefano Stabellini 
>> CC: Julien Grall 
>> ---
>>   xen/include/asm-arm/device.h | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h
>> index 6734ae8..3e2f34a 100644
>> --- a/xen/include/asm-arm/device.h
>> +++ b/xen/include/asm-arm/device.h
>> @@ -20,6 +20,7 @@ struct device
>>   struct dt_device_node *of_node; /* Used by drivers imported from
>> Linux */
>>   #endif
>>   struct dev_archdata archdata;
>> +void *driver_data;
>>   };
>> typedef struct device device_t;
>>
>
> Cheers,
>
> --
> Julien Grall



-- 
Regards,

Oleksandr Tyshchenko

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC PATCH 13/31] xen/arm: Add driver_data field to struct device

2017-12-05 Thread Julien Grall



On 09/11/17 17:10, Oleksandr Tyshchenko wrote:

From: Oleksandr Tyshchenko 


Please explain the rationale behind adding a new field in struct device.



Signed-off-by: Oleksandr Tyshchenko 
CC: Stefano Stabellini 
CC: Julien Grall 
---
  xen/include/asm-arm/device.h | 1 +
  1 file changed, 1 insertion(+)

diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h
index 6734ae8..3e2f34a 100644
--- a/xen/include/asm-arm/device.h
+++ b/xen/include/asm-arm/device.h
@@ -20,6 +20,7 @@ struct device
  struct dt_device_node *of_node; /* Used by drivers imported from Linux */
  #endif
  struct dev_archdata archdata;
+void *driver_data;
  };
  
  typedef struct device device_t;




Cheers,

--
Julien Grall

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [RFC PATCH 13/31] xen/arm: Add driver_data field to struct device

2017-12-04 Thread Stefano Stabellini
On Thu, 9 Nov 2017, Oleksandr Tyshchenko wrote:
> From: Oleksandr Tyshchenko 
> 
> Signed-off-by: Oleksandr Tyshchenko 
> CC: Stefano Stabellini 
> CC: Julien Grall 

Acked-by: Stefano Stabellini 

> ---
>  xen/include/asm-arm/device.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h
> index 6734ae8..3e2f34a 100644
> --- a/xen/include/asm-arm/device.h
> +++ b/xen/include/asm-arm/device.h
> @@ -20,6 +20,7 @@ struct device
>  struct dt_device_node *of_node; /* Used by drivers imported from Linux */
>  #endif
>  struct dev_archdata archdata;
> +void *driver_data;
>  };
>  
>  typedef struct device device_t;
> -- 
> 2.7.4
> 

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel