spl: mmc: support load image depend on parameter next_stage
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com> Change-Id: I215cc0095d875fe8f4d58b27d49e30cb615e8167
This commit is contained in:
parent
05431850c7
commit
602b8060f1
|
|
@ -7,6 +7,7 @@
|
||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <boot_rkimg.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <part.h>
|
#include <part.h>
|
||||||
#include <spl.h>
|
#include <spl.h>
|
||||||
|
|
@ -351,8 +352,15 @@ int spl_mmc_load_image(struct spl_image_info *spl_image,
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
|
#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
|
||||||
|
const char *partition_name;
|
||||||
|
|
||||||
|
if (spl_image->next_stage == SPL_NEXT_STAGE_KERNEL)
|
||||||
|
partition_name = PART_BOOT;
|
||||||
|
else
|
||||||
|
partition_name = PART_UBOOT;
|
||||||
|
|
||||||
err = mmc_load_image_raw_partition(spl_image, mmc,
|
err = mmc_load_image_raw_partition(spl_image, mmc,
|
||||||
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_NAME,
|
partition_name,
|
||||||
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION);
|
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION);
|
||||||
if (!err)
|
if (!err)
|
||||||
return err;
|
return err;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue