From: xbw Date: Tue, 4 Mar 2014 03:15:43 +0000 (+0800) Subject: Revert "SDMMC:" X-Git-Tag: firefly_0821_release~6227 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=02b30b0a08a00b09cd12fff8134088ee9713f131;p=firefly-linux-kernel-4.4.55.git Revert "SDMMC:" This reverts commit 62162391804d11365c2c4c5c63467c366fa318dc. --- diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c old mode 100755 new mode 100644 index ec016974d226..4f98f8b38395 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -34,7 +34,7 @@ #include #include #include -#include + #define CREATE_TRACE_POINTS #include @@ -61,8 +61,6 @@ MODULE_ALIAS("mmc:block"); #define INAND_CMD38_ARG_SECTRIM1 0x81 #define INAND_CMD38_ARG_SECTRIM2 0x88 #define MMC_BLK_TIMEOUT_MS (10 * 60 * 1000) /* 10 minute timeout */ -#define MMC_SANITIZE_REQ_TIMEOUT 240000 -#define MMC_EXTRACT_INDEX_FROM_ARG(x) ((x & 0x00FF0000) >> 16) #define mmc_req_rel_wr(req) (((req->cmd_flags & REQ_FUA) || \ (req->cmd_flags & REQ_META)) && \ @@ -168,11 +166,7 @@ static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk) static inline int mmc_get_devidx(struct gendisk *disk) { - int devmaj = MAJOR(disk_devt(disk)); - int devidx = MINOR(disk_devt(disk)) / perdev_minors; - - if (!devmaj) - devidx = disk->first_minor / perdev_minors; + int devidx = disk->first_minor / perdev_minors; return devidx; } @@ -227,7 +221,7 @@ static ssize_t power_ro_lock_store(struct device *dev, md = mmc_blk_get(dev_to_disk(dev)); card = md->queue.card; - mmc_get_card(card); + mmc_claim_host(card->host); ret = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BOOT_WP, card->ext_csd.boot_ro_lock | @@ -238,7 +232,7 @@ static ssize_t power_ro_lock_store(struct device *dev, else card->ext_csd.boot_ro_lock |= EXT_CSD_BOOT_WP_B_PWR_WP_EN; - mmc_put_card(card); + mmc_release_host(card->host); if (!ret) { pr_info("%s: Locking boot partition ro until next power on\n", @@ -413,35 +407,6 @@ static int ioctl_rpmb_card_status_poll(struct mmc_card *card, u32 *status, return err; } -static int ioctl_do_sanitize(struct mmc_card *card) -{ - int err; - - if (!(mmc_can_sanitize(card) && - (card->host->caps2 & MMC_CAP2_SANITIZE))) { - pr_warn("%s: %s - SANITIZE is not supported\n", - mmc_hostname(card->host), __func__); - err = -EOPNOTSUPP; - goto out; - } - - pr_debug("%s: %s - SANITIZE IN PROGRESS...\n", - mmc_hostname(card->host), __func__); - - err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_SANITIZE_START, 1, - MMC_SANITIZE_REQ_TIMEOUT); - - if (err) - pr_err("%s: %s - EXT_CSD_SANITIZE_START failed. err=%d\n", - mmc_hostname(card->host), __func__, err); - - pr_debug("%s: %s - SANITIZE COMPLETED\n", mmc_hostname(card->host), - __func__); -out: - return err; -} - static int mmc_blk_ioctl_cmd(struct block_device *bdev, struct mmc_ioc_cmd __user *ic_ptr) { @@ -525,7 +490,7 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, mrq.cmd = &cmd; - mmc_get_card(card); + mmc_claim_host(card->host); err = mmc_blk_part_switch(card, md); if (err) @@ -544,17 +509,6 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, goto cmd_rel_host; } - if ((MMC_EXTRACT_INDEX_FROM_ARG(cmd.arg) == EXT_CSD_SANITIZE_START) && - (cmd.opcode == MMC_SWITCH)) { - err = ioctl_do_sanitize(card); - - if (err) - pr_err("%s: ioctl_do_sanitize() failed. err = %d", - __func__, err); - - goto cmd_rel_host; - } - mmc_wait_for_req(card->host, &mrq); if (cmd.error) { @@ -603,7 +557,7 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, } cmd_rel_host: - mmc_put_card(card); + mmc_release_host(card->host); cmd_done: mmc_blk_put(md); @@ -1005,10 +959,10 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, { struct mmc_blk_data *md = mq->data; struct mmc_card *card = md->queue.card; - unsigned int from, nr, arg; + unsigned int from, nr, arg, trim_arg, erase_arg; int err = 0, type = MMC_BLK_SECDISCARD; - if (!(mmc_can_secure_erase_trim(card))) { + if (!(mmc_can_secure_erase_trim(card) || mmc_can_sanitize(card))) { err = -EOPNOTSUPP; goto out; } @@ -1016,11 +970,23 @@ static int mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, from = blk_rq_pos(req); nr = blk_rq_sectors(req); - if (mmc_can_trim(card) && !mmc_erase_group_aligned(card, from, nr)) - arg = MMC_SECURE_TRIM1_ARG; - else - arg = MMC_SECURE_ERASE_ARG; + /* The sanitize operation is supported at v4.5 only */ + if (mmc_can_sanitize(card)) { + erase_arg = MMC_ERASE_ARG; + trim_arg = MMC_TRIM_ARG; + } else { + erase_arg = MMC_SECURE_ERASE_ARG; + trim_arg = MMC_SECURE_TRIM1_ARG; + } + if (mmc_erase_group_aligned(card, from, nr)) + arg = erase_arg; + else if (mmc_can_trim(card)) + arg = trim_arg; + else { + err = -EINVAL; + goto out; + } retry: if (card->quirks & MMC_QUIRK_INAND_CMD38) { err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, @@ -1971,7 +1937,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) struct mmc_card *card = md->queue.card; struct mmc_host *host = card->host; unsigned long flags; - unsigned int cmd_flags = req ? req->cmd_flags : 0; + #ifdef CONFIG_MMC_BLOCK_DEFERRED_RESUME if (mmc_bus_needs_resume(card->host)) mmc_resume_bus(card->host); @@ -1979,7 +1945,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) if (req && !mq->mqrq_prev->req) /* claim host only for the first request */ - mmc_get_card(card); + mmc_claim_host(card->host); ret = mmc_blk_part_switch(card, md); if (ret) { @@ -1991,7 +1957,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) } mq->flags &= ~MMC_QUEUE_NEW_REQUEST; - if (cmd_flags & REQ_DISCARD) { + if (req && req->cmd_flags & REQ_DISCARD) { /* complete ongoing async transfer before issuing discard */ if (card->host->areq) mmc_blk_issue_rw_rq(mq, NULL); @@ -2000,7 +1966,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) ret = mmc_blk_issue_secdiscard_rq(mq, req); else ret = mmc_blk_issue_discard_rq(mq, req); - } else if (cmd_flags & REQ_FLUSH) { + } else if (req && req->cmd_flags & REQ_FLUSH) { /* complete ongoing async transfer before issuing flush */ if (card->host->areq) mmc_blk_issue_rw_rq(mq, NULL); @@ -2016,14 +1982,14 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) out: if ((!req && !(mq->flags & MMC_QUEUE_NEW_REQUEST)) || - (cmd_flags & MMC_REQ_SPECIAL_MASK)) + (req && (req->cmd_flags & MMC_REQ_SPECIAL_MASK))) /* * Release host when there are no more requests * and after special request(discard, flush) is done. * In case sepecial request, there is no reentry to * the 'mmc_blk_issue_rq' with 'mqrq_prev->req'. */ - mmc_put_card(card); + mmc_release_host(card->host); return ret; } @@ -2243,15 +2209,7 @@ static void mmc_blk_remove_req(struct mmc_blk_data *md) struct mmc_card *card; if (md) { - /* - * Flush remaining requests and free queues. It - * is freeing the queue that stops new requests - * from being accepted. - */ card = md->queue.card; - mmc_cleanup_queue(&md->queue); - if (md->flags & MMC_BLK_PACKED_CMD) - mmc_packed_clean(&md->queue); if (md->disk->flags & GENHD_FL_UP) { device_remove_file(disk_to_dev(md->disk), &md->force_ro); if ((md->area_type & MMC_BLK_DATA_AREA_BOOT) && @@ -2262,6 +2220,11 @@ static void mmc_blk_remove_req(struct mmc_blk_data *md) /* Stop new requests from getting into the queue */ del_gendisk(md->disk); } + + /* Then flush out any already in there */ + mmc_cleanup_queue(&md->queue); + if (md->flags & MMC_BLK_PACKED_CMD) + mmc_packed_clean(&md->queue); mmc_blk_put(md); } } @@ -2427,19 +2390,6 @@ static int mmc_blk_probe(struct mmc_card *card) if (mmc_add_disk(part_md)) goto out; } - - pm_runtime_set_autosuspend_delay(&card->dev, 3000); - pm_runtime_use_autosuspend(&card->dev); - - /* - * Don't enable runtime PM for SD-combo cards here. Leave that - * decision to be taken during the SDIO init sequence instead. - */ - if (card->type != MMC_TYPE_SD_COMBO) { - pm_runtime_set_active(&card->dev); - pm_runtime_enable(&card->dev); - } - return 0; out: @@ -2453,13 +2403,9 @@ static void mmc_blk_remove(struct mmc_card *card) struct mmc_blk_data *md = mmc_get_drvdata(card); mmc_blk_remove_parts(card, md); - pm_runtime_get_sync(&card->dev); mmc_claim_host(card->host); mmc_blk_part_switch(card, md); mmc_release_host(card->host); - if (card->type != MMC_TYPE_SD_COMBO) - pm_runtime_disable(&card->dev); - pm_runtime_put_noidle(&card->dev); mmc_blk_remove_req(md); mmc_set_drvdata(card, NULL); #ifdef CONFIG_MMC_BLOCK_DEFERRED_RESUME @@ -2467,7 +2413,8 @@ static void mmc_blk_remove(struct mmc_card *card) #endif } -static int _mmc_blk_suspend(struct mmc_card *card) +#ifdef CONFIG_PM +static int mmc_blk_suspend(struct mmc_card *card) { struct mmc_blk_data *part_md; struct mmc_blk_data *md = mmc_get_drvdata(card); @@ -2481,17 +2428,6 @@ static int _mmc_blk_suspend(struct mmc_card *card) return 0; } -static void mmc_blk_shutdown(struct mmc_card *card) -{ - _mmc_blk_suspend(card); -} - -#ifdef CONFIG_PM -static int mmc_blk_suspend(struct mmc_card *card) -{ - return _mmc_blk_suspend(card); -} - static int mmc_blk_resume(struct mmc_card *card) { struct mmc_blk_data *part_md; @@ -2523,7 +2459,6 @@ static struct mmc_driver mmc_driver = { .remove = mmc_blk_remove, .suspend = mmc_blk_suspend, .resume = mmc_blk_resume, - .shutdown = mmc_blk_shutdown, }; static int __init mmc_blk_init(void) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c old mode 100755 new mode 100644 index 0c0fc52d42c5..759714ed6bee --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c @@ -2849,12 +2849,18 @@ static ssize_t mtf_test_write(struct file *file, const char __user *buf, struct seq_file *sf = (struct seq_file *)file->private_data; struct mmc_card *card = (struct mmc_card *)sf->private; struct mmc_test_card *test; + char lbuf[12]; long testcase; - int ret; - ret = kstrtol_from_user(buf, count, 10, &testcase); - if (ret) - return ret; + if (count >= sizeof(lbuf)) + return -EINVAL; + + if (copy_from_user(lbuf, buf, count)) + return -EFAULT; + lbuf[count] = '\0'; + + if (strict_strtol(lbuf, 10, &testcase)) + return -EINVAL; test = kzalloc(sizeof(struct mmc_test_card), GFP_KERNEL); if (!test) @@ -3019,17 +3025,12 @@ static void mmc_test_remove(struct mmc_card *card) mmc_test_free_dbgfs_file(card); } -static void mmc_test_shutdown(struct mmc_card *card) -{ -} - static struct mmc_driver mmc_driver = { .drv = { .name = "mmc_test", }, .probe = mmc_test_probe, .remove = mmc_test_remove, - .shutdown = mmc_test_shutdown, }; static int __init mmc_test_init(void) diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c old mode 100755 new mode 100644 index 70427e902a2d..9447a0e970d1 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -173,7 +173,7 @@ static void mmc_queue_setup_discard(struct request_queue *q, /* granularity must not be greater than max. discard */ if (card->pref_erase > max_discard) q->limits.discard_granularity = 0; - if (mmc_can_secure_erase_trim(card)) + if (mmc_can_secure_erase_trim(card) || mmc_can_sanitize(card)) queue_flag_set_unlocked(QUEUE_FLAG_SECDISCARD, q); } @@ -196,8 +196,7 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, struct mmc_queue_req *mqrq_prev = &mq->mqrq[1]; if (mmc_dev(host)->dma_mask && *mmc_dev(host)->dma_mask) - limit = *mmc_dev(host)->dma_mask; - //limit = (u64)dma_max_pfn(mmc_dev(host)) << PAGE_SHIFT; + limit = *mmc_dev(host)->dma_mask; mq->card = card; mq->queue = blk_init_queue(mmc_request_fn, lock); diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c old mode 100755 new mode 100644 index d0b980c082d9..e219c97a02a4 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -122,24 +122,6 @@ static int mmc_bus_remove(struct device *dev) return 0; } -static void mmc_bus_shutdown(struct device *dev) -{ - struct mmc_driver *drv = to_mmc_driver(dev->driver); - struct mmc_card *card = mmc_dev_to_card(dev); - struct mmc_host *host = card->host; - int ret; - - if (dev->driver && drv->shutdown) - drv->shutdown(card); - - if (host->bus_ops->shutdown) { - ret = host->bus_ops->shutdown(host); - if (ret) - pr_warn("%s: error %d during shutdown\n", - mmc_hostname(host), ret); - } -} - #ifdef CONFIG_PM_SLEEP static int mmc_bus_suspend(struct device *dev) { @@ -200,7 +182,6 @@ static struct bus_type mmc_bus_type = { .uevent = mmc_bus_uevent, .probe = mmc_bus_probe, .remove = mmc_bus_remove, - .shutdown = mmc_bus_shutdown, .pm = &mmc_bus_pm_ops, }; diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c old mode 100755 new mode 100644 index 050050d513c9..6a83f4ccc108 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -440,24 +440,6 @@ static void mmc_wait_for_req_done(struct mmc_host *host, wait_for_completion(&mrq->completion); cmd = mrq->cmd; - - /* - * If host has timed out waiting for the sanitize - * to complete, card might be still in programming state - * so let's try to bring the card out of programming - * state. - */ - if (cmd->sanitize_busy && cmd->error == -ETIMEDOUT) { - if (!mmc_interrupt_hpi(host->card)) { - pr_warning("%s: %s: Interrupted sanitize\n", - mmc_hostname(host), __func__); - cmd->error = 0; - break; - } else { - pr_err("%s: %s: Failed to interrupt sanitize\n", - mmc_hostname(host), __func__); - } - } if (!cmd->error || !cmd->retries || mmc_card_removed(host->card)) break; @@ -977,29 +959,6 @@ void mmc_release_host(struct mmc_host *host) } EXPORT_SYMBOL(mmc_release_host); -/* - * This is a helper function, which fetches a runtime pm reference for the - * card device and also claims the host. - */ -void mmc_get_card(struct mmc_card *card) -{ - pm_runtime_get_sync(&card->dev); - mmc_claim_host(card->host); -} -EXPORT_SYMBOL(mmc_get_card); - -/* - * This is a helper function, which releases the host and drops the runtime - * pm reference for the card device. - */ -void mmc_put_card(struct mmc_card *card) -{ - mmc_release_host(card->host); - pm_runtime_mark_last_busy(&card->dev); - pm_runtime_put_autosuspend(&card->dev); -} -EXPORT_SYMBOL(mmc_put_card); - /* * Internal function that does the actual ios call to the host driver, * optionally printing some debug output. diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h old mode 100755 new mode 100644 index c9c2c2fbc868..b9f18a2a8874 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -25,7 +25,6 @@ struct mmc_bus_ops { int (*power_save)(struct mmc_host *); int (*power_restore)(struct mmc_host *); int (*alive)(struct mmc_host *); - int (*shutdown)(struct mmc_host *); }; void mmc_attach_bus(struct mmc_host *host, const struct mmc_bus_ops *ops); diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c old mode 100755 new mode 100644 index 54829c0ed000..35c2f85b1956 --- a/drivers/mmc/core/debugfs.c +++ b/drivers/mmc/core/debugfs.c @@ -258,13 +258,13 @@ static int mmc_dbg_card_status_get(void *data, u64 *val) u32 status; int ret; - mmc_get_card(card); + mmc_claim_host(card->host); ret = mmc_send_status(data, &status); if (!ret) *val = status; - mmc_put_card(card); + mmc_release_host(card->host); return ret; } @@ -291,9 +291,9 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp) goto out_free; } - mmc_get_card(card); + mmc_claim_host(card->host); err = mmc_send_ext_csd(card, ext_csd); - mmc_put_card(card); + mmc_release_host(card->host); if (err) goto out_free; diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c old mode 100755 new mode 100644 diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c old mode 100755 new mode 100644 index 09841b6fb83a..0cbd1effe960 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -294,7 +293,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) } card->ext_csd.rev = ext_csd[EXT_CSD_REV]; - if (card->ext_csd.rev > 7) { + if (card->ext_csd.rev > 6) { pr_err("%s: unrecognised EXT_CSD revision %d\n", mmc_hostname(card->host), card->ext_csd.rev); err = -EINVAL; @@ -1381,14 +1380,14 @@ static void mmc_detect(struct mmc_host *host) BUG_ON(!host); BUG_ON(!host->card); - mmc_get_card(host->card); + mmc_claim_host(host); /* * Just check if our card has been removed. */ err = _mmc_detect_card_removed(host); - mmc_put_card(host->card); + mmc_release_host(host); if (err) { mmc_remove(host); diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c old mode 100755 new mode 100644 index 124af5238d0a..49f04bc9d0eb --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -431,8 +431,6 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, cmd.cmd_timeout_ms = timeout_ms; - if (index == EXT_CSD_SANITIZE_START) - cmd.sanitize_busy = true; err = mmc_wait_for_cmd(card->host, &cmd, MMC_CMD_RETRIES); if (err) diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c old mode 100755 new mode 100644 index 4d92878ce3ca..f008318c5c4d --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -1063,7 +1062,7 @@ static void mmc_sd_detect(struct mmc_host *host) BUG_ON(!host); BUG_ON(!host->card); - mmc_get_card(host->card); + mmc_claim_host(host); /* * Just check if our card has been removed. @@ -1086,7 +1085,7 @@ static void mmc_sd_detect(struct mmc_host *host) err = _mmc_detect_card_removed(host); #endif - mmc_put_card(host->card); + mmc_release_host(host); if (err) { mmc_sd_remove(host); diff --git a/drivers/mmc/host/rk_sdmmc_of.c b/drivers/mmc/host/rk_sdmmc_of.c index 014641f5d6ad..0ea94619742b 100755 --- a/drivers/mmc/host/rk_sdmmc_of.c +++ b/drivers/mmc/host/rk_sdmmc_of.c @@ -15,7 +15,7 @@ printk("%d..%s: =====test====\n", __LINE__, __FUNCTION__); mmc_debug(MMC_DBG_BOOT,"mmc,dma_ch: %d\n",rk_mmc_property->mmc_dma_chn); mmc_debug(MMC_DBG_BOOT,"=========rockchip mmc dts dump info end================\n"); */ - printk("=========rockchip mmc dts dump info start. 2014-02-27 V1.0==============\n"); + printk("=========rockchip mmc dts dump info start==============\n"); printk("mmc,caps: 0x%x\n",rk_mmc_property->mmc_caps); printk("mmc,ocr: 0x%x\n",rk_mmc_property->mmc_ocr); printk("mmc,int: 0x%x\n",rk_mmc_property->mmc_int_type); diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h old mode 100755 new mode 100644 index 6a5c754daa44..f31725ba49f3 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -512,7 +512,6 @@ struct mmc_driver { void (*remove)(struct mmc_card *); int (*suspend)(struct mmc_card *); int (*resume)(struct mmc_card *); - void (*shutdown)(struct mmc_card *); }; extern int mmc_register_driver(struct mmc_driver *); diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h old mode 100755 new mode 100644 index 02f22d1eef7a..39613b9a6fc5 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -96,8 +96,6 @@ struct mmc_command { */ unsigned int cmd_timeout_ms; /* in milliseconds */ - /* Set this flag only for blocking sanitize request */ - bool sanitize_busy; struct mmc_data *data; /* data segment associated with cmd */ struct mmc_request *mrq; /* associated request */ @@ -189,8 +187,6 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int); extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); extern void mmc_release_host(struct mmc_host *host); extern int mmc_try_claim_host(struct mmc_host *host); -extern void mmc_get_card(struct mmc_card *card); -extern void mmc_put_card(struct mmc_card *card); extern int mmc_flush_cache(struct mmc_card *); diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h old mode 100755 new mode 100644 index 6ce7d2cd3c7a..198f0fa44e9f --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h @@ -15,7 +15,6 @@ #define LINUX_MMC_DW_MMC_H #include -#include #define MAX_MCI_SLOTS 2 @@ -130,9 +129,6 @@ struct dw_mci { struct mmc_request *mrq; struct mmc_command *cmd; struct mmc_data *data; - struct mmc_command stop_abort; - unsigned int prev_blksz; - unsigned char timing; struct workqueue_struct *card_workqueue; /* DMA interface members*/ diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index faefc9e1eb36..4b8771b78839 100755 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -196,6 +196,10 @@ struct mmc_supply { struct regulator *vqmmc; /* Optional Vccq supply */ }; +#define HOST_IS_EMMC(host) (host->unused) +#define SDMMC_SUPPORT_EMMC(host) (host->rk_sdmmc_emmc_used) + + struct mmc_host { struct device *parent; struct device class_dev; @@ -282,7 +286,6 @@ struct mmc_host { #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ MMC_CAP2_PACKED_WR) #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ -#define MMC_CAP2_SANITIZE (1 << 15) /* Support Sanitize */ mmc_pm_flag_t pm_caps; /* supported pm features */ diff --git a/include/linux/mmc/slot-gpio.h b/include/linux/mmc/slot-gpio.h old mode 100755 new mode 100644