Commit 90fbee3e4051badff770a0ee1b1ca21cb808d634

Authored by Joe Hershberger
Committed by Simon Glass
1 parent 5745f8c4fd

cmd_fdt: Actually fix fdt command in sandbox

Commit 90bac29a76bc8d649b41a55f2786c0abef9bb2c1 claims to fix this bug
that was introduced in commit a92fd6577ea17751ead9b50243e3c562125cf581
but doesn't actually make the change that the commit message describes.

Actually fix the bug this time.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

Showing 4 changed files with 7 additions and 7 deletions Side-by-side Diff

... ... @@ -233,7 +233,7 @@
233 233 return 1;
234 234 }
235 235  
236   - set_working_fdt_addr(images.ft_addr);
  236 + set_working_fdt_addr((ulong)images.ft_addr);
237 237  
238 238 return 0;
239 239 }
... ... @@ -38,13 +38,13 @@
38 38 */
39 39 struct fdt_header *working_fdt;
40 40  
41   -void set_working_fdt_addr(void *addr)
  41 +void set_working_fdt_addr(ulong addr)
42 42 {
43 43 void *buf;
44 44  
45   - buf = map_sysmem((ulong)addr, 0);
  45 + buf = map_sysmem(addr, 0);
46 46 working_fdt = buf;
47   - setenv_addr("fdtaddr", addr);
  47 + setenv_ulong("fdtaddr", addr);
48 48 }
49 49  
50 50 /*
... ... @@ -123,7 +123,7 @@
123 123 if (control)
124 124 gd->fdt_blob = blob;
125 125 else
126   - set_working_fdt_addr((void *)blob);
  126 + set_working_fdt_addr(addr);
127 127  
128 128 if (argc >= 2) {
129 129 int len;
... ... @@ -190,7 +190,7 @@
190 190 *of_flat_tree = of_start;
191 191 *of_size = of_len;
192 192  
193   - set_working_fdt_addr(*of_flat_tree);
  193 + set_working_fdt_addr((ulong)*of_flat_tree);
194 194 return 0;
195 195  
196 196 error:
include/fdt_support.h
... ... @@ -100,7 +100,7 @@
100 100 */
101 101 int ft_system_setup(void *blob, bd_t *bd);
102 102  
103   -void set_working_fdt_addr(void *addr);
  103 +void set_working_fdt_addr(ulong addr);
104 104 int fdt_shrink_to_minimum(void *blob);
105 105 int fdt_increase_size(void *fdt, int add_len);
106 106