soc/mediatek/common: Add common API for loading firmwares
commit7ba377511420e99575b3ae74d67e2c63e7700ecd
authorYidi Lin <yidi.lin@mediatek.com>
Thu, 29 Oct 2020 05:01:28 +0000 (29 13:01 +0800)
committerHung-Te Lin <hungte@chromium.org>
Thu, 10 Dec 2020 03:21:19 +0000 (10 03:21 +0000)
treeda09ecf58664c2472ae9d7b5cf54fa311d6cee7e
parent6bc1296cbd9c7dfc0a01e2bf713109ae684c474f
soc/mediatek/common: Add common API for loading firmwares

Add mtk_init_mcu to load the firmware to the specified memory address
and run the firmware. This function also measures the load time and the
blob size. For example:

mtk_init_mcu: Loaded (and reset) dpm.pm in 15 msecs (14004 bytes)

Signed-off-by: Yidi Lin <yidi.lin@mediatek.com>
Change-Id: Ie94001bbda25fe015f43172e92a1006e059de223
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46930
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
src/soc/mediatek/common/include/soc/mcu_common.h [new file with mode: 0644]
src/soc/mediatek/common/mcu.c [new file with mode: 0644]
src/soc/mediatek/mt8192/Makefile.inc