summaryrefslogtreecommitdiff
path: root/src/soc/qualcomm/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/qualcomm/common')
-rw-r--r--src/soc/qualcomm/common/aop_load_reset.c20
-rw-r--r--src/soc/qualcomm/common/include/soc/aop_common.h8
-rw-r--r--src/soc/qualcomm/common/mmu.c8
3 files changed, 34 insertions, 2 deletions
diff --git a/src/soc/qualcomm/common/aop_load_reset.c b/src/soc/qualcomm/common/aop_load_reset.c
new file mode 100644
index 0000000000..1b3a1d50ab
--- /dev/null
+++ b/src/soc/qualcomm/common/aop_load_reset.c
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <cbfs.h>
+#include <console/console.h>
+#include <soc/mmu.h>
+#include <soc/aop_common.h>
+#include <soc/clock.h>
+
+void aop_fw_load_reset(void)
+{
+ struct prog aop_fw_prog =
+ PROG_INIT(PROG_PAYLOAD, CONFIG_CBFS_PREFIX "/aop");
+
+ if (!selfload(&aop_fw_prog))
+ die("SOC image: AOP load failed");
+
+ clock_reset_aop();
+
+ printk(BIOS_DEBUG, "SOC:AOP brought out of reset.\n");
+}
diff --git a/src/soc/qualcomm/common/include/soc/aop_common.h b/src/soc/qualcomm/common/include/soc/aop_common.h
new file mode 100644
index 0000000000..5b0de4eb67
--- /dev/null
+++ b/src/soc/qualcomm/common/include/soc/aop_common.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef _SOC_QUALCOMM_COMMON_AOP_H__
+#define _SOC_QUALCOMM_COMMON_AOP_H__
+
+void aop_fw_load_reset(void);
+
+#endif // _SOC_QUALCOMM_COMMON_AOP_H__
diff --git a/src/soc/qualcomm/common/mmu.c b/src/soc/qualcomm/common/mmu.c
index ba1173edf9..0f12555a7f 100644
--- a/src/soc/qualcomm/common/mmu.c
+++ b/src/soc/qualcomm/common/mmu.c
@@ -3,9 +3,9 @@
#include <arch/mmu.h>
#include <soc/mmu.h>
#include <soc/mmu_common.h>
+#include <soc/symbols_common.h>
__weak bool soc_modem_carve_out(void **start, void **end) { return false; }
-__weak void soc_mmu_dram_config_post_dram_init(void) { /* no-op */ }
void qc_mmu_dram_config_post_dram_init(void *ddr_base, size_t ddr_size)
{
@@ -18,5 +18,9 @@ void qc_mmu_dram_config_post_dram_init(void *ddr_base, size_t ddr_size)
mmu_config_range(ddr_base, start - ddr_base, CACHED_RAM);
mmu_config_range(end, ddr_base + ddr_size - end, CACHED_RAM);
}
- soc_mmu_dram_config_post_dram_init();
+
+ mmu_config_range((void *)_aop_code_ram, REGION_SIZE(aop_code_ram),
+ CACHED_RAM);
+ mmu_config_range((void *)_aop_data_ram, REGION_SIZE(aop_data_ram),
+ CACHED_RAM);
}