From 772534ab5a38e1d418cbcad561433bd6d32db8e6 Mon Sep 17 00:00:00 2001 From: Ji Luo Date: Tue, 23 Jul 2019 15:19:20 +0800 Subject: MA-15062-2 change mcu firmware partition name new imx8mn chips have Cortex-M7 inside, not like any other existing multi-core i.MX MPU, users may manually flash mcu firmware with fastboot, partition name need to be specified at the same time, so the mcu firmware partition name need to be changed. related enum and variable names are also modified. Change-Id: Ia801e76fb3a20d0074dbbc1433258358c1a53907 Signed-off-by: faqiang.zhu Signed-off-by: Ji Luo (cherry picked from commit dc25b7b27fa5c2293d09789a338a1aed2e3a010f) (cherry picked from commit 74da26c497c9a4d28e9fc153a543ada3f2b9cc0d) --- drivers/fastboot/fb_fsl/fb_fsl_boot.c | 12 ++++++------ drivers/fastboot/fb_fsl/fb_fsl_common.c | 2 +- drivers/fastboot/fb_fsl/fb_fsl_partitions.c | 16 ++++++++-------- include/fb_fsl.h | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/fastboot/fb_fsl/fb_fsl_boot.c b/drivers/fastboot/fb_fsl/fb_fsl_boot.c index 7877207adbe..a48214334a7 100644 --- a/drivers/fastboot/fb_fsl/fb_fsl_boot.c +++ b/drivers/fastboot/fb_fsl/fb_fsl_boot.c @@ -190,18 +190,18 @@ static int do_bootmcu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { int ret; size_t out_num_read; - void *m4_base_addr = (void *)M4_BOOTROM_BASE_ADDR; + void *mcu_base_addr = (void *)MCU_BOOTROM_BASE_ADDR; char command[32]; ret = read_from_partition_multi(FASTBOOT_MCU_FIRMWARE_PARTITION, - 0, ANDROID_MCU_FIRMWARE_SIZE, (void *)m4_base_addr, &out_num_read); + 0, ANDROID_MCU_FIRMWARE_SIZE, (void *)mcu_base_addr, &out_num_read); if ((ret != 0) || (out_num_read != ANDROID_MCU_FIRMWARE_SIZE)) { - printf("Read M4 images failed!\n"); + printf("Read MCU images failed!\n"); return 1; } else { - printf("run command: 'bootaux 0x%x'\n",(unsigned int)(ulong)m4_base_addr); + printf("run command: 'bootaux 0x%x'\n",(unsigned int)(ulong)mcu_base_addr); - sprintf(command, "bootaux 0x%x", (unsigned int)(ulong)m4_base_addr); + sprintf(command, "bootaux 0x%x", (unsigned int)(ulong)mcu_base_addr); ret = run_command(command, 0); if (ret) { printf("run 'bootaux' command failed!\n"); @@ -214,7 +214,7 @@ static int do_bootmcu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) U_BOOT_CMD( bootmcu, 1, 0, do_bootmcu, "boot mcu images\n", - "boot mcu images from 'm4_os' partition, only support images run from TCM" + "boot mcu images from 'mcu_os' partition, only support images run from TCM" ); #endif diff --git a/drivers/fastboot/fb_fsl/fb_fsl_common.c b/drivers/fastboot/fb_fsl/fb_fsl_common.c index cfb2031b6c1..4efb73da791 100644 --- a/drivers/fastboot/fb_fsl/fb_fsl_common.c +++ b/drivers/fastboot/fb_fsl/fb_fsl_common.c @@ -332,7 +332,7 @@ static int _fastboot_setup_dev(int *switched) #ifdef CONFIG_FLASH_MCUFIRMWARE_SUPPORT /* For imx7ulp, flash m4 images directly to spi nor-flash, M4 will * run automatically after powered on. For imx8mq, flash m4 images to - * physical partition 'm4_os', m4 will be kicked off by A core. */ + * physical partition 'mcu_os', m4 will be kicked off by A core. */ fastboot_firmwareinfo.type = ANDROID_MCU_FRIMWARE_DEV_TYPE; #endif diff --git a/drivers/fastboot/fb_fsl/fb_fsl_partitions.c b/drivers/fastboot/fb_fsl/fb_fsl_partitions.c index 55bc28b3d6a..2aebb5e0e5d 100644 --- a/drivers/fastboot/fb_fsl/fb_fsl_partitions.c +++ b/drivers/fastboot/fb_fsl/fb_fsl_partitions.c @@ -42,7 +42,7 @@ enum { PTN_GPT_INDEX = 0, PTN_TEE_INDEX, #ifdef CONFIG_FLASH_MCUFIRMWARE_SUPPORT - PTN_M4_OS_INDEX, + PTN_MCU_OS_INDEX, #endif PTN_ALL_INDEX, PTN_BOOTLOADER_INDEX, @@ -212,14 +212,14 @@ static int _fastboot_parts_load_from_ptable(void) strcpy(ptable[PTN_TEE_INDEX].fstype, "raw"); #endif - /* Add m4_os partition if we support mcu firmware image flash */ + /* Add mcu_os partition if we support mcu firmware image flash */ #ifdef CONFIG_FLASH_MCUFIRMWARE_SUPPORT - strcpy(ptable[PTN_M4_OS_INDEX].name, FASTBOOT_MCU_FIRMWARE_PARTITION); - ptable[PTN_M4_OS_INDEX].start = ANDROID_MCU_FIRMWARE_START / dev_desc->blksz; - ptable[PTN_M4_OS_INDEX].length = ANDROID_MCU_FIRMWARE_SIZE / dev_desc->blksz; - ptable[PTN_M4_OS_INDEX].flags = FASTBOOT_PTENTRY_FLAGS_UNERASEABLE; - ptable[PTN_M4_OS_INDEX].partition_id = user_partition; - strcpy(ptable[PTN_M4_OS_INDEX].fstype, "raw"); + strcpy(ptable[PTN_MCU_OS_INDEX].name, FASTBOOT_MCU_FIRMWARE_PARTITION); + ptable[PTN_MCU_OS_INDEX].start = ANDROID_MCU_FIRMWARE_START / dev_desc->blksz; + ptable[PTN_MCU_OS_INDEX].length = ANDROID_MCU_FIRMWARE_SIZE / dev_desc->blksz; + ptable[PTN_MCU_OS_INDEX].flags = FASTBOOT_PTENTRY_FLAGS_UNERASEABLE; + ptable[PTN_MCU_OS_INDEX].partition_id = user_partition; + strcpy(ptable[PTN_MCU_OS_INDEX].fstype, "raw"); #endif strcpy(ptable[PTN_ALL_INDEX].name, FASTBOOT_PARTITION_ALL); diff --git a/include/fb_fsl.h b/include/fb_fsl.h index dbd37017ecc..c8cbe711209 100644 --- a/include/fb_fsl.h +++ b/include/fb_fsl.h @@ -47,7 +47,7 @@ #endif #ifdef CONFIG_FLASH_MCUFIRMWARE_SUPPORT -#define FASTBOOT_MCU_FIRMWARE_PARTITION "m4_os" +#define FASTBOOT_MCU_FIRMWARE_PARTITION "mcu_os" #endif #ifdef CONFIG_ANDROID_AB_SUPPORT -- cgit v1.2.3