[v6,2/6] fdt: Fix version and add a word for FDT header size

Message ID 20171024013153.28200-3-aik@ozlabs.ru
State New
Headers show
Series
  • fdt: Pass the resulting device tree to QEMU + related fixes
Related show

Commit Message

Alexey Kardashevskiy Oct. 24, 2017, 1:31 a.m.
This fixes the version handling in fdt-init. It only matters
a little for the fdt-debug==1 case though.

This defines /fdth word for the FDT header size; this will be used
in the next patch.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 board-qemu/slof/fdt.fs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Greg Kurz Nov. 5, 2017, 4:18 p.m. | #1
On Tue, 24 Oct 2017 12:31:49 +1100
Alexey Kardashevskiy <aik@ozlabs.ru> wrote:

> This fixes the version handling in fdt-init. It only matters
> a little for the fdt-debug==1 case though.
> 
> This defines /fdth word for the FDT header size; this will be used
> in the next patch.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---

Reviewed-by: Greg Kurz <groug@kaod.org>

>  board-qemu/slof/fdt.fs | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/board-qemu/slof/fdt.fs b/board-qemu/slof/fdt.fs
> index 851645e..8e8921f 100644
> --- a/board-qemu/slof/fdt.fs
> +++ b/board-qemu/slof/fdt.fs
> @@ -27,7 +27,7 @@ struct
>    4 field >fdth_boot_cpu
>    4 field >fdth_string_size
>    4 field >fdth_struct_size
> -drop
> +constant /fdth
>  
>  h# d00dfeed constant OF_DT_HEADER
>  h#        1 constant OF_DT_BEGIN_NODE
> @@ -69,7 +69,7 @@ fdt-start fdt-init
>          dup >fdth_version l@ 3 >= IF
>              ."  strings size     : 0x" dup >fdth_string_size l@ . cr
>          THEN
> -        dup >fdth_version l@ 17 >= IF
> +        dup >fdth_version l@ 11 >= IF
>              ."  struct size      : 0x" dup >fdth_struct_size l@ . cr
>          THEN
>      THEN
Alexey Kardashevskiy Nov. 6, 2017, 2:43 a.m. | #2
On 06/11/17 03:18, Greg Kurz wrote:
> On Tue, 24 Oct 2017 12:31:49 +1100
> Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
> 
>> This fixes the version handling in fdt-init. It only matters
>> a little for the fdt-debug==1 case though.
>>
>> This defines /fdth word for the FDT header size; this will be used
>> in the next patch.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>> ---
> 
> Reviewed-by: Greg Kurz <groug@kaod.org>

Thanks! Slowly we are getting there :)


> 
>>  board-qemu/slof/fdt.fs | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/board-qemu/slof/fdt.fs b/board-qemu/slof/fdt.fs
>> index 851645e..8e8921f 100644
>> --- a/board-qemu/slof/fdt.fs
>> +++ b/board-qemu/slof/fdt.fs
>> @@ -27,7 +27,7 @@ struct
>>    4 field >fdth_boot_cpu
>>    4 field >fdth_string_size
>>    4 field >fdth_struct_size
>> -drop
>> +constant /fdth
>>  
>>  h# d00dfeed constant OF_DT_HEADER
>>  h#        1 constant OF_DT_BEGIN_NODE
>> @@ -69,7 +69,7 @@ fdt-start fdt-init
>>          dup >fdth_version l@ 3 >= IF
>>              ."  strings size     : 0x" dup >fdth_string_size l@ . cr
>>          THEN
>> -        dup >fdth_version l@ 17 >= IF
>> +        dup >fdth_version l@ 11 >= IF
>>              ."  struct size      : 0x" dup >fdth_struct_size l@ . cr
>>          THEN
>>      THEN
>
Greg Kurz Nov. 6, 2017, 2:29 p.m. | #3
On Mon, 6 Nov 2017 13:43:12 +1100
Alexey Kardashevskiy <aik@ozlabs.ru> wrote:

> On 06/11/17 03:18, Greg Kurz wrote:
> > On Tue, 24 Oct 2017 12:31:49 +1100
> > Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
> >   
> >> This fixes the version handling in fdt-init. It only matters
> >> a little for the fdt-debug==1 case though.
> >>
> >> This defines /fdth word for the FDT header size; this will be used
> >> in the next patch.
> >>
> >> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> >> ---  
> > 
> > Reviewed-by: Greg Kurz <groug@kaod.org>  
> 
> Thanks! Slowly we are getting there :)
> 

Heh, this is the easy one. Not sure I can help much with the other patches :\

> 
> >   
> >>  board-qemu/slof/fdt.fs | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/board-qemu/slof/fdt.fs b/board-qemu/slof/fdt.fs
> >> index 851645e..8e8921f 100644
> >> --- a/board-qemu/slof/fdt.fs
> >> +++ b/board-qemu/slof/fdt.fs
> >> @@ -27,7 +27,7 @@ struct
> >>    4 field >fdth_boot_cpu
> >>    4 field >fdth_string_size
> >>    4 field >fdth_struct_size
> >> -drop
> >> +constant /fdth
> >>  
> >>  h# d00dfeed constant OF_DT_HEADER
> >>  h#        1 constant OF_DT_BEGIN_NODE
> >> @@ -69,7 +69,7 @@ fdt-start fdt-init
> >>          dup >fdth_version l@ 3 >= IF
> >>              ."  strings size     : 0x" dup >fdth_string_size l@ . cr
> >>          THEN
> >> -        dup >fdth_version l@ 17 >= IF
> >> +        dup >fdth_version l@ 11 >= IF
> >>              ."  struct size      : 0x" dup >fdth_struct_size l@ . cr
> >>          THEN
> >>      THEN  
> >   
> 
>
Alexey Kardashevskiy Nov. 7, 2017, 2:36 a.m. | #4
On 07/11/17 01:29, Greg Kurz wrote:
> On Mon, 6 Nov 2017 13:43:12 +1100
> Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
> 
>> On 06/11/17 03:18, Greg Kurz wrote:
>>> On Tue, 24 Oct 2017 12:31:49 +1100
>>> Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>>>   
>>>> This fixes the version handling in fdt-init. It only matters
>>>> a little for the fdt-debug==1 case though.
>>>>
>>>> This defines /fdth word for the FDT header size; this will be used
>>>> in the next patch.
>>>>
>>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>>> ---  
>>>
>>> Reviewed-by: Greg Kurz <groug@kaod.org>  
>>
>> Thanks! Slowly we are getting there :)
>>
> 
> Heh, this is the easy one. Not sure I can help much with the other patches :\

Everyone can! :) "Tested-by" would be useful too. Thanks.

> 
>>
>>>   
>>>>  board-qemu/slof/fdt.fs | 4 ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/board-qemu/slof/fdt.fs b/board-qemu/slof/fdt.fs
>>>> index 851645e..8e8921f 100644
>>>> --- a/board-qemu/slof/fdt.fs
>>>> +++ b/board-qemu/slof/fdt.fs
>>>> @@ -27,7 +27,7 @@ struct
>>>>    4 field >fdth_boot_cpu
>>>>    4 field >fdth_string_size
>>>>    4 field >fdth_struct_size
>>>> -drop
>>>> +constant /fdth
>>>>  
>>>>  h# d00dfeed constant OF_DT_HEADER
>>>>  h#        1 constant OF_DT_BEGIN_NODE
>>>> @@ -69,7 +69,7 @@ fdt-start fdt-init
>>>>          dup >fdth_version l@ 3 >= IF
>>>>              ."  strings size     : 0x" dup >fdth_string_size l@ . cr
>>>>          THEN
>>>> -        dup >fdth_version l@ 17 >= IF
>>>> +        dup >fdth_version l@ 11 >= IF
>>>>              ."  struct size      : 0x" dup >fdth_struct_size l@ . cr
>>>>          THEN
>>>>      THEN  
>>>   
>>
>>
>

Patch

diff --git a/board-qemu/slof/fdt.fs b/board-qemu/slof/fdt.fs
index 851645e..8e8921f 100644
--- a/board-qemu/slof/fdt.fs
+++ b/board-qemu/slof/fdt.fs
@@ -27,7 +27,7 @@  struct
   4 field >fdth_boot_cpu
   4 field >fdth_string_size
   4 field >fdth_struct_size
-drop
+constant /fdth
 
 h# d00dfeed constant OF_DT_HEADER
 h#        1 constant OF_DT_BEGIN_NODE
@@ -69,7 +69,7 @@  fdt-start fdt-init
         dup >fdth_version l@ 3 >= IF
             ."  strings size     : 0x" dup >fdth_string_size l@ . cr
         THEN
-        dup >fdth_version l@ 17 >= IF
+        dup >fdth_version l@ 11 >= IF
             ."  struct size      : 0x" dup >fdth_struct_size l@ . cr
         THEN
     THEN