From a5f472bf57e8897c4c47dce6050f0dfacfca5f13 Mon Sep 17 00:00:00 2001 From: Roger Lu Date: Fri, 10 Jul 2020 15:29:31 +0800 Subject: soc/mediatek/mt8192: add spmfw loader This patch adds support for loading spm firmware from cbfs to spm sram. Spm needs its own firmware to enable spm suspend/resume function which turns off several resources such as DRAM/mainpll/26M clk when linux system suspend. BUG=b:159079649 TEST=suspend with command `powerd_dbus_suspend` and wake up the DUT by powerkey Signed-off-by: Roger Lu Change-Id: I6478b98f426d2f3e0ee919d37d21d909ae8a6371 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46389 Tested-by: build bot (Jenkins) Reviewed-by: Hung-Te Lin --- src/mainboard/google/asurada/mainboard.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mainboard/google/asurada') diff --git a/src/mainboard/google/asurada/mainboard.c b/src/mainboard/google/asurada/mainboard.c index e00eb2fde4..0701c678d6 100644 --- a/src/mainboard/google/asurada/mainboard.c +++ b/src/mainboard/google/asurada/mainboard.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "gpio.h" @@ -107,6 +108,9 @@ static void mainboard_init(struct device *dev) setup_usb_host(); register_reset_to_bl31(); + + if (spm_init()) + printk(BIOS_ERR, "spm init fail, system suspend may stuck\n"); } static void mainboard_enable(struct device *dev) -- cgit v1.2.3