mmc: dw_mmc: add support for eMMC Power Off Notify feature
authorJaehoon Chung <jh80.chung@samsung.com>
Fri, 13 Jan 2012 08:31:32 +0000 (17:31 +0900)
committerChris Ball <cjb@laptop.org>
Sun, 25 Mar 2012 23:33:44 +0000 (19:33 -0400)
This patch adds the capability of power off notify for dw-mmc controller.
In order to use Girish's patch:
mmc: core: Add Power Off Notify Feature eMMC 4.5

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/dw_mmc.c

index 8bec1c36b159159593bcad0263f0bca2787d4b92..1dfcdef452b9817ca1b3ced14687b9401175b8b5 100644 (file)
@@ -1720,6 +1720,11 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
        if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
                mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
+       if (mmc->caps2 & MMC_CAP2_POWEROFF_NOTIFY)
+               mmc->power_notify_type = MMC_HOST_PW_NOTIFY_SHORT;
+       else
+               mmc->power_notify_type = MMC_HOST_PW_NOTIFY_NONE;
+
 #ifdef CONFIG_MMC_DW_IDMAC
        mmc->max_segs = host->ring_size;
        mmc->max_blk_size = 65536;