From: lintao Date: Wed, 2 Apr 2014 09:59:56 +0000 (+0800) Subject: Revert "mmc: host: unrange init delaywork condition" X-Git-Tag: firefly_0821_release~5636 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=21078dc5dda1ec1a11861491e9d6966f2ebddbe1;p=firefly-linux-kernel-4.4.55.git Revert "mmc: host: unrange init delaywork condition" This reverts commit 28e678a835069368a4f65b2d5bf1256f8bae38b7. --- diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index 1797997c3656..41955d5991a0 100755 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -299,7 +299,6 @@ 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; @@ -313,7 +312,6 @@ 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) @@ -340,8 +338,7 @@ 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; @@ -352,10 +349,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 -#endif + }else{ /*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 9d5bdb92bd77..f06dcb5c140b 100755 --- a/drivers/mmc/host/rk_sdmmc.h +++ b/drivers/mmc/host/rk_sdmmc.h @@ -15,7 +15,6 @@ #ifndef _DW_MMC_H_ #define _DW_MMC_H_ -#include "rk_sdmmc_of.h" #define DW_MMC_240A 0x240a @@ -322,10 +321,8 @@ 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 2ed7095bdab9..168ca56eaa0e 100755 --- a/drivers/mmc/host/rk_sdmmc_of.h +++ b/drivers/mmc/host/rk_sdmmc_of.h @@ -23,11 +23,6 @@ #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),