tinghan shen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47798 )
Change subject: soc/mediatek/mt8183: use load_blob_file API to load SSPM ......................................................................
soc/mediatek/mt8183: use load_blob_file API to load SSPM
TEST=build pass
Signed-off-by: TingHan.Shen tinghan.shen@mediatek.com Change-Id: Ia72c852caad0cf63f00b5a461f89725e4d7241c2 --- M src/soc/mediatek/mt8183/sspm.c 1 file changed, 4 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/47798/1
diff --git a/src/soc/mediatek/mt8183/sspm.c b/src/soc/mediatek/mt8183/sspm.c index efcf545..9287321 100644 --- a/src/soc/mediatek/mt8183/sspm.c +++ b/src/soc/mediatek/mt8183/sspm.c @@ -1,29 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <arch/barrier.h> -#include <cbfs.h> -#include <console/console.h> #include <device/mmio.h> +#include <soc/mtlib_common.h> #include <soc/sspm.h> -#include <string.h> - -#define BUF_SIZE (64 * KiB) -static uint8_t sspm_bin[BUF_SIZE] __aligned(8);
void sspm_init(void) { - const char *file_name = "sspm.bin"; - size_t fw_size = cbfs_boot_load_file(file_name, - sspm_bin, - sizeof(sspm_bin), - CBFS_TYPE_RAW); - - if (fw_size == 0) - die("SSPM file :sspm.bin not found."); - - memcpy((void *)SSPM_SRAM_BASE, sspm_bin, fw_size); - /* Memory barrier to ensure that all fw code is loaded - before we release the reset pin. */ - mb(); - write32(&mt8183_sspm->sw_rstn, 0x1); + const char *sspm_file_name = "sspm.bin"; + if (load_blob_file(sspm_file_name, SSPM_SRAM_BASE) == CB_SUCCESS) + write32(&mt8183_sspm->sw_rstn, 0x1); }
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47798 )
Change subject: soc/mediatek/mt8183: use load_blob_file API to load SSPM ......................................................................
Patch Set 1: Code-Review-1
please abandon this patch
tinghan shen has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/47798 )
Change subject: soc/mediatek/mt8183: use load_blob_file API to load SSPM ......................................................................
Abandoned