/* TODO: Replace these with struct ida */
static DECLARE_BITMAP(dev_use, MAX_DEVICES);
+#if 0
+/* move to drivers/mmc/card/queue.h*/
/*
* There is one mmc_blk_data per slot.
*/
struct device_attribute power_ro_lock;
int area_type;
};
+#endif
static DEFINE_MUTEX(open_lock);
module_param(perdev_minors, int, 0444);
MODULE_PARM_DESC(perdev_minors, "Minors numbers to allocate per device");
-static inline int mmc_blk_part_switch(struct mmc_card *card,
+int mmc_blk_part_switch(struct mmc_card *card,
struct mmc_blk_data *md);
static int get_card_status(struct mmc_card *card, u32 *status, int retries);
packed->blocks = 0;
}
-static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
+struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
{
struct mmc_blk_data *md;
return devidx;
}
-static void mmc_blk_put(struct mmc_blk_data *md)
+void mmc_blk_put(struct mmc_blk_data *md)
{
mutex_lock(&open_lock);
md->usage--;
return 0;
}
-static int ioctl_rpmb_card_status_poll(struct mmc_card *card, u32 *status,
+int ioctl_rpmb_card_status_poll(struct mmc_card *card, u32 *status,
u32 retries_max)
{
int err;
#endif
};
-static inline int mmc_blk_part_switch(struct mmc_card *card,
+int mmc_blk_part_switch(struct mmc_card *card,
struct mmc_blk_data *md)
{
int ret;
return ERR_CONTINUE;
}
-static int mmc_blk_reset(struct mmc_blk_data *md, struct mmc_host *host,
+int mmc_blk_reset(struct mmc_blk_data *md, struct mmc_host *host,
int type)
{
int err;
return err;
}
-static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type)
+void mmc_blk_reset_success(struct mmc_blk_data *md, int type)
{
md->reset_done &= ~type;
}
if (mmc_add_disk(part_md))
goto out;
}
-
+ #ifdef CONFIG_ARM64
+ if (card->host->restrict_caps & RESTRICT_CARD_TYPE_EMMC)
+ mmc_blk_emmc_add(card, sizeof(struct mmc_blk_data));
+ #endif
pm_runtime_set_autosuspend_delay(&card->dev, 3000);
pm_runtime_use_autosuspend(&card->dev);
if (card->host->restrict_caps & RESTRICT_CARD_TYPE_EMMC)
this_card = NULL;
#endif
+ #ifdef CONFIG_ARM64
+ if (card->host->restrict_caps & RESTRICT_CARD_TYPE_EMMC)
+ mmc_blk_emmc_remove(card);
+ #endif
mmc_blk_remove_parts(card, md);
pm_runtime_get_sync(&card->dev);
static void mmc_blk_shutdown(struct mmc_card *card)
{
+ #ifdef CONFIG_ARM64
+ if (card->host->restrict_caps & RESTRICT_CARD_TYPE_EMMC)
+ mmc_blk_emmc_remove(card);
+ #endif
_mmc_blk_suspend(card);
}