.name = "dwmmc_bluefield",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
.of_match_table = dw_mci_bluefield_match,
- .pm = &dw_mci_pltfm_pmops,
+ .pm = pm_ptr(&dw_mci_pltfm_pmops),
},
};
return dw_mci_pltfm_register(pdev, drv_data);
}
-static const struct dev_pm_ops dw_mci_k3_dev_pm_ops = {
- SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
- RUNTIME_PM_OPS(dw_mci_runtime_suspend, dw_mci_runtime_resume, NULL)
-};
-
static struct platform_driver dw_mci_k3_pltfm_driver = {
.probe = dw_mci_k3_probe,
.remove = dw_mci_pltfm_remove,
.name = "dwmmc_k3",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
.of_match_table = dw_mci_k3_match,
- .pm = pm_ptr(&dw_mci_k3_dev_pm_ops),
+ .pm = pm_ptr(&dw_mci_pltfm_pmops),
},
};
#include <linux/mmc/host.h>
#include <linux/mmc/mmc.h>
#include "dw_mmc.h"
+#include "dw_mmc-pltfm.h"
#define SYNOPSYS_DW_MCI_VENDOR_ID 0x700
#define SYNOPSYS_DW_MCI_DEVICE_ID 0x1107
dw_mci_remove(host);
}
-static const struct dev_pm_ops dw_mci_pci_dev_pm_ops = {
- SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
- RUNTIME_PM_OPS(dw_mci_runtime_suspend, dw_mci_runtime_resume, NULL)
-};
-
static const struct pci_device_id dw_mci_pci_id[] = {
{ PCI_DEVICE(SYNOPSYS_DW_MCI_VENDOR_ID, SYNOPSYS_DW_MCI_DEVICE_ID) },
{}
.probe = dw_mci_pci_probe,
.remove = dw_mci_pci_remove,
.driver = {
- .pm = pm_ptr(&dw_mci_pci_dev_pm_ops),
+ .pm = pm_ptr(&dw_mci_pltfm_pmops),
},
};
EXPORT_SYMBOL_GPL(dw_mci_pltfm_register);
const struct dev_pm_ops dw_mci_pltfm_pmops = {
- SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
pm_runtime_force_resume)
- SET_RUNTIME_PM_OPS(dw_mci_runtime_suspend,
+ RUNTIME_PM_OPS(dw_mci_runtime_suspend,
dw_mci_runtime_resume,
NULL)
};
}
EXPORT_SYMBOL(dw_mci_remove);
-#ifdef CONFIG_PM
int dw_mci_runtime_suspend(struct device *dev)
{
struct dw_mci *host = dev_get_drvdata(dev);
return ret;
}
EXPORT_SYMBOL(dw_mci_runtime_resume);
-#endif /* CONFIG_PM */
static int __init dw_mci_init(void)
{
extern struct dw_mci *dw_mci_alloc_host(struct device *device);
extern int dw_mci_probe(struct dw_mci *host);
extern void dw_mci_remove(struct dw_mci *host);
-#ifdef CONFIG_PM
extern int dw_mci_runtime_suspend(struct device *device);
extern int dw_mci_runtime_resume(struct device *device);
-#else
-static inline int dw_mci_runtime_suspend(struct device *device) { return -EOPNOTSUPP; }
-static inline int dw_mci_runtime_resume(struct device *device) { return -EOPNOTSUPP; }
-#endif
/**
* dw_mci driver data - dw-mshc implementation specific driver data.