]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common: Remove invalid endianess conversion
authorChristian Eggers <ceggers@gmx.de>
Sat, 8 Feb 2014 18:27:45 +0000 (19:27 +0100)
committerTom Rini <trini@ti.com>
Fri, 21 Feb 2014 16:06:13 +0000 (11:06 -0500)
do_bootm_standanlone() calls ntohl(images->ep) which is wrong because
endianess conversion has already been done:

do_bootm()
\-do_bootm_states()
  +-bootm_find_os()
  | \-images.ep = image_get_ep();
  |   \-uimage_to_cpu(hdr->ih_ep);
  \-boot_selected_os()
    \-do_bootm_standanlone()

Without this conversion the code works correctly at least on AT91SAM9G45.
On big endian systems there should be no difference after applying this
patch because uimage_to_cpu(x) and ntohl(x) both expand to 'x'.

Signed-off-by: Christian Eggers <ceggers@gmx.de>
common/cmd_bootm.c

index a59ee95a698c014abe2a3ce7ce1cf16e98086088..9751edc9076121db4680fa91cc606c3ae4369804 100644 (file)
@@ -514,8 +514,8 @@ static int do_bootm_standalone(int flag, int argc, char * const argv[],
                setenv_hex("filesize", images->os.image_len);
                return 0;
        }
-       appl = (int (*)(int, char * const []))(ulong)ntohl(images->ep);
-       (*appl)(argc, argv);
+       appl = (int (*)(int, char * const []))images->ep;
+       appl(argc, argv);
        return 0;
 }