Skip to content
  • Ye Li's avatar
    MLK-19356 fastboot: Fix ucmd issue in fastboot · a8569856
    Ye Li authored
    
    
    After executing each ucmd, the ucmd callback function always call fastboot_setup
    to setup some enviroments.
    
    Because the mmc will be switched to user area by calling blk_get_dev in _fastboot_load_partitions.
    When running "mmc partconf" by ucmd, the PART_CONFIG EXTCSD is updated, but the part_config and
    hwpart variables in mmc and blk structure are not synced. So the old value will write to
    PART_CONFIG EXTCSD again when switch to user area.
    
    This patch changes the fastboot_setup, only load the partitions when the storage device is changed.
    Also force to re-init mmc before loading the partitions to sync mmc variables.
    
    Signed-off-by: default avatarYe Li <ye.li@nxp.com>
    (cherry picked from commit c9cd93b25586ecd4ce9178da7b8141f60cdd9deb)
    a8569856