dm: mmc: Add a function to obtain the block device

The MMC block device is contained within struct mmc. But with driver model
this will not be the case. Add a function to obtain the block device. We
can later implement this for CONFIG_BLK.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2016-05-01 13:52:27 -06:00
parent e17d1143c1
commit cb5ec33d90
2 changed files with 13 additions and 0 deletions

View File

@@ -24,6 +24,11 @@
static struct list_head mmc_devices;
static int cur_dev_num = -1;
struct blk_desc *mmc_get_blk_desc(struct mmc *mmc)
{
return &mmc->block_dev;
}
__weak int board_mmc_getwp(struct mmc *mmc)
{
return -1;