Stefan Roese | c891901 | 2020-04-21 09:28:46 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2020 Stefan Roese <sr@denx.de> |
| 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <cpu_func.h> |
Simon Glass | 0f2af88 | 2020-05-10 11:40:05 -0600 | [diff] [blame] | 8 | #include <log.h> |
Stefan Roese | c891901 | 2020-04-21 09:28:46 +0200 | [diff] [blame] | 9 | #include <spl.h> |
| 10 | |
| 11 | void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image) |
| 12 | { |
| 13 | typedef void __noreturn (*image_entry_noargs_t)(void); |
| 14 | image_entry_noargs_t image_entry = |
| 15 | (image_entry_noargs_t)spl_image->entry_point; |
| 16 | |
| 17 | /* Flush cache before jumping to application */ |
| 18 | flush_cache((unsigned long)spl_image->load_addr, spl_image->size); |
| 19 | |
| 20 | debug("image entry point: 0x%lx\n", spl_image->entry_point); |
| 21 | image_entry(); |
| 22 | } |