Re: [U-Boot] [PATCH v2 1/4] libfdt: fdt_address_cells() and fdt_size_cells()

2019-10-11 Thread Matthias Brugger


On 11/10/2019 20:28, Simon Glass wrote:
> Hi Matthias,
> 
> On Mon, 7 Oct 2019 at 07:31, Matthias Brugger  wrote:
>>
>> Hi Simon,
>>
>> On 28/09/2019 01:28, s...@google.com wrote:
>>> From: Matthias Brugger 
>>>
>>> Add internal fdt_cells() to avoid copy and paste. Fix typo in
>>> fdt_size_cells() documentation comment.
>>>
>>> This is based in upstream commit:
>>> c12b2b0 ("libfdt: fdt_address_cells() and fdt_size_cells()")
>>> but misses the test cases, as we don't implement them in U-Boot.
>>>
>>> Signed-off-by: Matthias Brugger 
>>> Reviewed-by: Simon Glass 
>>> ---
>>>
>>>  scripts/dtc/libfdt/fdt_addresses.c | 35 +++---
>>>  scripts/dtc/libfdt/libfdt.h|  2 +-
>>>  2 files changed, 14 insertions(+), 23 deletions(-)
>>>
>>> Applied to u-boot-dm/next, thanks!
>>
>> I just looked through the upstream U-Boot commit log and don't see them 
>> queued
>> for 2019.10-rc5
>> Do I understand correctly that you are planning to merge them after 2019.10 
>> is
>> released. Correct?
>>
>> I'm asking because without these patches the grub boot path for RPi4 with 
>> RAM >
>> 1GB is 'broken', in the sense that the kernel will only see RAM size of 1GB.
>>
>> I can keep them as backports in openSUSE, that's no problem, just wanted to 
>> know
>> what's your plan. And have a quick answer if someone asks on the mailinglist 
>> :)
>>
> 
> Yes that's right. Should get these applied next week.
> 

Ok, thanks for the info :)
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/4] libfdt: fdt_address_cells() and fdt_size_cells()

2019-10-11 Thread Simon Glass
Hi Matthias,

On Mon, 7 Oct 2019 at 07:31, Matthias Brugger  wrote:
>
> Hi Simon,
>
> On 28/09/2019 01:28, s...@google.com wrote:
> > From: Matthias Brugger 
> >
> > Add internal fdt_cells() to avoid copy and paste. Fix typo in
> > fdt_size_cells() documentation comment.
> >
> > This is based in upstream commit:
> > c12b2b0 ("libfdt: fdt_address_cells() and fdt_size_cells()")
> > but misses the test cases, as we don't implement them in U-Boot.
> >
> > Signed-off-by: Matthias Brugger 
> > Reviewed-by: Simon Glass 
> > ---
> >
> >  scripts/dtc/libfdt/fdt_addresses.c | 35 +++---
> >  scripts/dtc/libfdt/libfdt.h|  2 +-
> >  2 files changed, 14 insertions(+), 23 deletions(-)
> >
> > Applied to u-boot-dm/next, thanks!
>
> I just looked through the upstream U-Boot commit log and don't see them queued
> for 2019.10-rc5
> Do I understand correctly that you are planning to merge them after 2019.10 is
> released. Correct?
>
> I'm asking because without these patches the grub boot path for RPi4 with RAM 
> >
> 1GB is 'broken', in the sense that the kernel will only see RAM size of 1GB.
>
> I can keep them as backports in openSUSE, that's no problem, just wanted to 
> know
> what's your plan. And have a quick answer if someone asks on the mailinglist 
> :)
>

Yes that's right. Should get these applied next week.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/4] libfdt: fdt_address_cells() and fdt_size_cells()

2019-10-07 Thread Matthias Brugger
Hi Simon,

On 28/09/2019 01:28, s...@google.com wrote:
> From: Matthias Brugger 
> 
> Add internal fdt_cells() to avoid copy and paste. Fix typo in
> fdt_size_cells() documentation comment.
> 
> This is based in upstream commit:
> c12b2b0 ("libfdt: fdt_address_cells() and fdt_size_cells()")
> but misses the test cases, as we don't implement them in U-Boot.
> 
> Signed-off-by: Matthias Brugger 
> Reviewed-by: Simon Glass 
> ---
> 
>  scripts/dtc/libfdt/fdt_addresses.c | 35 +++---
>  scripts/dtc/libfdt/libfdt.h|  2 +-
>  2 files changed, 14 insertions(+), 23 deletions(-)
> 
> Applied to u-boot-dm/next, thanks!

I just looked through the upstream U-Boot commit log and don't see them queued
for 2019.10-rc5
Do I understand correctly that you are planning to merge them after 2019.10 is
released. Correct?

I'm asking because without these patches the grub boot path for RPi4 with RAM >
1GB is 'broken', in the sense that the kernel will only see RAM size of 1GB.

I can keep them as backports in openSUSE, that's no problem, just wanted to know
what's your plan. And have a quick answer if someone asks on the mailinglist :)

Regards,
Matthias
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/4] libfdt: fdt_address_cells() and fdt_size_cells()

2019-09-27 Thread sjg
From: Matthias Brugger 

Add internal fdt_cells() to avoid copy and paste. Fix typo in
fdt_size_cells() documentation comment.

This is based in upstream commit:
c12b2b0 ("libfdt: fdt_address_cells() and fdt_size_cells()")
but misses the test cases, as we don't implement them in U-Boot.

Signed-off-by: Matthias Brugger 
Reviewed-by: Simon Glass 
---

 scripts/dtc/libfdt/fdt_addresses.c | 35 +++---
 scripts/dtc/libfdt/libfdt.h|  2 +-
 2 files changed, 14 insertions(+), 23 deletions(-)

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 1/4] libfdt: fdt_address_cells() and fdt_size_cells()

2019-09-05 Thread matthias . bgg
From: Matthias Brugger 

Add internal fdt_cells() to avoid copy and paste. Fix typo in
fdt_size_cells() documentation comment.

This is based in upstream commit:
c12b2b0 ("libfdt: fdt_address_cells() and fdt_size_cells()")
but misses the test cases, as we don't implement them in U-Boot.

Signed-off-by: Matthias Brugger 
Reviewed-by: Simon Glass 
---

 scripts/dtc/libfdt/fdt_addresses.c | 35 +++---
 scripts/dtc/libfdt/libfdt.h|  2 +-
 2 files changed, 14 insertions(+), 23 deletions(-)

diff --git a/scripts/dtc/libfdt/fdt_addresses.c 
b/scripts/dtc/libfdt/fdt_addresses.c
index eff4dbcc72..49537b578d 100644
--- a/scripts/dtc/libfdt/fdt_addresses.c
+++ b/scripts/dtc/libfdt/fdt_addresses.c
@@ -1,6 +1,7 @@
 /*
  * libfdt - Flat Device Tree manipulation
  * Copyright (C) 2014 David Gibson 
+ * Copyright (C) 2018 embedded brains GmbH
  *
  * libfdt is dual licensed: you can use it either under the terms of
  * the GPL, or the BSD license, at your option.
@@ -55,42 +56,32 @@
 
 #include "libfdt_internal.h"
 
-int fdt_address_cells(const void *fdt, int nodeoffset)
+static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
 {
-   const fdt32_t *ac;
+   const fdt32_t *c;
int val;
int len;
 
-   ac = fdt_getprop(fdt, nodeoffset, "#address-cells", );
-   if (!ac)
+   c = fdt_getprop(fdt, nodeoffset, name, );
+   if (!c)
return 2;
 
-   if (len != sizeof(*ac))
+   if (len != sizeof(*c))
return -FDT_ERR_BADNCELLS;
 
-   val = fdt32_to_cpu(*ac);
+   val = fdt32_to_cpu(*c);
if ((val <= 0) || (val > FDT_MAX_NCELLS))
return -FDT_ERR_BADNCELLS;
 
return val;
 }
 
-int fdt_size_cells(const void *fdt, int nodeoffset)
+int fdt_address_cells(const void *fdt, int nodeoffset)
 {
-   const fdt32_t *sc;
-   int val;
-   int len;
-
-   sc = fdt_getprop(fdt, nodeoffset, "#size-cells", );
-   if (!sc)
-   return 2;
-
-   if (len != sizeof(*sc))
-   return -FDT_ERR_BADNCELLS;
-
-   val = fdt32_to_cpu(*sc);
-   if ((val < 0) || (val > FDT_MAX_NCELLS))
-   return -FDT_ERR_BADNCELLS;
+   return fdt_cells(fdt, nodeoffset, "#address-cells");
+}
 
-   return val;
+int fdt_size_cells(const void *fdt, int nodeoffset)
+{
+   return fdt_cells(fdt, nodeoffset, "#size-cells");
 }
diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h
index cf86ddba88..66f01fec53 100644
--- a/scripts/dtc/libfdt/libfdt.h
+++ b/scripts/dtc/libfdt/libfdt.h
@@ -1109,7 +1109,7 @@ int fdt_address_cells(const void *fdt, int nodeoffset);
  *
  * returns:
  * 0 <= n < FDT_MAX_NCELLS, on success
- *  2, if the node has no #address-cells property
+ *  2, if the node has no #size-cells property
  *  -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
  * #size-cells property
  * -FDT_ERR_BADMAGIC,
-- 
2.22.0

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