Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Ravi Kumar Bokka | 6bbf8f2 | 2019-08-12 14:54:21 +0530 | [diff] [blame] | 2 | |
Ravi Kumar Bokka | 6bbf8f2 | 2019-08-12 14:54:21 +0530 | [diff] [blame] | 3 | #include <cbfs.h> |
Ravi Kumar Bokka | 6bbf8f2 | 2019-08-12 14:54:21 +0530 | [diff] [blame] | 4 | #include <console/console.h> |
Ravi Kumar Bokka | 6bbf8f2 | 2019-08-12 14:54:21 +0530 | [diff] [blame] | 5 | #include <soc/mmu.h> |
| 6 | #include <soc/aop.h> |
| 7 | #include <soc/clock.h> |
| 8 | |
| 9 | void aop_fw_load_reset(void) |
| 10 | { |
| 11 | bool aop_fw_entry; |
| 12 | |
| 13 | struct prog aop_fw_prog = |
| 14 | PROG_INIT(PROG_PAYLOAD, CONFIG_CBFS_PREFIX "/aop"); |
| 15 | |
| 16 | if (prog_locate(&aop_fw_prog)) |
| 17 | die("SOC image: AOP_FW not found"); |
| 18 | |
| 19 | aop_fw_entry = selfload(&aop_fw_prog); |
| 20 | if (!aop_fw_entry) |
| 21 | die("SOC image: AOP load failed"); |
| 22 | |
| 23 | clock_reset_aop(); |
| 24 | |
| 25 | printk(BIOS_DEBUG, "\nSOC:AOP brought out of reset.\n"); |
| 26 | } |