sdhci-st.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. /*
  2. * Support for SDHCI on STMicroelectronics SoCs
  3. *
  4. * Copyright (C) 2014 STMicroelectronics Ltd
  5. * Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
  6. * Contributors: Peter Griffin <peter.griffin@linaro.org>
  7. *
  8. * Based on sdhci-cns3xxx.c
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. */
  20. #include <linux/io.h>
  21. #include <linux/of.h>
  22. #include <linux/module.h>
  23. #include <linux/err.h>
  24. #include <linux/mmc/host.h>
  25. #include <linux/reset.h>
  26. #include "sdhci-pltfm.h"
  27. struct st_mmc_platform_data {
  28. struct reset_control *rstc;
  29. void __iomem *top_ioaddr;
  30. };
  31. /* MMCSS glue logic to setup the HC on some ST SoCs (e.g. STiH407 family) */
  32. #define ST_MMC_CCONFIG_REG_1 0x400
  33. #define ST_MMC_CCONFIG_TIMEOUT_CLK_UNIT BIT(24)
  34. #define ST_MMC_CCONFIG_TIMEOUT_CLK_FREQ BIT(12)
  35. #define ST_MMC_CCONFIG_TUNING_COUNT_DEFAULT BIT(8)
  36. #define ST_MMC_CCONFIG_ASYNC_WAKEUP BIT(0)
  37. #define ST_MMC_CCONFIG_1_DEFAULT \
  38. ((ST_MMC_CCONFIG_TIMEOUT_CLK_UNIT) | \
  39. (ST_MMC_CCONFIG_TIMEOUT_CLK_FREQ) | \
  40. (ST_MMC_CCONFIG_TUNING_COUNT_DEFAULT))
  41. #define ST_MMC_CCONFIG_REG_2 0x404
  42. #define ST_MMC_CCONFIG_HIGH_SPEED BIT(28)
  43. #define ST_MMC_CCONFIG_ADMA2 BIT(24)
  44. #define ST_MMC_CCONFIG_8BIT BIT(20)
  45. #define ST_MMC_CCONFIG_MAX_BLK_LEN 16
  46. #define MAX_BLK_LEN_1024 1
  47. #define MAX_BLK_LEN_2048 2
  48. #define BASE_CLK_FREQ_200 0xc8
  49. #define BASE_CLK_FREQ_100 0x64
  50. #define BASE_CLK_FREQ_50 0x32
  51. #define ST_MMC_CCONFIG_2_DEFAULT \
  52. (ST_MMC_CCONFIG_HIGH_SPEED | ST_MMC_CCONFIG_ADMA2 | \
  53. ST_MMC_CCONFIG_8BIT | \
  54. (MAX_BLK_LEN_1024 << ST_MMC_CCONFIG_MAX_BLK_LEN))
  55. #define ST_MMC_CCONFIG_REG_3 0x408
  56. #define ST_MMC_CCONFIG_EMMC_SLOT_TYPE BIT(28)
  57. #define ST_MMC_CCONFIG_64BIT BIT(24)
  58. #define ST_MMC_CCONFIG_ASYNCH_INTR_SUPPORT BIT(20)
  59. #define ST_MMC_CCONFIG_1P8_VOLT BIT(16)
  60. #define ST_MMC_CCONFIG_3P0_VOLT BIT(12)
  61. #define ST_MMC_CCONFIG_3P3_VOLT BIT(8)
  62. #define ST_MMC_CCONFIG_SUSP_RES_SUPPORT BIT(4)
  63. #define ST_MMC_CCONFIG_SDMA BIT(0)
  64. #define ST_MMC_CCONFIG_3_DEFAULT \
  65. (ST_MMC_CCONFIG_ASYNCH_INTR_SUPPORT | \
  66. ST_MMC_CCONFIG_3P3_VOLT | \
  67. ST_MMC_CCONFIG_SUSP_RES_SUPPORT | \
  68. ST_MMC_CCONFIG_SDMA)
  69. #define ST_MMC_CCONFIG_REG_4 0x40c
  70. #define ST_MMC_CCONFIG_D_DRIVER BIT(20)
  71. #define ST_MMC_CCONFIG_C_DRIVER BIT(16)
  72. #define ST_MMC_CCONFIG_A_DRIVER BIT(12)
  73. #define ST_MMC_CCONFIG_DDR50 BIT(8)
  74. #define ST_MMC_CCONFIG_SDR104 BIT(4)
  75. #define ST_MMC_CCONFIG_SDR50 BIT(0)
  76. #define ST_MMC_CCONFIG_4_DEFAULT 0
  77. #define ST_MMC_CCONFIG_REG_5 0x410
  78. #define ST_MMC_CCONFIG_TUNING_FOR_SDR50 BIT(8)
  79. #define RETUNING_TIMER_CNT_MAX 0xf
  80. #define ST_MMC_CCONFIG_5_DEFAULT 0
  81. /* I/O configuration for Arasan IP */
  82. #define ST_MMC_GP_OUTPUT 0x450
  83. #define ST_MMC_GP_OUTPUT_CD BIT(12)
  84. #define ST_MMC_STATUS_R 0x460
  85. #define ST_TOP_MMC_DLY_FIX_OFF(x) (x - 0x8)
  86. /* TOP config registers to manage static and dynamic delay */
  87. #define ST_TOP_MMC_TX_CLK_DLY ST_TOP_MMC_DLY_FIX_OFF(0x8)
  88. #define ST_TOP_MMC_RX_CLK_DLY ST_TOP_MMC_DLY_FIX_OFF(0xc)
  89. /* MMC delay control register */
  90. #define ST_TOP_MMC_DLY_CTRL ST_TOP_MMC_DLY_FIX_OFF(0x18)
  91. #define ST_TOP_MMC_DLY_CTRL_DLL_BYPASS_CMD BIT(0)
  92. #define ST_TOP_MMC_DLY_CTRL_DLL_BYPASS_PH_SEL BIT(1)
  93. #define ST_TOP_MMC_DLY_CTRL_TX_DLL_ENABLE BIT(8)
  94. #define ST_TOP_MMC_DLY_CTRL_RX_DLL_ENABLE BIT(9)
  95. #define ST_TOP_MMC_DLY_CTRL_ATUNE_NOT_CFG_DLY BIT(10)
  96. #define ST_TOP_MMC_START_DLL_LOCK BIT(11)
  97. /* register to provide the phase-shift value for DLL */
  98. #define ST_TOP_MMC_TX_DLL_STEP_DLY ST_TOP_MMC_DLY_FIX_OFF(0x1c)
  99. #define ST_TOP_MMC_RX_DLL_STEP_DLY ST_TOP_MMC_DLY_FIX_OFF(0x20)
  100. #define ST_TOP_MMC_RX_CMD_STEP_DLY ST_TOP_MMC_DLY_FIX_OFF(0x24)
  101. /* phase shift delay on the tx clk 2.188ns */
  102. #define ST_TOP_MMC_TX_DLL_STEP_DLY_VALID 0x6
  103. #define ST_TOP_MMC_DLY_MAX 0xf
  104. #define ST_TOP_MMC_DYN_DLY_CONF \
  105. (ST_TOP_MMC_DLY_CTRL_TX_DLL_ENABLE | \
  106. ST_TOP_MMC_DLY_CTRL_ATUNE_NOT_CFG_DLY | \
  107. ST_TOP_MMC_START_DLL_LOCK)
  108. /*
  109. * For clock speeds greater than 90MHz, we need to check that the
  110. * DLL procedure has finished before switching to ultra-speed modes.
  111. */
  112. #define CLK_TO_CHECK_DLL_LOCK 90000000
  113. static inline void st_mmcss_set_static_delay(void __iomem *ioaddr)
  114. {
  115. if (!ioaddr)
  116. return;
  117. writel_relaxed(0x0, ioaddr + ST_TOP_MMC_DLY_CTRL);
  118. writel_relaxed(ST_TOP_MMC_DLY_MAX,
  119. ioaddr + ST_TOP_MMC_TX_CLK_DLY);
  120. }
  121. /**
  122. * st_mmcss_cconfig: configure the Arasan HC inside the flashSS.
  123. * @np: dt device node.
  124. * @host: sdhci host
  125. * Description: this function is to configure the Arasan host controller.
  126. * On some ST SoCs, i.e. STiH407 family, the MMC devices inside a dedicated
  127. * flashSS sub-system which needs to be configured to be compliant to eMMC 4.5
  128. * or eMMC4.3. This has to be done before registering the sdhci host.
  129. */
  130. static void st_mmcss_cconfig(struct device_node *np, struct sdhci_host *host)
  131. {
  132. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  133. struct mmc_host *mhost = host->mmc;
  134. u32 cconf2, cconf3, cconf4, cconf5;
  135. if (!of_device_is_compatible(np, "st,sdhci-stih407"))
  136. return;
  137. cconf2 = ST_MMC_CCONFIG_2_DEFAULT;
  138. cconf3 = ST_MMC_CCONFIG_3_DEFAULT;
  139. cconf4 = ST_MMC_CCONFIG_4_DEFAULT;
  140. cconf5 = ST_MMC_CCONFIG_5_DEFAULT;
  141. writel_relaxed(ST_MMC_CCONFIG_1_DEFAULT,
  142. host->ioaddr + ST_MMC_CCONFIG_REG_1);
  143. /* Set clock frequency, default to 50MHz if max-frequency is not
  144. * provided */
  145. switch (mhost->f_max) {
  146. case 200000000:
  147. clk_set_rate(pltfm_host->clk, mhost->f_max);
  148. cconf2 |= BASE_CLK_FREQ_200;
  149. break;
  150. case 100000000:
  151. clk_set_rate(pltfm_host->clk, mhost->f_max);
  152. cconf2 |= BASE_CLK_FREQ_100;
  153. break;
  154. default:
  155. clk_set_rate(pltfm_host->clk, 50000000);
  156. cconf2 |= BASE_CLK_FREQ_50;
  157. }
  158. writel_relaxed(cconf2, host->ioaddr + ST_MMC_CCONFIG_REG_2);
  159. if (mhost->caps & MMC_CAP_NONREMOVABLE)
  160. cconf3 |= ST_MMC_CCONFIG_EMMC_SLOT_TYPE;
  161. else
  162. /* CARD _D ET_CTRL */
  163. writel_relaxed(ST_MMC_GP_OUTPUT_CD,
  164. host->ioaddr + ST_MMC_GP_OUTPUT);
  165. if (mhost->caps & MMC_CAP_UHS_SDR50) {
  166. /* use 1.8V */
  167. cconf3 |= ST_MMC_CCONFIG_1P8_VOLT;
  168. cconf4 |= ST_MMC_CCONFIG_SDR50;
  169. /* Use tuning */
  170. cconf5 |= ST_MMC_CCONFIG_TUNING_FOR_SDR50;
  171. /* Max timeout for retuning */
  172. cconf5 |= RETUNING_TIMER_CNT_MAX;
  173. }
  174. if (mhost->caps & MMC_CAP_UHS_SDR104) {
  175. /*
  176. * SDR104 implies the HC can support HS200 mode, so
  177. * it's mandatory to use 1.8V
  178. */
  179. cconf3 |= ST_MMC_CCONFIG_1P8_VOLT;
  180. cconf4 |= ST_MMC_CCONFIG_SDR104;
  181. /* Max timeout for retuning */
  182. cconf5 |= RETUNING_TIMER_CNT_MAX;
  183. }
  184. if (mhost->caps & MMC_CAP_UHS_DDR50)
  185. cconf4 |= ST_MMC_CCONFIG_DDR50;
  186. writel_relaxed(cconf3, host->ioaddr + ST_MMC_CCONFIG_REG_3);
  187. writel_relaxed(cconf4, host->ioaddr + ST_MMC_CCONFIG_REG_4);
  188. writel_relaxed(cconf5, host->ioaddr + ST_MMC_CCONFIG_REG_5);
  189. }
  190. static inline void st_mmcss_set_dll(void __iomem *ioaddr)
  191. {
  192. if (!ioaddr)
  193. return;
  194. writel_relaxed(ST_TOP_MMC_DYN_DLY_CONF, ioaddr + ST_TOP_MMC_DLY_CTRL);
  195. writel_relaxed(ST_TOP_MMC_TX_DLL_STEP_DLY_VALID,
  196. ioaddr + ST_TOP_MMC_TX_DLL_STEP_DLY);
  197. }
  198. static int st_mmcss_lock_dll(void __iomem *ioaddr)
  199. {
  200. unsigned long curr, value;
  201. unsigned long finish = jiffies + HZ;
  202. /* Checks if the DLL procedure is finished */
  203. do {
  204. curr = jiffies;
  205. value = readl(ioaddr + ST_MMC_STATUS_R);
  206. if (value & 0x1)
  207. return 0;
  208. cpu_relax();
  209. } while (!time_after_eq(curr, finish));
  210. return -EBUSY;
  211. }
  212. static int sdhci_st_set_dll_for_clock(struct sdhci_host *host)
  213. {
  214. int ret = 0;
  215. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  216. struct st_mmc_platform_data *pdata = pltfm_host->priv;
  217. if (host->clock > CLK_TO_CHECK_DLL_LOCK) {
  218. st_mmcss_set_dll(pdata->top_ioaddr);
  219. ret = st_mmcss_lock_dll(host->ioaddr);
  220. }
  221. return ret;
  222. }
  223. static void sdhci_st_set_uhs_signaling(struct sdhci_host *host,
  224. unsigned int uhs)
  225. {
  226. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  227. struct st_mmc_platform_data *pdata = pltfm_host->priv;
  228. u16 ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);
  229. int ret = 0;
  230. /* Select Bus Speed Mode for host */
  231. ctrl_2 &= ~SDHCI_CTRL_UHS_MASK;
  232. switch (uhs) {
  233. /*
  234. * Set V18_EN -- UHS modes do not work without this.
  235. * does not change signaling voltage
  236. */
  237. case MMC_TIMING_UHS_SDR12:
  238. st_mmcss_set_static_delay(pdata->top_ioaddr);
  239. ctrl_2 |= SDHCI_CTRL_UHS_SDR12 | SDHCI_CTRL_VDD_180;
  240. break;
  241. case MMC_TIMING_UHS_SDR25:
  242. st_mmcss_set_static_delay(pdata->top_ioaddr);
  243. ctrl_2 |= SDHCI_CTRL_UHS_SDR25 | SDHCI_CTRL_VDD_180;
  244. break;
  245. case MMC_TIMING_UHS_SDR50:
  246. st_mmcss_set_static_delay(pdata->top_ioaddr);
  247. ctrl_2 |= SDHCI_CTRL_UHS_SDR50 | SDHCI_CTRL_VDD_180;
  248. ret = sdhci_st_set_dll_for_clock(host);
  249. break;
  250. case MMC_TIMING_UHS_SDR104:
  251. case MMC_TIMING_MMC_HS200:
  252. st_mmcss_set_static_delay(pdata->top_ioaddr);
  253. ctrl_2 |= SDHCI_CTRL_UHS_SDR104 | SDHCI_CTRL_VDD_180;
  254. ret = sdhci_st_set_dll_for_clock(host);
  255. break;
  256. case MMC_TIMING_UHS_DDR50:
  257. case MMC_TIMING_MMC_DDR52:
  258. st_mmcss_set_static_delay(pdata->top_ioaddr);
  259. ctrl_2 |= SDHCI_CTRL_UHS_DDR50 | SDHCI_CTRL_VDD_180;
  260. break;
  261. }
  262. if (ret)
  263. dev_warn(mmc_dev(host->mmc), "Error setting dll for clock "
  264. "(uhs %d)\n", uhs);
  265. dev_dbg(mmc_dev(host->mmc), "uhs %d, ctrl_2 %04X\n", uhs, ctrl_2);
  266. sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
  267. }
  268. static u32 sdhci_st_readl(struct sdhci_host *host, int reg)
  269. {
  270. u32 ret;
  271. switch (reg) {
  272. case SDHCI_CAPABILITIES:
  273. ret = readl_relaxed(host->ioaddr + reg);
  274. /* Support 3.3V and 1.8V */
  275. ret &= ~SDHCI_CAN_VDD_300;
  276. break;
  277. default:
  278. ret = readl_relaxed(host->ioaddr + reg);
  279. }
  280. return ret;
  281. }
  282. static const struct sdhci_ops sdhci_st_ops = {
  283. .get_max_clock = sdhci_pltfm_clk_get_max_clock,
  284. .set_clock = sdhci_set_clock,
  285. .set_bus_width = sdhci_set_bus_width,
  286. .read_l = sdhci_st_readl,
  287. .reset = sdhci_reset,
  288. .set_uhs_signaling = sdhci_st_set_uhs_signaling,
  289. };
  290. static const struct sdhci_pltfm_data sdhci_st_pdata = {
  291. .ops = &sdhci_st_ops,
  292. .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC |
  293. SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
  294. SDHCI_QUIRK_NO_HISPD_BIT,
  295. .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
  296. SDHCI_QUIRK2_STOP_WITH_TC,
  297. };
  298. static int sdhci_st_probe(struct platform_device *pdev)
  299. {
  300. struct device_node *np = pdev->dev.of_node;
  301. struct sdhci_host *host;
  302. struct st_mmc_platform_data *pdata;
  303. struct sdhci_pltfm_host *pltfm_host;
  304. struct clk *clk;
  305. int ret = 0;
  306. u16 host_version;
  307. struct resource *res;
  308. pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
  309. if (!pdata)
  310. return -ENOMEM;
  311. clk = devm_clk_get(&pdev->dev, "mmc");
  312. if (IS_ERR(clk)) {
  313. dev_err(&pdev->dev, "Peripheral clk not found\n");
  314. return PTR_ERR(clk);
  315. }
  316. pdata->rstc = devm_reset_control_get(&pdev->dev, NULL);
  317. if (IS_ERR(pdata->rstc))
  318. pdata->rstc = NULL;
  319. else
  320. reset_control_deassert(pdata->rstc);
  321. host = sdhci_pltfm_init(pdev, &sdhci_st_pdata, 0);
  322. if (IS_ERR(host)) {
  323. dev_err(&pdev->dev, "Failed sdhci_pltfm_init\n");
  324. ret = PTR_ERR(host);
  325. goto err_pltfm_init;
  326. }
  327. ret = mmc_of_parse(host->mmc);
  328. if (ret) {
  329. dev_err(&pdev->dev, "Failed mmc_of_parse\n");
  330. goto err_of;
  331. }
  332. clk_prepare_enable(clk);
  333. /* Configure the FlashSS Top registers for setting eMMC TX/RX delay */
  334. res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
  335. "top-mmc-delay");
  336. pdata->top_ioaddr = devm_ioremap_resource(&pdev->dev, res);
  337. if (IS_ERR(pdata->top_ioaddr)) {
  338. dev_warn(&pdev->dev, "FlashSS Top Dly registers not available");
  339. pdata->top_ioaddr = NULL;
  340. }
  341. pltfm_host = sdhci_priv(host);
  342. pltfm_host->priv = pdata;
  343. pltfm_host->clk = clk;
  344. /* Configure the Arasan HC inside the flashSS */
  345. st_mmcss_cconfig(np, host);
  346. ret = sdhci_add_host(host);
  347. if (ret) {
  348. dev_err(&pdev->dev, "Failed sdhci_add_host\n");
  349. goto err_out;
  350. }
  351. platform_set_drvdata(pdev, host);
  352. host_version = readw_relaxed((host->ioaddr + SDHCI_HOST_VERSION));
  353. dev_info(&pdev->dev, "SDHCI ST Initialised: Host Version: 0x%x Vendor Version 0x%x\n",
  354. ((host_version & SDHCI_SPEC_VER_MASK) >> SDHCI_SPEC_VER_SHIFT),
  355. ((host_version & SDHCI_VENDOR_VER_MASK) >>
  356. SDHCI_VENDOR_VER_SHIFT));
  357. return 0;
  358. err_out:
  359. clk_disable_unprepare(clk);
  360. err_of:
  361. sdhci_pltfm_free(pdev);
  362. err_pltfm_init:
  363. if (pdata->rstc)
  364. reset_control_assert(pdata->rstc);
  365. return ret;
  366. }
  367. static int sdhci_st_remove(struct platform_device *pdev)
  368. {
  369. struct sdhci_host *host = platform_get_drvdata(pdev);
  370. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  371. struct st_mmc_platform_data *pdata = pltfm_host->priv;
  372. int ret;
  373. ret = sdhci_pltfm_unregister(pdev);
  374. if (pdata->rstc)
  375. reset_control_assert(pdata->rstc);
  376. return ret;
  377. }
  378. #ifdef CONFIG_PM_SLEEP
  379. static int sdhci_st_suspend(struct device *dev)
  380. {
  381. struct sdhci_host *host = dev_get_drvdata(dev);
  382. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  383. struct st_mmc_platform_data *pdata = pltfm_host->priv;
  384. int ret = sdhci_suspend_host(host);
  385. if (ret)
  386. goto out;
  387. if (pdata->rstc)
  388. reset_control_assert(pdata->rstc);
  389. clk_disable_unprepare(pltfm_host->clk);
  390. out:
  391. return ret;
  392. }
  393. static int sdhci_st_resume(struct device *dev)
  394. {
  395. struct sdhci_host *host = dev_get_drvdata(dev);
  396. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  397. struct st_mmc_platform_data *pdata = pltfm_host->priv;
  398. struct device_node *np = dev->of_node;
  399. clk_prepare_enable(pltfm_host->clk);
  400. if (pdata->rstc)
  401. reset_control_deassert(pdata->rstc);
  402. st_mmcss_cconfig(np, host);
  403. return sdhci_resume_host(host);
  404. }
  405. #endif
  406. static SIMPLE_DEV_PM_OPS(sdhci_st_pmops, sdhci_st_suspend, sdhci_st_resume);
  407. static const struct of_device_id st_sdhci_match[] = {
  408. { .compatible = "st,sdhci" },
  409. {},
  410. };
  411. MODULE_DEVICE_TABLE(of, st_sdhci_match);
  412. static struct platform_driver sdhci_st_driver = {
  413. .probe = sdhci_st_probe,
  414. .remove = sdhci_st_remove,
  415. .driver = {
  416. .name = "sdhci-st",
  417. .pm = &sdhci_st_pmops,
  418. .of_match_table = of_match_ptr(st_sdhci_match),
  419. },
  420. };
  421. module_platform_driver(sdhci_st_driver);
  422. MODULE_DESCRIPTION("SDHCI driver for STMicroelectronics SoCs");
  423. MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>");
  424. MODULE_LICENSE("GPL v2");
  425. MODULE_ALIAS("platform:sdhci-st");