Re: [U-Boot] [PATCH v4] dm: core: implement dev_map_phsymem()

2016-05-08 Thread Vignesh R


On 05/06/2016 10:00 PM, Jagan Teki wrote:
> On 6 May 2016 at 21:16, R, Vignesh  wrote:
>>
>>
>> On 5/6/2016 9:00 PM, Jagan Teki wrote:
>>> On 6 May 2016 at 09:28, Vignesh R  wrote:
 This API helps to map physical register addresss pace of device to
 virtual address space easily. Its just a wrapper around map_physmem()
 with MAP_NOCACHE flag.

 Signed-off-by: Vignesh R 
 Suggested-by: Simon Glass 
 Reviewed-by: Jagan Teki 

 ---

 v4: Reorder include files to avoid build warning on dra7xx.

  drivers/core/device.c | 6 ++
  include/dm/device.h   | 9 +
  2 files changed, 15 insertions(+)

 diff --git a/drivers/core/device.c b/drivers/core/device.c
 index 1322991d6c7b..6b19b4b8c7a0 100644
 --- a/drivers/core/device.c
 +++ b/drivers/core/device.c
 @@ -10,6 +10,7 @@
   */

  #include 
 +#include 
>>>
>>> I think this look same as v3 [1] please check?
>>
>> Yeah, v3 has the include files in correct. Please ignore this patch.
>> Sorry for the spam.
> 
> Did you test this series on top of master?

Yes, this is tested on top of 2016.05-rc3

-- 
Regards
Vignesh
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4] dm: core: implement dev_map_phsymem()

2016-05-06 Thread Jagan Teki
On 6 May 2016 at 21:16, R, Vignesh  wrote:
>
>
> On 5/6/2016 9:00 PM, Jagan Teki wrote:
>> On 6 May 2016 at 09:28, Vignesh R  wrote:
>>> This API helps to map physical register addresss pace of device to
>>> virtual address space easily. Its just a wrapper around map_physmem()
>>> with MAP_NOCACHE flag.
>>>
>>> Signed-off-by: Vignesh R 
>>> Suggested-by: Simon Glass 
>>> Reviewed-by: Jagan Teki 
>>>
>>> ---
>>>
>>> v4: Reorder include files to avoid build warning on dra7xx.
>>>
>>>  drivers/core/device.c | 6 ++
>>>  include/dm/device.h   | 9 +
>>>  2 files changed, 15 insertions(+)
>>>
>>> diff --git a/drivers/core/device.c b/drivers/core/device.c
>>> index 1322991d6c7b..6b19b4b8c7a0 100644
>>> --- a/drivers/core/device.c
>>> +++ b/drivers/core/device.c
>>> @@ -10,6 +10,7 @@
>>>   */
>>>
>>>  #include 
>>> +#include 
>>
>> I think this look same as v3 [1] please check?
>
> Yeah, v3 has the include files in correct. Please ignore this patch.
> Sorry for the spam.

Did you test this series on top of master?

-- 
Jagan.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4] dm: core: implement dev_map_phsymem()

2016-05-06 Thread R, Vignesh


On 5/6/2016 9:00 PM, Jagan Teki wrote:
> On 6 May 2016 at 09:28, Vignesh R  wrote:
>> This API helps to map physical register addresss pace of device to
>> virtual address space easily. Its just a wrapper around map_physmem()
>> with MAP_NOCACHE flag.
>>
>> Signed-off-by: Vignesh R 
>> Suggested-by: Simon Glass 
>> Reviewed-by: Jagan Teki 
>>
>> ---
>>
>> v4: Reorder include files to avoid build warning on dra7xx.
>>
>>  drivers/core/device.c | 6 ++
>>  include/dm/device.h   | 9 +
>>  2 files changed, 15 insertions(+)
>>
>> diff --git a/drivers/core/device.c b/drivers/core/device.c
>> index 1322991d6c7b..6b19b4b8c7a0 100644
>> --- a/drivers/core/device.c
>> +++ b/drivers/core/device.c
>> @@ -10,6 +10,7 @@
>>   */
>>
>>  #include 
>> +#include 
> 
> I think this look same as v3 [1] please check?

Yeah, v3 has the include files in correct. Please ignore this patch.
Sorry for the spam.

Regards
Vignesh.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4] dm: core: implement dev_map_phsymem()

2016-05-06 Thread Jagan Teki
On 6 May 2016 at 09:28, Vignesh R  wrote:
> This API helps to map physical register addresss pace of device to
> virtual address space easily. Its just a wrapper around map_physmem()
> with MAP_NOCACHE flag.
>
> Signed-off-by: Vignesh R 
> Suggested-by: Simon Glass 
> Reviewed-by: Jagan Teki 
>
> ---
>
> v4: Reorder include files to avoid build warning on dra7xx.
>
>  drivers/core/device.c | 6 ++
>  include/dm/device.h   | 9 +
>  2 files changed, 15 insertions(+)
>
> diff --git a/drivers/core/device.c b/drivers/core/device.c
> index 1322991d6c7b..6b19b4b8c7a0 100644
> --- a/drivers/core/device.c
> +++ b/drivers/core/device.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include 
> +#include 

I think this look same as v3 [1] please check?

>  #include 
>  #include 
>  #include 

[1] https://patchwork.ozlabs.org/patch/618361/

-- 
Jagan.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4] dm: core: implement dev_map_phsymem()

2016-05-05 Thread Vignesh R
This API helps to map physical register addresss pace of device to
virtual address space easily. Its just a wrapper around map_physmem()
with MAP_NOCACHE flag.

Signed-off-by: Vignesh R 
Suggested-by: Simon Glass 
Reviewed-by: Jagan Teki 

---

v4: Reorder include files to avoid build warning on dra7xx.

 drivers/core/device.c | 6 ++
 include/dm/device.h   | 9 +
 2 files changed, 15 insertions(+)

diff --git a/drivers/core/device.c b/drivers/core/device.c
index 1322991d6c7b..6b19b4b8c7a0 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -10,6 +10,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -678,6 +679,11 @@ void *dev_get_addr_ptr(struct udevice *dev)
return (void *)(uintptr_t)dev_get_addr_index(dev, 0);
 }
 
+void *dev_map_physmem(struct udevice *dev, unsigned long size)
+{
+   return map_physmem(dev_get_addr(dev), size, MAP_NOCACHE);
+}
+
 bool device_has_children(struct udevice *dev)
 {
return !list_empty(>child_head);
diff --git a/include/dm/device.h b/include/dm/device.h
index 8970fc015c7e..5253b5410d9a 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -463,6 +463,15 @@ fdt_addr_t dev_get_addr(struct udevice *dev);
  */
 void *dev_get_addr_ptr(struct udevice *dev);
 
+/* * dev_map_physmem() - Map bus memory into CPU space
+ *
+ * @dev: Pointer to device
+ * @size: size of the memory to map
+ *
+ * @return addr
+ */
+void *dev_map_physmem(struct udevice *dev, unsigned long size);
+
 /**
  * dev_get_addr_index() - Get the indexed reg property of a device
  *
-- 
2.8.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot