dw_mmc-exynos.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. /*
  2. * Exynos Specific Extensions for Synopsys DW Multimedia Card Interface driver
  3. *
  4. * Copyright (C) 2012, Samsung Electronics Co., Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #include <linux/module.h>
  12. #include <linux/platform_device.h>
  13. #include <linux/clk.h>
  14. #include <linux/mmc/host.h>
  15. #include <linux/mmc/mmc.h>
  16. #include <linux/of.h>
  17. #include <linux/of_gpio.h>
  18. #include <linux/pm_runtime.h>
  19. #include <linux/slab.h>
  20. #include "dw_mmc.h"
  21. #include "dw_mmc-pltfm.h"
  22. #include "dw_mmc-exynos.h"
  23. /* Variations in Exynos specific dw-mshc controller */
  24. enum dw_mci_exynos_type {
  25. DW_MCI_TYPE_EXYNOS4210,
  26. DW_MCI_TYPE_EXYNOS4412,
  27. DW_MCI_TYPE_EXYNOS5250,
  28. DW_MCI_TYPE_EXYNOS5420,
  29. DW_MCI_TYPE_EXYNOS5420_SMU,
  30. DW_MCI_TYPE_EXYNOS7,
  31. DW_MCI_TYPE_EXYNOS7_SMU,
  32. };
  33. /* Exynos implementation specific driver private data */
  34. struct dw_mci_exynos_priv_data {
  35. enum dw_mci_exynos_type ctrl_type;
  36. u8 ciu_div;
  37. u32 sdr_timing;
  38. u32 ddr_timing;
  39. u32 hs400_timing;
  40. u32 tuned_sample;
  41. u32 cur_speed;
  42. u32 dqs_delay;
  43. u32 saved_dqs_en;
  44. u32 saved_strobe_ctrl;
  45. };
  46. static struct dw_mci_exynos_compatible {
  47. char *compatible;
  48. enum dw_mci_exynos_type ctrl_type;
  49. } exynos_compat[] = {
  50. {
  51. .compatible = "samsung,exynos4210-dw-mshc",
  52. .ctrl_type = DW_MCI_TYPE_EXYNOS4210,
  53. }, {
  54. .compatible = "samsung,exynos4412-dw-mshc",
  55. .ctrl_type = DW_MCI_TYPE_EXYNOS4412,
  56. }, {
  57. .compatible = "samsung,exynos5250-dw-mshc",
  58. .ctrl_type = DW_MCI_TYPE_EXYNOS5250,
  59. }, {
  60. .compatible = "samsung,exynos5420-dw-mshc",
  61. .ctrl_type = DW_MCI_TYPE_EXYNOS5420,
  62. }, {
  63. .compatible = "samsung,exynos5420-dw-mshc-smu",
  64. .ctrl_type = DW_MCI_TYPE_EXYNOS5420_SMU,
  65. }, {
  66. .compatible = "samsung,exynos7-dw-mshc",
  67. .ctrl_type = DW_MCI_TYPE_EXYNOS7,
  68. }, {
  69. .compatible = "samsung,exynos7-dw-mshc-smu",
  70. .ctrl_type = DW_MCI_TYPE_EXYNOS7_SMU,
  71. },
  72. };
  73. static inline u8 dw_mci_exynos_get_ciu_div(struct dw_mci *host)
  74. {
  75. struct dw_mci_exynos_priv_data *priv = host->priv;
  76. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS4412)
  77. return EXYNOS4412_FIXED_CIU_CLK_DIV;
  78. else if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS4210)
  79. return EXYNOS4210_FIXED_CIU_CLK_DIV;
  80. else if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  81. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  82. return SDMMC_CLKSEL_GET_DIV(mci_readl(host, CLKSEL64)) + 1;
  83. else
  84. return SDMMC_CLKSEL_GET_DIV(mci_readl(host, CLKSEL)) + 1;
  85. }
  86. static void dw_mci_exynos_config_smu(struct dw_mci *host)
  87. {
  88. struct dw_mci_exynos_priv_data *priv = host->priv;
  89. /*
  90. * If Exynos is provided the Security management,
  91. * set for non-ecryption mode at this time.
  92. */
  93. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS5420_SMU ||
  94. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU) {
  95. mci_writel(host, MPSBEGIN0, 0);
  96. mci_writel(host, MPSEND0, SDMMC_ENDING_SEC_NR_MAX);
  97. mci_writel(host, MPSCTRL0, SDMMC_MPSCTRL_SECURE_WRITE_BIT |
  98. SDMMC_MPSCTRL_NON_SECURE_READ_BIT |
  99. SDMMC_MPSCTRL_VALID |
  100. SDMMC_MPSCTRL_NON_SECURE_WRITE_BIT);
  101. }
  102. }
  103. static int dw_mci_exynos_priv_init(struct dw_mci *host)
  104. {
  105. struct dw_mci_exynos_priv_data *priv = host->priv;
  106. dw_mci_exynos_config_smu(host);
  107. if (priv->ctrl_type >= DW_MCI_TYPE_EXYNOS5420) {
  108. priv->saved_strobe_ctrl = mci_readl(host, HS400_DLINE_CTRL);
  109. priv->saved_dqs_en = mci_readl(host, HS400_DQS_EN);
  110. priv->saved_dqs_en |= AXI_NON_BLOCKING_WR;
  111. mci_writel(host, HS400_DQS_EN, priv->saved_dqs_en);
  112. if (!priv->dqs_delay)
  113. priv->dqs_delay =
  114. DQS_CTRL_GET_RD_DELAY(priv->saved_strobe_ctrl);
  115. }
  116. host->bus_hz /= (priv->ciu_div + 1);
  117. return 0;
  118. }
  119. static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing)
  120. {
  121. struct dw_mci_exynos_priv_data *priv = host->priv;
  122. u32 clksel;
  123. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  124. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  125. clksel = mci_readl(host, CLKSEL64);
  126. else
  127. clksel = mci_readl(host, CLKSEL);
  128. clksel = (clksel & ~SDMMC_CLKSEL_TIMING_MASK) | timing;
  129. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  130. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  131. mci_writel(host, CLKSEL64, clksel);
  132. else
  133. mci_writel(host, CLKSEL, clksel);
  134. /*
  135. * Exynos4412 and Exynos5250 extends the use of CMD register with the
  136. * use of bit 29 (which is reserved on standard MSHC controllers) for
  137. * optionally bypassing the HOLD register for command and data. The
  138. * HOLD register should be bypassed in case there is no phase shift
  139. * applied on CMD/DATA that is sent to the card.
  140. */
  141. if (!SDMMC_CLKSEL_GET_DRV_WD3(clksel) && host->slot)
  142. set_bit(DW_MMC_CARD_NO_USE_HOLD, &host->slot->flags);
  143. }
  144. #ifdef CONFIG_PM
  145. static int dw_mci_exynos_runtime_resume(struct device *dev)
  146. {
  147. struct dw_mci *host = dev_get_drvdata(dev);
  148. int ret;
  149. ret = dw_mci_runtime_resume(dev);
  150. if (ret)
  151. return ret;
  152. dw_mci_exynos_config_smu(host);
  153. return ret;
  154. }
  155. /**
  156. * dw_mci_exynos_resume_noirq - Exynos-specific resume code
  157. *
  158. * On exynos5420 there is a silicon errata that will sometimes leave the
  159. * WAKEUP_INT bit in the CLKSEL register asserted. This bit is 1 to indicate
  160. * that it fired and we can clear it by writing a 1 back. Clear it to prevent
  161. * interrupts from going off constantly.
  162. *
  163. * We run this code on all exynos variants because it doesn't hurt.
  164. */
  165. static int dw_mci_exynos_resume_noirq(struct device *dev)
  166. {
  167. struct dw_mci *host = dev_get_drvdata(dev);
  168. struct dw_mci_exynos_priv_data *priv = host->priv;
  169. u32 clksel;
  170. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  171. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  172. clksel = mci_readl(host, CLKSEL64);
  173. else
  174. clksel = mci_readl(host, CLKSEL);
  175. if (clksel & SDMMC_CLKSEL_WAKEUP_INT) {
  176. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  177. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  178. mci_writel(host, CLKSEL64, clksel);
  179. else
  180. mci_writel(host, CLKSEL, clksel);
  181. }
  182. return 0;
  183. }
  184. #else
  185. #define dw_mci_exynos_resume_noirq NULL
  186. #endif /* CONFIG_PM */
  187. static void dw_mci_exynos_config_hs400(struct dw_mci *host, u32 timing)
  188. {
  189. struct dw_mci_exynos_priv_data *priv = host->priv;
  190. u32 dqs, strobe;
  191. /*
  192. * Not supported to configure register
  193. * related to HS400
  194. */
  195. if (priv->ctrl_type < DW_MCI_TYPE_EXYNOS5420) {
  196. if (timing == MMC_TIMING_MMC_HS400)
  197. dev_warn(host->dev,
  198. "cannot configure HS400, unsupported chipset\n");
  199. return;
  200. }
  201. dqs = priv->saved_dqs_en;
  202. strobe = priv->saved_strobe_ctrl;
  203. if (timing == MMC_TIMING_MMC_HS400) {
  204. dqs |= DATA_STROBE_EN;
  205. strobe = DQS_CTRL_RD_DELAY(strobe, priv->dqs_delay);
  206. } else {
  207. dqs &= ~DATA_STROBE_EN;
  208. }
  209. mci_writel(host, HS400_DQS_EN, dqs);
  210. mci_writel(host, HS400_DLINE_CTRL, strobe);
  211. }
  212. static void dw_mci_exynos_adjust_clock(struct dw_mci *host, unsigned int wanted)
  213. {
  214. struct dw_mci_exynos_priv_data *priv = host->priv;
  215. unsigned long actual;
  216. u8 div;
  217. int ret;
  218. /*
  219. * Don't care if wanted clock is zero or
  220. * ciu clock is unavailable
  221. */
  222. if (!wanted || IS_ERR(host->ciu_clk))
  223. return;
  224. /* Guaranteed minimum frequency for cclkin */
  225. if (wanted < EXYNOS_CCLKIN_MIN)
  226. wanted = EXYNOS_CCLKIN_MIN;
  227. if (wanted == priv->cur_speed)
  228. return;
  229. div = dw_mci_exynos_get_ciu_div(host);
  230. ret = clk_set_rate(host->ciu_clk, wanted * div);
  231. if (ret)
  232. dev_warn(host->dev,
  233. "failed to set clk-rate %u error: %d\n",
  234. wanted * div, ret);
  235. actual = clk_get_rate(host->ciu_clk);
  236. host->bus_hz = actual / div;
  237. priv->cur_speed = wanted;
  238. host->current_speed = 0;
  239. }
  240. static void dw_mci_exynos_set_ios(struct dw_mci *host, struct mmc_ios *ios)
  241. {
  242. struct dw_mci_exynos_priv_data *priv = host->priv;
  243. unsigned int wanted = ios->clock;
  244. u32 timing = ios->timing, clksel;
  245. switch (timing) {
  246. case MMC_TIMING_MMC_HS400:
  247. /* Update tuned sample timing */
  248. clksel = SDMMC_CLKSEL_UP_SAMPLE(
  249. priv->hs400_timing, priv->tuned_sample);
  250. wanted <<= 1;
  251. break;
  252. case MMC_TIMING_MMC_DDR52:
  253. clksel = priv->ddr_timing;
  254. /* Should be double rate for DDR mode */
  255. if (ios->bus_width == MMC_BUS_WIDTH_8)
  256. wanted <<= 1;
  257. break;
  258. default:
  259. clksel = priv->sdr_timing;
  260. }
  261. /* Set clock timing for the requested speed mode*/
  262. dw_mci_exynos_set_clksel_timing(host, clksel);
  263. /* Configure setting for HS400 */
  264. dw_mci_exynos_config_hs400(host, timing);
  265. /* Configure clock rate */
  266. dw_mci_exynos_adjust_clock(host, wanted);
  267. }
  268. static int dw_mci_exynos_parse_dt(struct dw_mci *host)
  269. {
  270. struct dw_mci_exynos_priv_data *priv;
  271. struct device_node *np = host->dev->of_node;
  272. u32 timing[2];
  273. u32 div = 0;
  274. int idx;
  275. int ret;
  276. priv = devm_kzalloc(host->dev, sizeof(*priv), GFP_KERNEL);
  277. if (!priv)
  278. return -ENOMEM;
  279. for (idx = 0; idx < ARRAY_SIZE(exynos_compat); idx++) {
  280. if (of_device_is_compatible(np, exynos_compat[idx].compatible))
  281. priv->ctrl_type = exynos_compat[idx].ctrl_type;
  282. }
  283. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS4412)
  284. priv->ciu_div = EXYNOS4412_FIXED_CIU_CLK_DIV - 1;
  285. else if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS4210)
  286. priv->ciu_div = EXYNOS4210_FIXED_CIU_CLK_DIV - 1;
  287. else {
  288. of_property_read_u32(np, "samsung,dw-mshc-ciu-div", &div);
  289. priv->ciu_div = div;
  290. }
  291. ret = of_property_read_u32_array(np,
  292. "samsung,dw-mshc-sdr-timing", timing, 2);
  293. if (ret)
  294. return ret;
  295. priv->sdr_timing = SDMMC_CLKSEL_TIMING(timing[0], timing[1], div);
  296. ret = of_property_read_u32_array(np,
  297. "samsung,dw-mshc-ddr-timing", timing, 2);
  298. if (ret)
  299. return ret;
  300. priv->ddr_timing = SDMMC_CLKSEL_TIMING(timing[0], timing[1], div);
  301. ret = of_property_read_u32_array(np,
  302. "samsung,dw-mshc-hs400-timing", timing, 2);
  303. if (!ret && of_property_read_u32(np,
  304. "samsung,read-strobe-delay", &priv->dqs_delay))
  305. dev_dbg(host->dev,
  306. "read-strobe-delay is not found, assuming usage of default value\n");
  307. priv->hs400_timing = SDMMC_CLKSEL_TIMING(timing[0], timing[1],
  308. HS400_FIXED_CIU_CLK_DIV);
  309. host->priv = priv;
  310. return 0;
  311. }
  312. static inline u8 dw_mci_exynos_get_clksmpl(struct dw_mci *host)
  313. {
  314. struct dw_mci_exynos_priv_data *priv = host->priv;
  315. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  316. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  317. return SDMMC_CLKSEL_CCLK_SAMPLE(mci_readl(host, CLKSEL64));
  318. else
  319. return SDMMC_CLKSEL_CCLK_SAMPLE(mci_readl(host, CLKSEL));
  320. }
  321. static inline void dw_mci_exynos_set_clksmpl(struct dw_mci *host, u8 sample)
  322. {
  323. u32 clksel;
  324. struct dw_mci_exynos_priv_data *priv = host->priv;
  325. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  326. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  327. clksel = mci_readl(host, CLKSEL64);
  328. else
  329. clksel = mci_readl(host, CLKSEL);
  330. clksel = SDMMC_CLKSEL_UP_SAMPLE(clksel, sample);
  331. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  332. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  333. mci_writel(host, CLKSEL64, clksel);
  334. else
  335. mci_writel(host, CLKSEL, clksel);
  336. }
  337. static inline u8 dw_mci_exynos_move_next_clksmpl(struct dw_mci *host)
  338. {
  339. struct dw_mci_exynos_priv_data *priv = host->priv;
  340. u32 clksel;
  341. u8 sample;
  342. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  343. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  344. clksel = mci_readl(host, CLKSEL64);
  345. else
  346. clksel = mci_readl(host, CLKSEL);
  347. sample = (clksel + 1) & 0x7;
  348. clksel = SDMMC_CLKSEL_UP_SAMPLE(clksel, sample);
  349. if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
  350. priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU)
  351. mci_writel(host, CLKSEL64, clksel);
  352. else
  353. mci_writel(host, CLKSEL, clksel);
  354. return sample;
  355. }
  356. static s8 dw_mci_exynos_get_best_clksmpl(u8 candiates)
  357. {
  358. const u8 iter = 8;
  359. u8 __c;
  360. s8 i, loc = -1;
  361. for (i = 0; i < iter; i++) {
  362. __c = ror8(candiates, i);
  363. if ((__c & 0xc7) == 0xc7) {
  364. loc = i;
  365. goto out;
  366. }
  367. }
  368. for (i = 0; i < iter; i++) {
  369. __c = ror8(candiates, i);
  370. if ((__c & 0x83) == 0x83) {
  371. loc = i;
  372. goto out;
  373. }
  374. }
  375. out:
  376. return loc;
  377. }
  378. static int dw_mci_exynos_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
  379. {
  380. struct dw_mci *host = slot->host;
  381. struct dw_mci_exynos_priv_data *priv = host->priv;
  382. struct mmc_host *mmc = slot->mmc;
  383. u8 start_smpl, smpl, candiates = 0;
  384. s8 found = -1;
  385. int ret = 0;
  386. start_smpl = dw_mci_exynos_get_clksmpl(host);
  387. do {
  388. mci_writel(host, TMOUT, ~0);
  389. smpl = dw_mci_exynos_move_next_clksmpl(host);
  390. if (!mmc_send_tuning(mmc, opcode, NULL))
  391. candiates |= (1 << smpl);
  392. } while (start_smpl != smpl);
  393. found = dw_mci_exynos_get_best_clksmpl(candiates);
  394. if (found >= 0) {
  395. dw_mci_exynos_set_clksmpl(host, found);
  396. priv->tuned_sample = found;
  397. } else {
  398. ret = -EIO;
  399. }
  400. return ret;
  401. }
  402. static int dw_mci_exynos_prepare_hs400_tuning(struct dw_mci *host,
  403. struct mmc_ios *ios)
  404. {
  405. struct dw_mci_exynos_priv_data *priv = host->priv;
  406. dw_mci_exynos_set_clksel_timing(host, priv->hs400_timing);
  407. dw_mci_exynos_adjust_clock(host, (ios->clock) << 1);
  408. return 0;
  409. }
  410. /* Common capabilities of Exynos4/Exynos5 SoC */
  411. static unsigned long exynos_dwmmc_caps[4] = {
  412. MMC_CAP_1_8V_DDR | MMC_CAP_8_BIT_DATA | MMC_CAP_CMD23,
  413. MMC_CAP_CMD23,
  414. MMC_CAP_CMD23,
  415. MMC_CAP_CMD23,
  416. };
  417. static const struct dw_mci_drv_data exynos_drv_data = {
  418. .caps = exynos_dwmmc_caps,
  419. .num_caps = ARRAY_SIZE(exynos_dwmmc_caps),
  420. .init = dw_mci_exynos_priv_init,
  421. .set_ios = dw_mci_exynos_set_ios,
  422. .parse_dt = dw_mci_exynos_parse_dt,
  423. .execute_tuning = dw_mci_exynos_execute_tuning,
  424. .prepare_hs400_tuning = dw_mci_exynos_prepare_hs400_tuning,
  425. };
  426. static const struct of_device_id dw_mci_exynos_match[] = {
  427. { .compatible = "samsung,exynos4412-dw-mshc",
  428. .data = &exynos_drv_data, },
  429. { .compatible = "samsung,exynos5250-dw-mshc",
  430. .data = &exynos_drv_data, },
  431. { .compatible = "samsung,exynos5420-dw-mshc",
  432. .data = &exynos_drv_data, },
  433. { .compatible = "samsung,exynos5420-dw-mshc-smu",
  434. .data = &exynos_drv_data, },
  435. { .compatible = "samsung,exynos7-dw-mshc",
  436. .data = &exynos_drv_data, },
  437. { .compatible = "samsung,exynos7-dw-mshc-smu",
  438. .data = &exynos_drv_data, },
  439. {},
  440. };
  441. MODULE_DEVICE_TABLE(of, dw_mci_exynos_match);
  442. static int dw_mci_exynos_probe(struct platform_device *pdev)
  443. {
  444. const struct dw_mci_drv_data *drv_data;
  445. const struct of_device_id *match;
  446. int ret;
  447. match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node);
  448. drv_data = match->data;
  449. pm_runtime_get_noresume(&pdev->dev);
  450. pm_runtime_set_active(&pdev->dev);
  451. pm_runtime_enable(&pdev->dev);
  452. ret = dw_mci_pltfm_register(pdev, drv_data);
  453. if (ret) {
  454. pm_runtime_disable(&pdev->dev);
  455. pm_runtime_set_suspended(&pdev->dev);
  456. pm_runtime_put_noidle(&pdev->dev);
  457. return ret;
  458. }
  459. return 0;
  460. }
  461. static int dw_mci_exynos_remove(struct platform_device *pdev)
  462. {
  463. pm_runtime_disable(&pdev->dev);
  464. pm_runtime_set_suspended(&pdev->dev);
  465. pm_runtime_put_noidle(&pdev->dev);
  466. return dw_mci_pltfm_remove(pdev);
  467. }
  468. static const struct dev_pm_ops dw_mci_exynos_pmops = {
  469. SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
  470. pm_runtime_force_resume)
  471. SET_RUNTIME_PM_OPS(dw_mci_runtime_suspend,
  472. dw_mci_exynos_runtime_resume,
  473. NULL)
  474. .resume_noirq = dw_mci_exynos_resume_noirq,
  475. .thaw_noirq = dw_mci_exynos_resume_noirq,
  476. .restore_noirq = dw_mci_exynos_resume_noirq,
  477. };
  478. static struct platform_driver dw_mci_exynos_pltfm_driver = {
  479. .probe = dw_mci_exynos_probe,
  480. .remove = dw_mci_exynos_remove,
  481. .driver = {
  482. .name = "dwmmc_exynos",
  483. .of_match_table = dw_mci_exynos_match,
  484. .pm = &dw_mci_exynos_pmops,
  485. },
  486. };
  487. module_platform_driver(dw_mci_exynos_pltfm_driver);
  488. MODULE_DESCRIPTION("Samsung Specific DW-MSHC Driver Extension");
  489. MODULE_AUTHOR("Thomas Abraham <thomas.ab@samsung.com");
  490. MODULE_LICENSE("GPL v2");
  491. MODULE_ALIAS("platform:dwmmc_exynos");