Commit 11da3764 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: vub300: fix type of firmware_rom_wait_states module parameter
  Revert "mmc: enable runtime PM by default"
  mmc: sdhci: remove "state" argument from sdhci_suspend_host
parents 50345f1e 61074287
...@@ -302,17 +302,6 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) ...@@ -302,17 +302,6 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
host->max_blk_size = 512; host->max_blk_size = 512;
host->max_blk_count = PAGE_CACHE_SIZE / 512; host->max_blk_count = PAGE_CACHE_SIZE / 512;
/*
* Enable runtime power management by default. This flag was added due
* to runtime power management causing disruption for some users, but
* the power on/off code has been improved since then.
*
* We'll enable this flag by default as an experiment, and if no
* problems are reported, we will follow up later and remove the flag
* altogether.
*/
host->caps = MMC_CAP_POWER_OFF_CARD;
return host; return host;
free: free:
......
...@@ -109,13 +109,10 @@ static struct platform_driver sdhci_cns3xxx_driver = { ...@@ -109,13 +109,10 @@ static struct platform_driver sdhci_cns3xxx_driver = {
.driver = { .driver = {
.name = "sdhci-cns3xxx", .name = "sdhci-cns3xxx",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
}, },
.probe = sdhci_cns3xxx_probe, .probe = sdhci_cns3xxx_probe,
.remove = __devexit_p(sdhci_cns3xxx_remove), .remove = __devexit_p(sdhci_cns3xxx_remove),
#ifdef CONFIG_PM
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
#endif
}; };
static int __init sdhci_cns3xxx_init(void) static int __init sdhci_cns3xxx_init(void)
......
...@@ -82,13 +82,10 @@ static struct platform_driver sdhci_dove_driver = { ...@@ -82,13 +82,10 @@ static struct platform_driver sdhci_dove_driver = {
.driver = { .driver = {
.name = "sdhci-dove", .name = "sdhci-dove",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
}, },
.probe = sdhci_dove_probe, .probe = sdhci_dove_probe,
.remove = __devexit_p(sdhci_dove_remove), .remove = __devexit_p(sdhci_dove_remove),
#ifdef CONFIG_PM
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
#endif
}; };
static int __init sdhci_dove_init(void) static int __init sdhci_dove_init(void)
......
...@@ -599,14 +599,11 @@ static struct platform_driver sdhci_esdhc_imx_driver = { ...@@ -599,14 +599,11 @@ static struct platform_driver sdhci_esdhc_imx_driver = {
.name = "sdhci-esdhc-imx", .name = "sdhci-esdhc-imx",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = imx_esdhc_dt_ids, .of_match_table = imx_esdhc_dt_ids,
.pm = SDHCI_PLTFM_PMOPS,
}, },
.id_table = imx_esdhc_devtype, .id_table = imx_esdhc_devtype,
.probe = sdhci_esdhc_imx_probe, .probe = sdhci_esdhc_imx_probe,
.remove = __devexit_p(sdhci_esdhc_imx_remove), .remove = __devexit_p(sdhci_esdhc_imx_remove),
#ifdef CONFIG_PM
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
#endif
}; };
static int __init sdhci_esdhc_imx_init(void) static int __init sdhci_esdhc_imx_init(void)
......
...@@ -125,13 +125,10 @@ static struct platform_driver sdhci_esdhc_driver = { ...@@ -125,13 +125,10 @@ static struct platform_driver sdhci_esdhc_driver = {
.name = "sdhci-esdhc", .name = "sdhci-esdhc",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = sdhci_esdhc_of_match, .of_match_table = sdhci_esdhc_of_match,
.pm = SDHCI_PLTFM_PMOPS,
}, },
.probe = sdhci_esdhc_probe, .probe = sdhci_esdhc_probe,
.remove = __devexit_p(sdhci_esdhc_remove), .remove = __devexit_p(sdhci_esdhc_remove),
#ifdef CONFIG_PM
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
#endif
}; };
static int __init sdhci_esdhc_init(void) static int __init sdhci_esdhc_init(void)
......
...@@ -87,13 +87,10 @@ static struct platform_driver sdhci_hlwd_driver = { ...@@ -87,13 +87,10 @@ static struct platform_driver sdhci_hlwd_driver = {
.name = "sdhci-hlwd", .name = "sdhci-hlwd",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = sdhci_hlwd_of_match, .of_match_table = sdhci_hlwd_of_match,
.pm = SDHCI_PLTFM_PMOPS,
}, },
.probe = sdhci_hlwd_probe, .probe = sdhci_hlwd_probe,
.remove = __devexit_p(sdhci_hlwd_remove), .remove = __devexit_p(sdhci_hlwd_remove),
#ifdef CONFIG_PM
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
#endif
}; };
static int __init sdhci_hlwd_init(void) static int __init sdhci_hlwd_init(void)
......
...@@ -54,8 +54,7 @@ struct sdhci_pci_fixes { ...@@ -54,8 +54,7 @@ struct sdhci_pci_fixes {
int (*probe_slot) (struct sdhci_pci_slot *); int (*probe_slot) (struct sdhci_pci_slot *);
void (*remove_slot) (struct sdhci_pci_slot *, int); void (*remove_slot) (struct sdhci_pci_slot *, int);
int (*suspend) (struct sdhci_pci_chip *, int (*suspend) (struct sdhci_pci_chip *);
pm_message_t);
int (*resume) (struct sdhci_pci_chip *); int (*resume) (struct sdhci_pci_chip *);
}; };
...@@ -549,7 +548,7 @@ static void jmicron_remove_slot(struct sdhci_pci_slot *slot, int dead) ...@@ -549,7 +548,7 @@ static void jmicron_remove_slot(struct sdhci_pci_slot *slot, int dead)
jmicron_enable_mmc(slot->host, 0); jmicron_enable_mmc(slot->host, 0);
} }
static int jmicron_suspend(struct sdhci_pci_chip *chip, pm_message_t state) static int jmicron_suspend(struct sdhci_pci_chip *chip)
{ {
int i; int i;
...@@ -993,8 +992,9 @@ static struct sdhci_ops sdhci_pci_ops = { ...@@ -993,8 +992,9 @@ static struct sdhci_ops sdhci_pci_ops = {
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) static int sdhci_pci_suspend(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev);
struct sdhci_pci_chip *chip; struct sdhci_pci_chip *chip;
struct sdhci_pci_slot *slot; struct sdhci_pci_slot *slot;
mmc_pm_flag_t slot_pm_flags; mmc_pm_flag_t slot_pm_flags;
...@@ -1010,7 +1010,7 @@ static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -1010,7 +1010,7 @@ static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state)
if (!slot) if (!slot)
continue; continue;
ret = sdhci_suspend_host(slot->host, state); ret = sdhci_suspend_host(slot->host);
if (ret) { if (ret) {
for (i--; i >= 0; i--) for (i--; i >= 0; i--)
...@@ -1026,7 +1026,7 @@ static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -1026,7 +1026,7 @@ static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state)
} }
if (chip->fixes && chip->fixes->suspend) { if (chip->fixes && chip->fixes->suspend) {
ret = chip->fixes->suspend(chip, state); ret = chip->fixes->suspend(chip);
if (ret) { if (ret) {
for (i = chip->num_slots - 1; i >= 0; i--) for (i = chip->num_slots - 1; i >= 0; i--)
sdhci_resume_host(chip->slots[i]->host); sdhci_resume_host(chip->slots[i]->host);
...@@ -1042,16 +1042,17 @@ static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -1042,16 +1042,17 @@ static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state)
} }
pci_set_power_state(pdev, PCI_D3hot); pci_set_power_state(pdev, PCI_D3hot);
} else { } else {
pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); pci_enable_wake(pdev, PCI_D3hot, 0);
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state)); pci_set_power_state(pdev, PCI_D3hot);
} }
return 0; return 0;
} }
static int sdhci_pci_resume(struct pci_dev *pdev) static int sdhci_pci_resume(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev);
struct sdhci_pci_chip *chip; struct sdhci_pci_chip *chip;
struct sdhci_pci_slot *slot; struct sdhci_pci_slot *slot;
int i, ret; int i, ret;
...@@ -1099,7 +1100,6 @@ static int sdhci_pci_runtime_suspend(struct device *dev) ...@@ -1099,7 +1100,6 @@ static int sdhci_pci_runtime_suspend(struct device *dev)
struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
struct sdhci_pci_chip *chip; struct sdhci_pci_chip *chip;
struct sdhci_pci_slot *slot; struct sdhci_pci_slot *slot;
pm_message_t state = { .event = PM_EVENT_SUSPEND };
int i, ret; int i, ret;
chip = pci_get_drvdata(pdev); chip = pci_get_drvdata(pdev);
...@@ -1121,7 +1121,7 @@ static int sdhci_pci_runtime_suspend(struct device *dev) ...@@ -1121,7 +1121,7 @@ static int sdhci_pci_runtime_suspend(struct device *dev)
} }
if (chip->fixes && chip->fixes->suspend) { if (chip->fixes && chip->fixes->suspend) {
ret = chip->fixes->suspend(chip, state); ret = chip->fixes->suspend(chip);
if (ret) { if (ret) {
for (i = chip->num_slots - 1; i >= 0; i--) for (i = chip->num_slots - 1; i >= 0; i--)
sdhci_runtime_resume_host(chip->slots[i]->host); sdhci_runtime_resume_host(chip->slots[i]->host);
...@@ -1176,6 +1176,8 @@ static int sdhci_pci_runtime_idle(struct device *dev) ...@@ -1176,6 +1176,8 @@ static int sdhci_pci_runtime_idle(struct device *dev)
#endif #endif
static const struct dev_pm_ops sdhci_pci_pm_ops = { static const struct dev_pm_ops sdhci_pci_pm_ops = {
.suspend = sdhci_pci_suspend,
.resume = sdhci_pci_resume,
.runtime_suspend = sdhci_pci_runtime_suspend, .runtime_suspend = sdhci_pci_runtime_suspend,
.runtime_resume = sdhci_pci_runtime_resume, .runtime_resume = sdhci_pci_runtime_resume,
.runtime_idle = sdhci_pci_runtime_idle, .runtime_idle = sdhci_pci_runtime_idle,
...@@ -1428,8 +1430,6 @@ static struct pci_driver sdhci_driver = { ...@@ -1428,8 +1430,6 @@ static struct pci_driver sdhci_driver = {
.id_table = pci_ids, .id_table = pci_ids,
.probe = sdhci_pci_probe, .probe = sdhci_pci_probe,
.remove = __devexit_p(sdhci_pci_remove), .remove = __devexit_p(sdhci_pci_remove),
.suspend = sdhci_pci_suspend,
.resume = sdhci_pci_resume,
.driver = { .driver = {
.pm = &sdhci_pci_pm_ops .pm = &sdhci_pci_pm_ops
}, },
......
...@@ -194,21 +194,25 @@ int sdhci_pltfm_unregister(struct platform_device *pdev) ...@@ -194,21 +194,25 @@ int sdhci_pltfm_unregister(struct platform_device *pdev)
EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister);
#ifdef CONFIG_PM #ifdef CONFIG_PM
int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state) static int sdhci_pltfm_suspend(struct device *dev)
{ {
struct sdhci_host *host = platform_get_drvdata(dev); struct sdhci_host *host = dev_get_drvdata(dev);
return sdhci_suspend_host(host, state); return sdhci_suspend_host(host);
} }
EXPORT_SYMBOL_GPL(sdhci_pltfm_suspend);
int sdhci_pltfm_resume(struct platform_device *dev) static int sdhci_pltfm_resume(struct device *dev)
{ {
struct sdhci_host *host = platform_get_drvdata(dev); struct sdhci_host *host = dev_get_drvdata(dev);
return sdhci_resume_host(host); return sdhci_resume_host(host);
} }
EXPORT_SYMBOL_GPL(sdhci_pltfm_resume);
const struct dev_pm_ops sdhci_pltfm_pmops = {
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
};
EXPORT_SYMBOL_GPL(sdhci_pltfm_pmops);
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static int __init sdhci_pltfm_drv_init(void) static int __init sdhci_pltfm_drv_init(void)
......
...@@ -99,8 +99,10 @@ extern int sdhci_pltfm_register(struct platform_device *pdev, ...@@ -99,8 +99,10 @@ extern int sdhci_pltfm_register(struct platform_device *pdev,
extern int sdhci_pltfm_unregister(struct platform_device *pdev); extern int sdhci_pltfm_unregister(struct platform_device *pdev);
#ifdef CONFIG_PM #ifdef CONFIG_PM
extern int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state); extern const struct dev_pm_ops sdhci_pltfm_pmops;
extern int sdhci_pltfm_resume(struct platform_device *dev); #define SDHCI_PLTFM_PMOPS (&sdhci_pltfm_pmops)
#else
#define SDHCI_PLTFM_PMOPS NULL
#endif #endif
#endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */ #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */
...@@ -218,13 +218,10 @@ static struct platform_driver sdhci_pxav2_driver = { ...@@ -218,13 +218,10 @@ static struct platform_driver sdhci_pxav2_driver = {
.driver = { .driver = {
.name = "sdhci-pxav2", .name = "sdhci-pxav2",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
}, },
.probe = sdhci_pxav2_probe, .probe = sdhci_pxav2_probe,
.remove = __devexit_p(sdhci_pxav2_remove), .remove = __devexit_p(sdhci_pxav2_remove),
#ifdef CONFIG_PM
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
#endif
}; };
static int __init sdhci_pxav2_init(void) static int __init sdhci_pxav2_init(void)
{ {
......
...@@ -264,13 +264,10 @@ static struct platform_driver sdhci_pxav3_driver = { ...@@ -264,13 +264,10 @@ static struct platform_driver sdhci_pxav3_driver = {
.driver = { .driver = {
.name = "sdhci-pxav3", .name = "sdhci-pxav3",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = SDHCI_PLTFM_PMOPS,
}, },
.probe = sdhci_pxav3_probe, .probe = sdhci_pxav3_probe,
.remove = __devexit_p(sdhci_pxav3_remove), .remove = __devexit_p(sdhci_pxav3_remove),
#ifdef CONFIG_PM
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
#endif
}; };
static int __init sdhci_pxav3_init(void) static int __init sdhci_pxav3_init(void)
{ {
......
...@@ -622,23 +622,29 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) ...@@ -622,23 +622,29 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sdhci_s3c_suspend(struct platform_device *dev, pm_message_t pm) static int sdhci_s3c_suspend(struct device *dev)
{ {
struct sdhci_host *host = platform_get_drvdata(dev); struct sdhci_host *host = dev_get_drvdata(dev);
return sdhci_suspend_host(host, pm); return sdhci_suspend_host(host);
} }
static int sdhci_s3c_resume(struct platform_device *dev) static int sdhci_s3c_resume(struct device *dev)
{ {
struct sdhci_host *host = platform_get_drvdata(dev); struct sdhci_host *host = dev_get_drvdata(dev);
return sdhci_resume_host(host); return sdhci_resume_host(host);
} }
static const struct dev_pm_ops sdhci_s3c_pmops = {
.suspend = sdhci_s3c_suspend,
.resume = sdhci_s3c_resume,
};
#define SDHCI_S3C_PMOPS (&sdhci_s3c_pmops)
#else #else
#define sdhci_s3c_suspend NULL #define SDHCI_S3C_PMOPS NULL
#define sdhci_s3c_resume NULL
#endif #endif
static struct platform_driver sdhci_s3c_driver = { static struct platform_driver sdhci_s3c_driver = {
...@@ -647,6 +653,7 @@ static struct platform_driver sdhci_s3c_driver = { ...@@ -647,6 +653,7 @@ static struct platform_driver sdhci_s3c_driver = {
.driver = { .driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "s3c-sdhci", .name = "s3c-sdhci",
.pm = SDHCI_S3C_PMOPS,
}, },
}; };
......
...@@ -318,13 +318,10 @@ static struct platform_driver sdhci_tegra_driver = { ...@@ -318,13 +318,10 @@ static struct platform_driver sdhci_tegra_driver = {
.name = "sdhci-tegra", .name = "sdhci-tegra",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = sdhci_tegra_dt_match, .of_match_table = sdhci_tegra_dt_match,
.pm = SDHCI_PLTFM_PMOPS,
}, },
.probe = sdhci_tegra_probe, .probe = sdhci_tegra_probe,
.remove = __devexit_p(sdhci_tegra_remove), .remove = __devexit_p(sdhci_tegra_remove),
#ifdef CONFIG_PM
.suspend = sdhci_pltfm_suspend,
.resume = sdhci_pltfm_resume,
#endif
}; };
static int __init sdhci_tegra_init(void) static int __init sdhci_tegra_init(void)
......
...@@ -2327,7 +2327,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) ...@@ -2327,7 +2327,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
#ifdef CONFIG_PM #ifdef CONFIG_PM
int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state) int sdhci_suspend_host(struct sdhci_host *host)
{ {
int ret; int ret;
......
...@@ -374,7 +374,7 @@ extern int sdhci_add_host(struct sdhci_host *host); ...@@ -374,7 +374,7 @@ extern int sdhci_add_host(struct sdhci_host *host);
extern void sdhci_remove_host(struct sdhci_host *host, int dead); extern void sdhci_remove_host(struct sdhci_host *host, int dead);
#ifdef CONFIG_PM #ifdef CONFIG_PM
extern int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state); extern int sdhci_suspend_host(struct sdhci_host *host);
extern int sdhci_resume_host(struct sdhci_host *host); extern int sdhci_resume_host(struct sdhci_host *host);
extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); extern void sdhci_enable_irq_wakeups(struct sdhci_host *host);
#endif #endif
......
...@@ -259,7 +259,7 @@ static int firmware_rom_wait_states = 0x04; ...@@ -259,7 +259,7 @@ static int firmware_rom_wait_states = 0x04;
static int firmware_rom_wait_states = 0x1C; static int firmware_rom_wait_states = 0x1C;
#endif #endif
module_param(firmware_rom_wait_states, bool, 0644); module_param(firmware_rom_wait_states, int, 0644);
MODULE_PARM_DESC(firmware_rom_wait_states, MODULE_PARM_DESC(firmware_rom_wait_states,
"ROM wait states byte=RRRIIEEE (Reserved Internal External)"); "ROM wait states byte=RRRIIEEE (Reserved Internal External)");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment