Re: [U-Boot] [PATCH 26/30] bdinfo: riscv: print fdt_blob address

2018-10-26 Thread Auer, Lukas
Hi Rick and Bin,

On Wed, 2018-10-24 at 14:54 +0800, Rick Chen wrote:
> > > > Print the address of the u-boot device tree.
> > > > 
> > > 
> > > This is unnecessary as it is already done by 'fdt' command.
> > > 
> 
> Hi Bin & Lukas
> 
> At the beginning, I really don't understand the fdt Usage:
> Maybe I am not so familiar with fdt.
> I can't find any string about fdt_blob. It seem not describe so
> clearly
> After I trace fdt.c, I finally know to get it as below.
> 
> RISC-V # bdinfo
> boot_params = 0x0400
> ...
> baudrate= 38400 bps
> fdt_blob= 0x3FF0F340
> RISC-V #
> 
> RISC-V # fdt addr -c
> The address of the fdt is 0x3ff0f340
> 
> Usage:
> fdt addr [-c]   []   - Set the [control] fdt location
> to 
> fdt move  - Copy the fdt to  and make
> it active
> fdt resize []- Resize fdt to size + padding to
> 4k addr + some optional  if needed
> fdt print   []  - Recursive print starting at
> 
> fdt list[]  - Print one level starting at
> 
> fdt get value  - Get  and store in
> 
> fdt get name  - Get name of node  and
> store in 
> fdt get addr   - Get start address of 
> and store in 
> fdt get size   []  - Get size of [] or num
> nodes and store in 
> fdt set  []- Set  [to ]
> fdt mknode  - Create a new node after 
> fdt rm  []  - Delete the node or 
> fdt header  - Display header info
> fdt bootcpu - Set boot cpuid
> fdt memory  - Add/Update memory node
> fdt rsvmem print- Show current mem reserves
> fdt rsvmem add  - Add a mem reserve
> fdt rsvmem delete- Delete a mem reserves
> fdt chosen [ ]  - Add/update the /chosen branch
> in the tree
> / - initrd
> start/end addr
> 
> It seem that other arch (MICROBLAZE, ARM) also print fdt_blob in
> bdinfo cmd.
> So I think this patch can be accepted.
> 
> Reviewed-by: Rick Chen 
> 
> Rick
> 

I was not aware that the fdt command can print the location of
fdt_blob. I think this patch can be dropped, unless you want me to keep
it.

Thanks,
Lukas

> 
> > > > Signed-off-by: Lukas Auer 
> > > > ---
> > > > 
> > > >  cmd/bdinfo.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > > 
> > > 
> > > Regards,
> > > Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 26/30] bdinfo: riscv: print fdt_blob address

2018-10-24 Thread Rick Chen
> > > Print the address of the u-boot device tree.
> > >
> >
> > This is unnecessary as it is already done by 'fdt' command.
> >

Hi Bin & Lukas

At the beginning, I really don't understand the fdt Usage:
Maybe I am not so familiar with fdt.
I can't find any string about fdt_blob. It seem not describe so clearly
After I trace fdt.c, I finally know to get it as below.

RISC-V # bdinfo
boot_params = 0x0400
...
baudrate= 38400 bps
fdt_blob= 0x3FF0F340
RISC-V #

RISC-V # fdt addr -c
The address of the fdt is 0x3ff0f340

Usage:
fdt addr [-c]   []   - Set the [control] fdt location to 
fdt move  - Copy the fdt to  and make it active
fdt resize []- Resize fdt to size + padding to
4k addr + some optional  if needed
fdt print   []  - Recursive print starting at 
fdt list[]  - Print one level starting at 
fdt get value  - Get  and store in 
fdt get name  - Get name of node  and
store in 
fdt get addr   - Get start address of 
and store in 
fdt get size   []  - Get size of [] or num
nodes and store in 
fdt set  []- Set  [to ]
fdt mknode  - Create a new node after 
fdt rm  []  - Delete the node or 
fdt header  - Display header info
fdt bootcpu - Set boot cpuid
fdt memory  - Add/Update memory node
fdt rsvmem print- Show current mem reserves
fdt rsvmem add  - Add a mem reserve
fdt rsvmem delete- Delete a mem reserves
fdt chosen [ ]  - Add/update the /chosen branch in the tree
/ - initrd start/end addr

It seem that other arch (MICROBLAZE, ARM) also print fdt_blob in bdinfo cmd.
So I think this patch can be accepted.

Reviewed-by: Rick Chen 

Rick


> > > Signed-off-by: Lukas Auer 
> > > ---
> > >
> > >  cmd/bdinfo.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> >
> > Regards,
> > Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 26/30] bdinfo: riscv: print fdt_blob address

2018-10-22 Thread Bin Meng
Hi Lukas,

On Sat, Oct 20, 2018 at 6:11 AM Lukas Auer
 wrote:
>
> Print the address of the u-boot device tree.
>

This is unnecessary as it is already done by 'fdt' command.

> Signed-off-by: Lukas Auer 
> ---
>
>  cmd/bdinfo.c | 2 ++
>  1 file changed, 2 insertions(+)
>

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


[U-Boot] [PATCH 26/30] bdinfo: riscv: print fdt_blob address

2018-10-19 Thread Lukas Auer
Print the address of the u-boot device tree.

Signed-off-by: Lukas Auer 
---

 cmd/bdinfo.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 60b438766d..a9692f7662 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -430,6 +430,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
print_num("reloc off", gd->reloc_off);
print_eth_ip_addr();
print_baudrate();
+   if (gd->fdt_blob)
+   print_num("fdt_blob", (ulong)gd->fdt_blob);
 
return 0;
 }
-- 
2.17.2

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