boot.c 526 B

1234567891011121314151617181920212223
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2020 Stefan Roese <sr@denx.de>
  4. */
  5. #include <common.h>
  6. #include <command.h>
  7. #include <cpu_func.h>
  8. DECLARE_GLOBAL_DATA_PTR;
  9. unsigned long do_go_exec(ulong (*entry)(int, char * const []),
  10. int argc, char * const argv[])
  11. {
  12. /*
  13. * Flush cache before jumping to application. Let's flush the
  14. * whole SDRAM area, since we don't know the size of the image
  15. * that was loaded.
  16. */
  17. flush_cache(gd->ram_base, gd->ram_top - gd->ram_base);
  18. return entry(argc, argv);
  19. }