diff options
Diffstat (limited to 'drivers/mmc/host/sdhci-cns3xxx.c')
-rw-r--r-- | drivers/mmc/host/sdhci-cns3xxx.c | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci-cns3xxx.c b/drivers/mmc/host/sdhci-cns3xxx.c index 9ebd1d7759dc..4b920b7621cf 100644 --- a/drivers/mmc/host/sdhci-cns3xxx.c +++ b/drivers/mmc/host/sdhci-cns3xxx.c | |||
@@ -15,9 +15,7 @@ | |||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/mmc/host.h> | 17 | #include <linux/mmc/host.h> |
18 | #include <linux/mmc/sdhci-pltfm.h> | ||
19 | #include <mach/cns3xxx.h> | 18 | #include <mach/cns3xxx.h> |
20 | #include "sdhci.h" | ||
21 | #include "sdhci-pltfm.h" | 19 | #include "sdhci-pltfm.h" |
22 | 20 | ||
23 | static unsigned int sdhci_cns3xxx_get_max_clk(struct sdhci_host *host) | 21 | static unsigned int sdhci_cns3xxx_get_max_clk(struct sdhci_host *host) |
@@ -86,7 +84,7 @@ static struct sdhci_ops sdhci_cns3xxx_ops = { | |||
86 | .set_clock = sdhci_cns3xxx_set_clock, | 84 | .set_clock = sdhci_cns3xxx_set_clock, |
87 | }; | 85 | }; |
88 | 86 | ||
89 | struct sdhci_pltfm_data sdhci_cns3xxx_pdata = { | 87 | static struct sdhci_pltfm_data sdhci_cns3xxx_pdata = { |
90 | .ops = &sdhci_cns3xxx_ops, | 88 | .ops = &sdhci_cns3xxx_ops, |
91 | .quirks = SDHCI_QUIRK_BROKEN_DMA | | 89 | .quirks = SDHCI_QUIRK_BROKEN_DMA | |
92 | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | | 90 | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | |
@@ -95,3 +93,43 @@ struct sdhci_pltfm_data sdhci_cns3xxx_pdata = { | |||
95 | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | | 93 | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | |
96 | SDHCI_QUIRK_NONSTANDARD_CLOCK, | 94 | SDHCI_QUIRK_NONSTANDARD_CLOCK, |
97 | }; | 95 | }; |
96 | |||
97 | static int __devinit sdhci_cns3xxx_probe(struct platform_device *pdev) | ||
98 | { | ||
99 | return sdhci_pltfm_register(pdev, &sdhci_cns3xxx_pdata); | ||
100 | } | ||
101 | |||
102 | static int __devexit sdhci_cns3xxx_remove(struct platform_device *pdev) | ||
103 | { | ||
104 | return sdhci_pltfm_unregister(pdev); | ||
105 | } | ||
106 | |||
107 | static struct platform_driver sdhci_cns3xxx_driver = { | ||
108 | .driver = { | ||
109 | .name = "sdhci-cns3xxx", | ||
110 | .owner = THIS_MODULE, | ||
111 | }, | ||
112 | .probe = sdhci_cns3xxx_probe, | ||
113 | .remove = __devexit_p(sdhci_cns3xxx_remove), | ||
114 | #ifdef CONFIG_PM | ||
115 | .suspend = sdhci_pltfm_suspend, | ||
116 | .resume = sdhci_pltfm_resume, | ||
117 | #endif | ||
118 | }; | ||
119 | |||
120 | static int __init sdhci_cns3xxx_init(void) | ||
121 | { | ||
122 | return platform_driver_register(&sdhci_cns3xxx_driver); | ||
123 | } | ||
124 | module_init(sdhci_cns3xxx_init); | ||
125 | |||
126 | static void __exit sdhci_cns3xxx_exit(void) | ||
127 | { | ||
128 | platform_driver_unregister(&sdhci_cns3xxx_driver); | ||
129 | } | ||
130 | module_exit(sdhci_cns3xxx_exit); | ||
131 | |||
132 | MODULE_DESCRIPTION("SDHCI driver for CNS3xxx"); | ||
133 | MODULE_AUTHOR("Scott Shu, " | ||
134 | "Anton Vorontsov <avorontsov@mvista.com>"); | ||
135 | MODULE_LICENSE("GPL v2"); | ||