rockchip: board: apply mtd_blk_map_partitions()

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I8c693d047349f3f688eb3304ca99b091110ebf01
This commit is contained in:
Jason Zhu 2020-05-22 11:41:13 +08:00
parent a07b97f223
commit 459f5cb0d9
1 changed files with 15 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include <memblk.h>
#include <misc.h>
#include <of_live.h>
#include <mtd_blk.h>
#include <ram.h>
#include <rockchip_debugger.h>
#include <syscon.h>
@ -345,6 +346,17 @@ static void board_debug_init(void)
printf("CLI: off\n");
}
#ifdef CONFIG_MTD_BLK
static void board_mtd_blk_map_partitions(void)
{
struct blk_desc *dev_desc;
dev_desc = rockchip_get_bootdev();
if (dev_desc)
mtd_blk_map_partitions(dev_desc);
}
#endif
int board_init(void)
{
board_debug_init();
@ -354,6 +366,9 @@ int board_init(void)
#endif
#ifdef CONFIG_USING_KERNEL_DTB
#ifdef CONFIG_MTD_BLK
board_mtd_blk_map_partitions();
#endif
init_kernel_dtb();
#endif
early_download();