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>
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;
#define CONFIG_SYS_MMC_MAX_BLK_COUNT 65535
#endif
+/**
+ * mmc_get_blk_desc() - Get the block descriptor for an MMC device
+ *
+ * @mmc: MMC device
+ * @return block device if found, else NULL
+ */
+struct blk_desc *mmc_get_blk_desc(struct mmc *mmc);
+
#endif /* _MMC_H_ */