All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] test/py: test_efi_fit: Update #size-cells to 1
@ 2020-06-28  1:03 Bin Meng
  2020-06-28 12:23 ` Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: Bin Meng @ 2020-06-28  1:03 UTC (permalink / raw)
  To: u-boot

From: Bin Meng <bin.meng@windriver.com>

test_efi_fit tests fail on RISC-V currently. This is due to the
RISC-V arch_fixup_fdt() checks the #size-cells of the root node
in order to correctly fix up the reserved memory node.

Per the DT binding, the /reserved-memory node requires both
<#address-cells> and <#size-cells> and they should use the same
values as the root node. For the root node, it's not very useful
if <#size-cells> is zero.

Update #size-cells to 1 so tests can pass.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
---

Changes in v2:
- Update the reset node's <reg> property to contain a size

 test/py/tests/test_efi_fit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/py/tests/test_efi_fit.py b/test/py/tests/test_efi_fit.py
index beaf4a3..06fb151 100644
--- a/test/py/tests/test_efi_fit.py
+++ b/test/py/tests/test_efi_fit.py
@@ -106,14 +106,14 @@ FDT_DATA = '''
 
 / {
     #address-cells = <1>;
-    #size-cells = <0>;
+    #size-cells = <1>;
 
     model = "%(sys-arch)s %(fdt_type)s EFI FIT Boot Test";
     compatible = "%(sys-arch)s";
 
     reset at 0 {
         compatible = "%(sys-arch)s,reset";
-        reg = <0>;
+        reg = <0 4>;
     };
 };
 '''
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] test/py: test_efi_fit: Update #size-cells to 1
  2020-06-28  1:03 [PATCH v2] test/py: test_efi_fit: Update #size-cells to 1 Bin Meng
@ 2020-06-28 12:23 ` Heinrich Schuchardt
  2020-06-29  0:26   ` Bin Meng
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2020-06-28 12:23 UTC (permalink / raw)
  To: u-boot

On 6/28/20 3:03 AM, Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> test_efi_fit tests fail on RISC-V currently. This is due to the
> RISC-V arch_fixup_fdt() checks the #size-cells of the root node
> in order to correctly fix up the reserved memory node.
>
> Per the DT binding, the /reserved-memory node requires both
> <#address-cells> and <#size-cells> and they should use the same
> values as the root node. For the root node, it's not very useful
> if <#size-cells> is zero.

The text you refer to is Linux's
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt

Will you also fix the underlying problem that the /reserved-memory node
does not provide its own #address-cells, #size-cells?

>
> Update #size-cells to 1 so tests can pass.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---
>
> Changes in v2:
> - Update the reset node's <reg> property to contain a size
>
>  test/py/tests/test_efi_fit.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/py/tests/test_efi_fit.py b/test/py/tests/test_efi_fit.py
> index beaf4a3..06fb151 100644
> --- a/test/py/tests/test_efi_fit.py
> +++ b/test/py/tests/test_efi_fit.py
> @@ -106,14 +106,14 @@ FDT_DATA = '''
>
>  / {
>      #address-cells = <1>;
> -    #size-cells = <0>;
> +    #size-cells = <1>;
>
>      model = "%(sys-arch)s %(fdt_type)s EFI FIT Boot Test";
>      compatible = "%(sys-arch)s";
>
>      reset at 0 {
>          compatible = "%(sys-arch)s,reset";
> -        reg = <0>;
> +        reg = <0 4>;

This reg property is not used by any driver. I think it was only added
to avoid a dtc warning.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

>      };
>  };
>  '''
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] test/py: test_efi_fit: Update #size-cells to 1
  2020-06-28 12:23 ` Heinrich Schuchardt
@ 2020-06-29  0:26   ` Bin Meng
  0 siblings, 0 replies; 3+ messages in thread
From: Bin Meng @ 2020-06-29  0:26 UTC (permalink / raw)
  To: u-boot

Hi Heinrich,

On Sun, Jun 28, 2020 at 8:23 PM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 6/28/20 3:03 AM, Bin Meng wrote:
> > From: Bin Meng <bin.meng@windriver.com>
> >
> > test_efi_fit tests fail on RISC-V currently. This is due to the
> > RISC-V arch_fixup_fdt() checks the #size-cells of the root node
> > in order to correctly fix up the reserved memory node.
> >
> > Per the DT binding, the /reserved-memory node requires both
> > <#address-cells> and <#size-cells> and they should use the same
> > values as the root node. For the root node, it's not very useful
> > if <#size-cells> is zero.
>
> The text you refer to is Linux's
> Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
>
> Will you also fix the underlying problem that the /reserved-memory node
> does not provide its own #address-cells, #size-cells?

There is no underlying problem. The /reserved-memory fix-up codes will
copy whatever is from root node's #address-cells, #size-cells to it.

>
> >
> > Update #size-cells to 1 so tests can pass.
> >
> > Signed-off-by: Bin Meng <bin.meng@windriver.com>
> > ---
> >
> > Changes in v2:
> > - Update the reset node's <reg> property to contain a size
> >
> >  test/py/tests/test_efi_fit.py | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/test/py/tests/test_efi_fit.py b/test/py/tests/test_efi_fit.py
> > index beaf4a3..06fb151 100644
> > --- a/test/py/tests/test_efi_fit.py
> > +++ b/test/py/tests/test_efi_fit.py
> > @@ -106,14 +106,14 @@ FDT_DATA = '''
> >
> >  / {
> >      #address-cells = <1>;
> > -    #size-cells = <0>;
> > +    #size-cells = <1>;
> >
> >      model = "%(sys-arch)s %(fdt_type)s EFI FIT Boot Test";
> >      compatible = "%(sys-arch)s";
> >
> >      reset at 0 {
> >          compatible = "%(sys-arch)s,reset";
> > -        reg = <0>;
> > +        reg = <0 4>;
>
> This reg property is not used by any driver. I think it was only added
> to avoid a dtc warning.
>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Regards,
Bin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-29  0:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28  1:03 [PATCH v2] test/py: test_efi_fit: Update #size-cells to 1 Bin Meng
2020-06-28 12:23 ` Heinrich Schuchardt
2020-06-29  0:26   ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.