aboutsummaryrefslogtreecommitdiff
path: root/src/soc/qualcomm/sdm845/aop_load_reset.c
diff options
context:
space:
mode:
authorT Michael Turney <mturney@codeaurora.org>2018-04-09 12:30:34 -0700
committerMartin Roth <martinroth@google.com>2019-07-11 15:08:38 +0000
commitff423f749a5c74f6a4dda59b996fcbed72c94e94 (patch)
tree76d36d09916c6adfb27780e459d04e14ddd54125 /src/soc/qualcomm/sdm845/aop_load_reset.c
parent125b48d1d59b4732c0580e982d925f41fefaf2cd (diff)
sdm845: Add AOP firmware support
TEST=build & run Change-Id: I9845c8638e4b905de5d6985dc9f1fddd8b1a8942 Signed-off-by: T Michael Turney <mturney@codeaurora.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/25210 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/qualcomm/sdm845/aop_load_reset.c')
-rw-r--r--src/soc/qualcomm/sdm845/aop_load_reset.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/soc/qualcomm/sdm845/aop_load_reset.c b/src/soc/qualcomm/sdm845/aop_load_reset.c
new file mode 100644
index 0000000000..02217f9bd3
--- /dev/null
+++ b/src/soc/qualcomm/sdm845/aop_load_reset.c
@@ -0,0 +1,43 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <string.h>
+#include <arch/cache.h>
+#include <cbfs.h>
+#include <halt.h>
+#include <console/console.h>
+#include <timestamp.h>
+#include <soc/mmu.h>
+#include <soc/aop.h>
+#include <soc/clock.h>
+
+void aop_fw_load_reset(void)
+{
+ bool aop_fw_entry;
+
+ struct prog aop_fw_prog =
+ PROG_INIT(PROG_PAYLOAD, CONFIG_CBFS_PREFIX "/aop");
+
+ if (prog_locate(&aop_fw_prog))
+ die("SOC image: AOP_FW not found");
+
+ aop_fw_entry = selfload(&aop_fw_prog);
+ if (!aop_fw_entry)
+ die("SOC image: AOP load failed");
+
+ clock_reset_aop();
+
+ printk(BIOS_DEBUG, "\nSOC:AOP brought out of reset.\n");
+}