mb/google/cherry: Initialize SPM

This patch adds support for SPM. This adds 43ms to the boot time.

TEST=program counter of SPM is correct value after booting up.

Signed-off-by: Dawei Chien <dawei.chien@mediatek.com>
Signed-off-by: Edward-JW Yang <edward-jw.yang@mediatek.corp-partner.google.com>
Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I5f17f6d51fc9ad2d23c71c3c5cd29fdc777dc071
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55154
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Rex-BC Chen 2021-06-03 11:41:07 +08:00 committed by Hung-Te Lin
parent fb1858539f
commit 9e3e0f560b
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@
#include <soc/i2c.h>
#include <soc/mt6360.h>
#include <soc/regulator.h>
#include <soc/spm.h>
#include <soc/usb.h>
#include "gpio.h"
@ -124,6 +125,9 @@ static void mainboard_init(struct device *dev)
configure_sdcard();
setup_usb_host();
if (spm_init())
printk(BIOS_ERR, "spm init failed, system suspend may not work\n");
register_reset_to_bl31();
}