Re: [U-Boot] [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

2014-12-30 Thread Simon Glass
Hi,

On 29 December 2014 at 23:44, Hua Yanghao huayang...@gmail.com wrote:
 By the way, which is the current branch you guys are working on?
 u-boot/master I assume?

Yes that's right.

- Simon


 On Tue, Dec 30, 2014 at 2:44 PM, Hua Yanghao huayang...@gmail.com wrote:
 Hi Simon,
 Thank you for the suggestion. I will set up git send-email and send a
 new patch for review.
 For set_working_fdt_addr, a simple grep shows 2 other places
 (common/bootm.c common/image-fdt.c) is already using its parameter as
 void *. changing it to ulong will cause the other 2 places to use
 casting. Maybe just keep its current void * is already good enough.

 Best Regards,
 Yanghao

 On Tue, Dec 23, 2014 at 3:54 AM, Simon Glass s...@chromium.org wrote:
 Hi Hua,

 On 21 December 2014 at 13:45, Hua Yanghao huayang...@gmail.com wrote:

 Being a long time u-boot developer, this is the first time I'm trying
 to get some fix for the open source code back to mainline.
 If anything wrong during the process, please be gentle :-) Thank you.

 From 225c8f8f2af4cf6092260e5c133d90096e2f3352 Mon Sep 17 00:00:00 2001
 From: Hua Yanghao huayang...@gmail.com
 Date: Mon, 22 Dec 2014 04:32:39 +0800
 Subject: [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

 Instead of setting working_fdt to map_sysmem(addr) (e.g. blob), it should 
 be set
 to addr directly as inside set_working_fdt_addr it uses map_sysmem(addr) 
 again.
 To test: ./u-boot -d dts/dt.bin , then issue: fdt addr 0x100, fdt print 
 will
 then cause an segmentation fault. After this fix fdt print is functional.
 ---
  common/cmd_fdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
 index 5640ded..d5eebcb 100644
 --- a/common/cmd_fdt.c
 +++ b/common/cmd_fdt.c
 @@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int
 argc, char * const argv[])
   if (control)
   gd-fdt_blob = blob;
   else
 - set_working_fdt_addr(blob);
 + set_working_fdt_addr((void *)addr);

   if (argc = 2) {
   int  len;

 I think maybe your patch generation is a bit broken as the indentation
 has been lost. If you don't have git send-email set up you should
 probably look at that, and use patman to send patches.

 This change looks right apart from that. You could also look at
 changing the argument of set_working_fdt_addr() to ulong if you like.

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


Re: [U-Boot] [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

2014-12-29 Thread Hua Yanghao
Hi Simon,
Thank you for the suggestion. I will set up git send-email and send a
new patch for review.
For set_working_fdt_addr, a simple grep shows 2 other places
(common/bootm.c common/image-fdt.c) is already using its parameter as
void *. changing it to ulong will cause the other 2 places to use
casting. Maybe just keep its current void * is already good enough.

Best Regards,
Yanghao

On Tue, Dec 23, 2014 at 3:54 AM, Simon Glass s...@chromium.org wrote:
 Hi Hua,

 On 21 December 2014 at 13:45, Hua Yanghao huayang...@gmail.com wrote:

 Being a long time u-boot developer, this is the first time I'm trying
 to get some fix for the open source code back to mainline.
 If anything wrong during the process, please be gentle :-) Thank you.

 From 225c8f8f2af4cf6092260e5c133d90096e2f3352 Mon Sep 17 00:00:00 2001
 From: Hua Yanghao huayang...@gmail.com
 Date: Mon, 22 Dec 2014 04:32:39 +0800
 Subject: [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

 Instead of setting working_fdt to map_sysmem(addr) (e.g. blob), it should be 
 set
 to addr directly as inside set_working_fdt_addr it uses map_sysmem(addr) 
 again.
 To test: ./u-boot -d dts/dt.bin , then issue: fdt addr 0x100, fdt print will
 then cause an segmentation fault. After this fix fdt print is functional.
 ---
  common/cmd_fdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
 index 5640ded..d5eebcb 100644
 --- a/common/cmd_fdt.c
 +++ b/common/cmd_fdt.c
 @@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int
 argc, char * const argv[])
   if (control)
   gd-fdt_blob = blob;
   else
 - set_working_fdt_addr(blob);
 + set_working_fdt_addr((void *)addr);

   if (argc = 2) {
   int  len;

 I think maybe your patch generation is a bit broken as the indentation
 has been lost. If you don't have git send-email set up you should
 probably look at that, and use patman to send patches.

 This change looks right apart from that. You could also look at
 changing the argument of set_working_fdt_addr() to ulong if you like.

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


Re: [U-Boot] [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

2014-12-29 Thread Hua Yanghao
By the way, which is the current branch you guys are working on?
u-boot/master I assume?

On Tue, Dec 30, 2014 at 2:44 PM, Hua Yanghao huayang...@gmail.com wrote:
 Hi Simon,
 Thank you for the suggestion. I will set up git send-email and send a
 new patch for review.
 For set_working_fdt_addr, a simple grep shows 2 other places
 (common/bootm.c common/image-fdt.c) is already using its parameter as
 void *. changing it to ulong will cause the other 2 places to use
 casting. Maybe just keep its current void * is already good enough.

 Best Regards,
 Yanghao

 On Tue, Dec 23, 2014 at 3:54 AM, Simon Glass s...@chromium.org wrote:
 Hi Hua,

 On 21 December 2014 at 13:45, Hua Yanghao huayang...@gmail.com wrote:

 Being a long time u-boot developer, this is the first time I'm trying
 to get some fix for the open source code back to mainline.
 If anything wrong during the process, please be gentle :-) Thank you.

 From 225c8f8f2af4cf6092260e5c133d90096e2f3352 Mon Sep 17 00:00:00 2001
 From: Hua Yanghao huayang...@gmail.com
 Date: Mon, 22 Dec 2014 04:32:39 +0800
 Subject: [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

 Instead of setting working_fdt to map_sysmem(addr) (e.g. blob), it should 
 be set
 to addr directly as inside set_working_fdt_addr it uses map_sysmem(addr) 
 again.
 To test: ./u-boot -d dts/dt.bin , then issue: fdt addr 0x100, fdt print will
 then cause an segmentation fault. After this fix fdt print is functional.
 ---
  common/cmd_fdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
 index 5640ded..d5eebcb 100644
 --- a/common/cmd_fdt.c
 +++ b/common/cmd_fdt.c
 @@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int
 argc, char * const argv[])
   if (control)
   gd-fdt_blob = blob;
   else
 - set_working_fdt_addr(blob);
 + set_working_fdt_addr((void *)addr);

   if (argc = 2) {
   int  len;

 I think maybe your patch generation is a bit broken as the indentation
 has been lost. If you don't have git send-email set up you should
 probably look at that, and use patman to send patches.

 This change looks right apart from that. You could also look at
 changing the argument of set_working_fdt_addr() to ulong if you like.

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


Re: [U-Boot] [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

2014-12-22 Thread Simon Glass
Hi Hua,

On 21 December 2014 at 13:45, Hua Yanghao huayang...@gmail.com wrote:

 Being a long time u-boot developer, this is the first time I'm trying
 to get some fix for the open source code back to mainline.
 If anything wrong during the process, please be gentle :-) Thank you.

 From 225c8f8f2af4cf6092260e5c133d90096e2f3352 Mon Sep 17 00:00:00 2001
 From: Hua Yanghao huayang...@gmail.com
 Date: Mon, 22 Dec 2014 04:32:39 +0800
 Subject: [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

 Instead of setting working_fdt to map_sysmem(addr) (e.g. blob), it should be 
 set
 to addr directly as inside set_working_fdt_addr it uses map_sysmem(addr) 
 again.
 To test: ./u-boot -d dts/dt.bin , then issue: fdt addr 0x100, fdt print will
 then cause an segmentation fault. After this fix fdt print is functional.
 ---
  common/cmd_fdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
 index 5640ded..d5eebcb 100644
 --- a/common/cmd_fdt.c
 +++ b/common/cmd_fdt.c
 @@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int
 argc, char * const argv[])
   if (control)
   gd-fdt_blob = blob;
   else
 - set_working_fdt_addr(blob);
 + set_working_fdt_addr((void *)addr);

   if (argc = 2) {
   int  len;

I think maybe your patch generation is a bit broken as the indentation
has been lost. If you don't have git send-email set up you should
probably look at that, and use patman to send patches.

This change looks right apart from that. You could also look at
changing the argument of set_working_fdt_addr() to ulong if you like.

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


[U-Boot] [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

2014-12-21 Thread Hua Yanghao
Being a long time u-boot developer, this is the first time I'm trying
to get some fix for the open source code back to mainline.
If anything wrong during the process, please be gentle :-) Thank you.

From 225c8f8f2af4cf6092260e5c133d90096e2f3352 Mon Sep 17 00:00:00 2001
From: Hua Yanghao huayang...@gmail.com
Date: Mon, 22 Dec 2014 04:32:39 +0800
Subject: [PATCH 1/1] cmd, fdt: fix working_fdt is set to wrong value

Instead of setting working_fdt to map_sysmem(addr) (e.g. blob), it should be set
to addr directly as inside set_working_fdt_addr it uses map_sysmem(addr) again.
To test: ./u-boot -d dts/dt.bin , then issue: fdt addr 0x100, fdt print will
then cause an segmentation fault. After this fix fdt print is functional.
---
 common/cmd_fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 5640ded..d5eebcb 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int
argc, char * const argv[])
  if (control)
  gd-fdt_blob = blob;
  else
- set_working_fdt_addr(blob);
+ set_working_fdt_addr((void *)addr);

  if (argc = 2) {
  int  len;
-- 
2.1.0
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot