Commit fca0cecff73db99d99ad094cca7980472b8a11b5
Committed by
Wolfgang Denk
1 parent
670cbde8da
Exists in
master
and in
54 other branches
bootm: Reduce the unnecessary memmove
Although load address and image start address are same address, bootm command always does memmove. That is unnecessary memmove and can be taken few milliseconds (about 500 msec to 1000 msec). If skip this memmove, we can reduce the boot time. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
common/cmd_bootm.c
... | ... | @@ -340,8 +340,10 @@ |
340 | 340 | } else { |
341 | 341 | printf (" Loading %s ... ", type_name); |
342 | 342 | |
343 | - memmove_wd ((void *)load, | |
344 | - (void *)image_start, image_len, CHUNKSZ); | |
343 | + if (load != image_start) { | |
344 | + memmove_wd ((void *)load, | |
345 | + (void *)image_start, image_len, CHUNKSZ); | |
346 | + } | |
345 | 347 | } |
346 | 348 | *load_end = load + image_len; |
347 | 349 | puts("OK\n"); |