diff options
| author | wzedlare <vedatak01@gmail.com> | 2017-06-18 16:38:26 +0000 |
|---|---|---|
| committer | wzedlare <vedatak01@gmail.com> | 2017-06-19 16:57:11 +0000 |
| commit | c7d4e3fd588e3ba3d3fa4d5cfa224aa54bc288bf (patch) | |
| tree | b8b64cb9deb6832c1e41f58f0f143514beafc709 /include/linux/mmc/core.h | |
| parent | 28c99c87b881bb664c44bb26e80a681f87d54e60 (diff) | |
Change-Id: Ia4c94f09e29843b1af34d466243378a357e97b70
Diffstat (limited to 'include/linux/mmc/core.h')
| -rw-r--r-- | include/linux/mmc/core.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 24f6b228..fe75403e 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -209,6 +209,14 @@ extern int mmc_flush_cache(struct mmc_card *); extern int mmc_cache_barrier(struct mmc_card *); extern int mmc_detect_card_removed(struct mmc_host *host); +extern void mmc_prepare_mrq(struct mmc_card *card, + struct mmc_request *mrq, struct scatterlist *sg, unsigned sg_len, + unsigned dev_addr, unsigned blocks, unsigned blksz, int write); +extern int mmc_wait_busy(struct mmc_card *card); +extern int mmc_check_result(struct mmc_request *mrq); +extern int mmc_simple_transfer(struct mmc_card *card, + struct scatterlist *sg, unsigned sg_len, unsigned dev_addr, + unsigned blocks, unsigned blksz, int write); extern void mmc_blk_init_bkops_statistics(struct mmc_card *card); @@ -233,4 +241,25 @@ struct device_node; extern u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max); extern int mmc_of_parse_voltage(struct device_node *np, u32 *mask); +/* + * eMMC5.0 Field Firmware Update (FFU) opcodes +*/ +#define MMC_FFU_INVOKE_OP 302 + +#define MMC_FFU_MODE_SET 0x1 +#define MMC_FFU_MODE_NORMAL 0x0 +#define MMC_FFU_INSTALL_SET 0x2 + +#ifdef CONFIG_MMC_FFU +#define MMC_FFU_FEATURES 0x1 +#define FFU_FEATURES(ffu_features) (ffu_features & MMC_FFU_FEATURES) + +int mmc_ffu_invoke(struct mmc_card *card, const char *name); + +#else +static inline int mmc_ffu_invoke(struct mmc_card *card, const char *name) +{ + return -ENOSYS; +} +#endif #endif /* LINUX_MMC_CORE_H */ |
