common: board_r: apply mtd_blk_map_partitions()

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I2e1fd21a6a41f8b86ab6f52c69631018a88445ec
This commit is contained in:
Jason Zhu 2020-05-25 18:01:12 +08:00
parent 459f5cb0d9
commit 4e2ae7292a
1 changed files with 18 additions and 0 deletions

View File

@ -453,6 +453,21 @@ static int initr_mmc(void)
}
#endif
#ifdef CONFIG_MTD_BLK
static int initr_mtd_blk(void)
{
#ifndef CONFIG_USING_KERNEL_DTB
struct blk_desc *dev_desc;
puts("mtd_blk: ");
dev_desc = rockchip_get_bootdev();
if (dev_desc)
mtd_blk_map_partitions(dev_desc);
#endif
return 0;
}
#endif
#if !defined(CONFIG_USING_KERNEL_DTB) || !defined(CONFIG_ENV_IS_NOWHERE)
/*
* Tell if it's OK to load the environment early in boot.
@ -917,6 +932,9 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_CMD_ONENAND
initr_onenand,
#endif
#ifdef CONFIG_MTD_BLK
initr_mtd_blk
#endif
#ifdef CONFIG_MMC
initr_mmc,
#endif