From: lintao Date: Tue, 1 Apr 2014 10:26:37 +0000 (+0800) Subject: mmc: host: unrange init delaywork condition X-Git-Tag: firefly_0821_release~5661 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=28e678a835069368a4f65b2d5bf1256f8bae38b7;p=firefly-linux-kernel-4.4.55.git mmc: host: unrange init delaywork condition --- diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index 41955d5991a0..1797997c3656 100755 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -299,6 +299,7 @@ MODULE_DEVICE_TABLE(of, dw_mci_rockchip_match); extern void rockchip_mmc_of_probe(struct device_node *np,struct rk_sdmmc_of *mmc_property); #endif +#ifdef MMC_QUIRK_INIT_IMPROVE static struct platform_device *sdmmc_pdev; static struct dw_mci_drv_data *sdmmc_drv_data; static struct platform_device *sdio_pdev; @@ -312,6 +313,7 @@ static void dw_mci_sdio_delayed_work(struct work_struct *work) { dw_mci_pltfm_register(sdio_pdev, sdio_drv_data); } +#endif static int dw_mci_rockchip_probe(struct platform_device *pdev) @@ -338,7 +340,8 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev) match = of_match_node(dw_mci_rockchip_match, pdev->dev.of_node); drv_data = match->data; - + +#ifdef MMC_QUIRK_INIT_IMPROVE if(strcmp(pdev->dev.of_node->type,"sdmmc") == 0){ sdmmc_pdev = pdev; sdmmc_drv_data = drv_data; @@ -349,10 +352,10 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev) sdio_drv_data = drv_data; INIT_DELAYED_WORK(&drv_data->dw_mci_sdio_delayed_work, dw_mci_sdio_delayed_work); return schedule_delayed_work(&drv_data->dw_mci_sdio_delayed_work, msecs_to_jiffies(50)); - }else{ + }else +#endif /*eMMC*/ return dw_mci_pltfm_register(pdev, drv_data); - } } static struct platform_driver dw_mci_rockchip_pltfm_driver = { diff --git a/drivers/mmc/host/rk_sdmmc.h b/drivers/mmc/host/rk_sdmmc.h index f06dcb5c140b..9d5bdb92bd77 100755 --- a/drivers/mmc/host/rk_sdmmc.h +++ b/drivers/mmc/host/rk_sdmmc.h @@ -15,6 +15,7 @@ #ifndef _DW_MMC_H_ #define _DW_MMC_H_ +#include "rk_sdmmc_of.h" #define DW_MMC_240A 0x240a @@ -321,8 +322,10 @@ struct dw_mci_tuning_data { struct dw_mci_drv_data { unsigned long *caps; unsigned int *hold_reg_flag; + #ifdef MMC_QUIRK_INIT_IMPROVE struct delayed_work dw_mci_sdmmc_delayed_work; struct delayed_work dw_mci_sdio_delayed_work; + #endif int (*init)(struct dw_mci *host); int (*setup_clock)(struct dw_mci *host); void (*prepare_command)(struct dw_mci *host, u32 *cmdr); diff --git a/drivers/mmc/host/rk_sdmmc_of.h b/drivers/mmc/host/rk_sdmmc_of.h index 168ca56eaa0e..2ed7095bdab9 100755 --- a/drivers/mmc/host/rk_sdmmc_of.h +++ b/drivers/mmc/host/rk_sdmmc_of.h @@ -23,6 +23,11 @@ #define DRIVER_VER "Dw-mci-rockchip" #define DW_MMC_OF_PROBE 0 +#ifdef CONFIG_AP6335 +#define MMC_QUIRK_INIT_IMPROVE +#endif + + enum MMC_DBG_MASK{ MMC_DBG_NONE = 0, MMC_DBG_BOOT = BIT(0),