sdhci-pxav3.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (C) 2010 Marvell International Ltd.
  4. * Zhangfei Gao <[email protected]>
  5. * Kevin Wang <[email protected]>
  6. * Mingwei Wang <[email protected]>
  7. * Philip Rakity <[email protected]>
  8. * Mark Brown <[email protected]>
  9. */
  10. #include <linux/err.h>
  11. #include <linux/init.h>
  12. #include <linux/platform_device.h>
  13. #include <linux/clk.h>
  14. #include <linux/io.h>
  15. #include <linux/mmc/card.h>
  16. #include <linux/mmc/host.h>
  17. #include <linux/platform_data/pxa_sdhci.h>
  18. #include <linux/slab.h>
  19. #include <linux/delay.h>
  20. #include <linux/module.h>
  21. #include <linux/of.h>
  22. #include <linux/of_device.h>
  23. #include <linux/pm.h>
  24. #include <linux/pm_runtime.h>
  25. #include <linux/mbus.h>
  26. #include "sdhci.h"
  27. #include "sdhci-pltfm.h"
  28. #define PXAV3_RPM_DELAY_MS 50
  29. #define SD_CLOCK_BURST_SIZE_SETUP 0x10A
  30. #define SDCLK_SEL 0x100
  31. #define SDCLK_DELAY_SHIFT 9
  32. #define SDCLK_DELAY_MASK 0x1f
  33. #define SD_CFG_FIFO_PARAM 0x100
  34. #define SDCFG_GEN_PAD_CLK_ON (1<<6)
  35. #define SDCFG_GEN_PAD_CLK_CNT_MASK 0xFF
  36. #define SDCFG_GEN_PAD_CLK_CNT_SHIFT 24
  37. #define SD_SPI_MODE 0x108
  38. #define SD_CE_ATA_1 0x10C
  39. #define SD_CE_ATA_2 0x10E
  40. #define SDCE_MISC_INT (1<<2)
  41. #define SDCE_MISC_INT_EN (1<<1)
  42. struct sdhci_pxa {
  43. struct clk *clk_core;
  44. struct clk *clk_io;
  45. u8 power_mode;
  46. void __iomem *sdio3_conf_reg;
  47. };
  48. /*
  49. * These registers are relative to the second register region, for the
  50. * MBus bridge.
  51. */
  52. #define SDHCI_WINDOW_CTRL(i) (0x80 + ((i) << 3))
  53. #define SDHCI_WINDOW_BASE(i) (0x84 + ((i) << 3))
  54. #define SDHCI_MAX_WIN_NUM 8
  55. /*
  56. * Fields below belong to SDIO3 Configuration Register (third register
  57. * region for the Armada 38x flavor)
  58. */
  59. #define SDIO3_CONF_CLK_INV BIT(0)
  60. #define SDIO3_CONF_SD_FB_CLK BIT(2)
  61. static int mv_conf_mbus_windows(struct platform_device *pdev,
  62. const struct mbus_dram_target_info *dram)
  63. {
  64. int i;
  65. void __iomem *regs;
  66. struct resource *res;
  67. if (!dram) {
  68. dev_err(&pdev->dev, "no mbus dram info\n");
  69. return -EINVAL;
  70. }
  71. res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
  72. if (!res) {
  73. dev_err(&pdev->dev, "cannot get mbus registers\n");
  74. return -EINVAL;
  75. }
  76. regs = ioremap(res->start, resource_size(res));
  77. if (!regs) {
  78. dev_err(&pdev->dev, "cannot map mbus registers\n");
  79. return -ENOMEM;
  80. }
  81. for (i = 0; i < SDHCI_MAX_WIN_NUM; i++) {
  82. writel(0, regs + SDHCI_WINDOW_CTRL(i));
  83. writel(0, regs + SDHCI_WINDOW_BASE(i));
  84. }
  85. for (i = 0; i < dram->num_cs; i++) {
  86. const struct mbus_dram_window *cs = dram->cs + i;
  87. /* Write size, attributes and target id to control register */
  88. writel(((cs->size - 1) & 0xffff0000) |
  89. (cs->mbus_attr << 8) |
  90. (dram->mbus_dram_target_id << 4) | 1,
  91. regs + SDHCI_WINDOW_CTRL(i));
  92. /* Write base address to base register */
  93. writel(cs->base, regs + SDHCI_WINDOW_BASE(i));
  94. }
  95. iounmap(regs);
  96. return 0;
  97. }
  98. static int armada_38x_quirks(struct platform_device *pdev,
  99. struct sdhci_host *host)
  100. {
  101. struct device_node *np = pdev->dev.of_node;
  102. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  103. struct sdhci_pxa *pxa = sdhci_pltfm_priv(pltfm_host);
  104. struct resource *res;
  105. host->quirks &= ~SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN;
  106. host->quirks |= SDHCI_QUIRK_MISSING_CAPS;
  107. host->caps = sdhci_readl(host, SDHCI_CAPABILITIES);
  108. host->caps1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
  109. res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
  110. "conf-sdio3");
  111. if (res) {
  112. pxa->sdio3_conf_reg = devm_ioremap_resource(&pdev->dev, res);
  113. if (IS_ERR(pxa->sdio3_conf_reg))
  114. return PTR_ERR(pxa->sdio3_conf_reg);
  115. } else {
  116. /*
  117. * According to erratum 'FE-2946959' both SDR50 and DDR50
  118. * modes require specific clock adjustments in SDIO3
  119. * Configuration register, if the adjustment is not done,
  120. * remove them from the capabilities.
  121. */
  122. host->caps1 &= ~(SDHCI_SUPPORT_SDR50 | SDHCI_SUPPORT_DDR50);
  123. dev_warn(&pdev->dev, "conf-sdio3 register not found: disabling SDR50 and DDR50 modes.\nConsider updating your dtb\n");
  124. }
  125. /*
  126. * According to erratum 'ERR-7878951' Armada 38x SDHCI
  127. * controller has different capabilities than the ones shown
  128. * in its registers
  129. */
  130. if (of_property_read_bool(np, "no-1-8-v")) {
  131. host->caps &= ~SDHCI_CAN_VDD_180;
  132. host->mmc->caps &= ~MMC_CAP_1_8V_DDR;
  133. } else {
  134. host->caps &= ~SDHCI_CAN_VDD_330;
  135. }
  136. host->caps1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_USE_SDR50_TUNING);
  137. return 0;
  138. }
  139. static void pxav3_reset(struct sdhci_host *host, u8 mask)
  140. {
  141. struct platform_device *pdev = to_platform_device(mmc_dev(host->mmc));
  142. struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data;
  143. sdhci_reset(host, mask);
  144. if (mask == SDHCI_RESET_ALL) {
  145. /*
  146. * tune timing of read data/command when crc error happen
  147. * no performance impact
  148. */
  149. if (pdata && 0 != pdata->clk_delay_cycles) {
  150. u16 tmp;
  151. tmp = readw(host->ioaddr + SD_CLOCK_BURST_SIZE_SETUP);
  152. tmp |= (pdata->clk_delay_cycles & SDCLK_DELAY_MASK)
  153. << SDCLK_DELAY_SHIFT;
  154. tmp |= SDCLK_SEL;
  155. writew(tmp, host->ioaddr + SD_CLOCK_BURST_SIZE_SETUP);
  156. }
  157. }
  158. }
  159. #define MAX_WAIT_COUNT 5
  160. static void pxav3_gen_init_74_clocks(struct sdhci_host *host, u8 power_mode)
  161. {
  162. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  163. struct sdhci_pxa *pxa = sdhci_pltfm_priv(pltfm_host);
  164. u16 tmp;
  165. int count;
  166. if (pxa->power_mode == MMC_POWER_UP
  167. && power_mode == MMC_POWER_ON) {
  168. dev_dbg(mmc_dev(host->mmc),
  169. "%s: slot->power_mode = %d,"
  170. "ios->power_mode = %d\n",
  171. __func__,
  172. pxa->power_mode,
  173. power_mode);
  174. /* set we want notice of when 74 clocks are sent */
  175. tmp = readw(host->ioaddr + SD_CE_ATA_2);
  176. tmp |= SDCE_MISC_INT_EN;
  177. writew(tmp, host->ioaddr + SD_CE_ATA_2);
  178. /* start sending the 74 clocks */
  179. tmp = readw(host->ioaddr + SD_CFG_FIFO_PARAM);
  180. tmp |= SDCFG_GEN_PAD_CLK_ON;
  181. writew(tmp, host->ioaddr + SD_CFG_FIFO_PARAM);
  182. /* slowest speed is about 100KHz or 10usec per clock */
  183. udelay(740);
  184. count = 0;
  185. while (count++ < MAX_WAIT_COUNT) {
  186. if ((readw(host->ioaddr + SD_CE_ATA_2)
  187. & SDCE_MISC_INT) == 0)
  188. break;
  189. udelay(10);
  190. }
  191. if (count == MAX_WAIT_COUNT)
  192. dev_warn(mmc_dev(host->mmc), "74 clock interrupt not cleared\n");
  193. /* clear the interrupt bit if posted */
  194. tmp = readw(host->ioaddr + SD_CE_ATA_2);
  195. tmp |= SDCE_MISC_INT;
  196. writew(tmp, host->ioaddr + SD_CE_ATA_2);
  197. }
  198. pxa->power_mode = power_mode;
  199. }
  200. static void pxav3_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs)
  201. {
  202. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  203. struct sdhci_pxa *pxa = sdhci_pltfm_priv(pltfm_host);
  204. u16 ctrl_2;
  205. /*
  206. * Set V18_EN -- UHS modes do not work without this.
  207. * does not change signaling voltage
  208. */
  209. ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);
  210. /* Select Bus Speed Mode for host */
  211. ctrl_2 &= ~SDHCI_CTRL_UHS_MASK;
  212. switch (uhs) {
  213. case MMC_TIMING_UHS_SDR12:
  214. ctrl_2 |= SDHCI_CTRL_UHS_SDR12;
  215. break;
  216. case MMC_TIMING_UHS_SDR25:
  217. ctrl_2 |= SDHCI_CTRL_UHS_SDR25;
  218. break;
  219. case MMC_TIMING_UHS_SDR50:
  220. ctrl_2 |= SDHCI_CTRL_UHS_SDR50 | SDHCI_CTRL_VDD_180;
  221. break;
  222. case MMC_TIMING_UHS_SDR104:
  223. ctrl_2 |= SDHCI_CTRL_UHS_SDR104 | SDHCI_CTRL_VDD_180;
  224. break;
  225. case MMC_TIMING_MMC_DDR52:
  226. case MMC_TIMING_UHS_DDR50:
  227. ctrl_2 |= SDHCI_CTRL_UHS_DDR50 | SDHCI_CTRL_VDD_180;
  228. break;
  229. }
  230. /*
  231. * Update SDIO3 Configuration register according to erratum
  232. * FE-2946959
  233. */
  234. if (pxa->sdio3_conf_reg) {
  235. u8 reg_val = readb(pxa->sdio3_conf_reg);
  236. if (uhs == MMC_TIMING_UHS_SDR50 ||
  237. uhs == MMC_TIMING_UHS_DDR50) {
  238. reg_val &= ~SDIO3_CONF_CLK_INV;
  239. reg_val |= SDIO3_CONF_SD_FB_CLK;
  240. } else if (uhs == MMC_TIMING_MMC_HS) {
  241. reg_val &= ~SDIO3_CONF_CLK_INV;
  242. reg_val &= ~SDIO3_CONF_SD_FB_CLK;
  243. } else {
  244. reg_val |= SDIO3_CONF_CLK_INV;
  245. reg_val &= ~SDIO3_CONF_SD_FB_CLK;
  246. }
  247. writeb(reg_val, pxa->sdio3_conf_reg);
  248. }
  249. sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);
  250. dev_dbg(mmc_dev(host->mmc),
  251. "%s uhs = %d, ctrl_2 = %04X\n",
  252. __func__, uhs, ctrl_2);
  253. }
  254. static void pxav3_set_power(struct sdhci_host *host, unsigned char mode,
  255. unsigned short vdd)
  256. {
  257. struct mmc_host *mmc = host->mmc;
  258. u8 pwr = host->pwr;
  259. sdhci_set_power_noreg(host, mode, vdd);
  260. if (host->pwr == pwr)
  261. return;
  262. if (host->pwr == 0)
  263. vdd = 0;
  264. if (!IS_ERR(mmc->supply.vmmc))
  265. mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
  266. }
  267. static const struct sdhci_ops pxav3_sdhci_ops = {
  268. .set_clock = sdhci_set_clock,
  269. .set_power = pxav3_set_power,
  270. .platform_send_init_74_clocks = pxav3_gen_init_74_clocks,
  271. .get_max_clock = sdhci_pltfm_clk_get_max_clock,
  272. .set_bus_width = sdhci_set_bus_width,
  273. .reset = pxav3_reset,
  274. .set_uhs_signaling = pxav3_set_uhs_signaling,
  275. };
  276. static const struct sdhci_pltfm_data sdhci_pxav3_pdata = {
  277. .quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK
  278. | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
  279. | SDHCI_QUIRK_32BIT_ADMA_SIZE
  280. | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
  281. .ops = &pxav3_sdhci_ops,
  282. };
  283. #ifdef CONFIG_OF
  284. static const struct of_device_id sdhci_pxav3_of_match[] = {
  285. {
  286. .compatible = "mrvl,pxav3-mmc",
  287. },
  288. {
  289. .compatible = "marvell,armada-380-sdhci",
  290. },
  291. {},
  292. };
  293. MODULE_DEVICE_TABLE(of, sdhci_pxav3_of_match);
  294. static struct sdhci_pxa_platdata *pxav3_get_mmc_pdata(struct device *dev)
  295. {
  296. struct sdhci_pxa_platdata *pdata;
  297. struct device_node *np = dev->of_node;
  298. u32 clk_delay_cycles;
  299. pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
  300. if (!pdata)
  301. return NULL;
  302. if (!of_property_read_u32(np, "mrvl,clk-delay-cycles",
  303. &clk_delay_cycles))
  304. pdata->clk_delay_cycles = clk_delay_cycles;
  305. return pdata;
  306. }
  307. #else
  308. static inline struct sdhci_pxa_platdata *pxav3_get_mmc_pdata(struct device *dev)
  309. {
  310. return NULL;
  311. }
  312. #endif
  313. static int sdhci_pxav3_probe(struct platform_device *pdev)
  314. {
  315. struct sdhci_pltfm_host *pltfm_host;
  316. struct sdhci_pxa_platdata *pdata = pdev->dev.platform_data;
  317. struct device *dev = &pdev->dev;
  318. struct device_node *np = pdev->dev.of_node;
  319. struct sdhci_host *host = NULL;
  320. struct sdhci_pxa *pxa = NULL;
  321. const struct of_device_id *match;
  322. int ret;
  323. host = sdhci_pltfm_init(pdev, &sdhci_pxav3_pdata, sizeof(*pxa));
  324. if (IS_ERR(host))
  325. return PTR_ERR(host);
  326. pltfm_host = sdhci_priv(host);
  327. pxa = sdhci_pltfm_priv(pltfm_host);
  328. pxa->clk_io = devm_clk_get(dev, "io");
  329. if (IS_ERR(pxa->clk_io))
  330. pxa->clk_io = devm_clk_get(dev, NULL);
  331. if (IS_ERR(pxa->clk_io)) {
  332. dev_err(dev, "failed to get io clock\n");
  333. ret = PTR_ERR(pxa->clk_io);
  334. goto err_clk_get;
  335. }
  336. pltfm_host->clk = pxa->clk_io;
  337. clk_prepare_enable(pxa->clk_io);
  338. pxa->clk_core = devm_clk_get(dev, "core");
  339. if (!IS_ERR(pxa->clk_core))
  340. clk_prepare_enable(pxa->clk_core);
  341. /* enable 1/8V DDR capable */
  342. host->mmc->caps |= MMC_CAP_1_8V_DDR;
  343. if (of_device_is_compatible(np, "marvell,armada-380-sdhci")) {
  344. ret = armada_38x_quirks(pdev, host);
  345. if (ret < 0)
  346. goto err_mbus_win;
  347. ret = mv_conf_mbus_windows(pdev, mv_mbus_dram_info());
  348. if (ret < 0)
  349. goto err_mbus_win;
  350. }
  351. match = of_match_device(of_match_ptr(sdhci_pxav3_of_match), &pdev->dev);
  352. if (match) {
  353. ret = mmc_of_parse(host->mmc);
  354. if (ret)
  355. goto err_of_parse;
  356. sdhci_get_of_property(pdev);
  357. pdata = pxav3_get_mmc_pdata(dev);
  358. pdev->dev.platform_data = pdata;
  359. } else if (pdata) {
  360. /* on-chip device */
  361. if (pdata->flags & PXA_FLAG_CARD_PERMANENT)
  362. host->mmc->caps |= MMC_CAP_NONREMOVABLE;
  363. /* If slot design supports 8 bit data, indicate this to MMC. */
  364. if (pdata->flags & PXA_FLAG_SD_8_BIT_CAPABLE_SLOT)
  365. host->mmc->caps |= MMC_CAP_8_BIT_DATA;
  366. if (pdata->quirks)
  367. host->quirks |= pdata->quirks;
  368. if (pdata->quirks2)
  369. host->quirks2 |= pdata->quirks2;
  370. if (pdata->host_caps)
  371. host->mmc->caps |= pdata->host_caps;
  372. if (pdata->host_caps2)
  373. host->mmc->caps2 |= pdata->host_caps2;
  374. if (pdata->pm_caps)
  375. host->mmc->pm_caps |= pdata->pm_caps;
  376. }
  377. pm_runtime_get_noresume(&pdev->dev);
  378. pm_runtime_set_active(&pdev->dev);
  379. pm_runtime_set_autosuspend_delay(&pdev->dev, PXAV3_RPM_DELAY_MS);
  380. pm_runtime_use_autosuspend(&pdev->dev);
  381. pm_runtime_enable(&pdev->dev);
  382. pm_suspend_ignore_children(&pdev->dev, 1);
  383. ret = sdhci_add_host(host);
  384. if (ret)
  385. goto err_add_host;
  386. if (host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ)
  387. device_init_wakeup(&pdev->dev, 1);
  388. pm_runtime_put_autosuspend(&pdev->dev);
  389. return 0;
  390. err_add_host:
  391. pm_runtime_disable(&pdev->dev);
  392. pm_runtime_put_noidle(&pdev->dev);
  393. err_of_parse:
  394. err_mbus_win:
  395. clk_disable_unprepare(pxa->clk_io);
  396. clk_disable_unprepare(pxa->clk_core);
  397. err_clk_get:
  398. sdhci_pltfm_free(pdev);
  399. return ret;
  400. }
  401. static int sdhci_pxav3_remove(struct platform_device *pdev)
  402. {
  403. struct sdhci_host *host = platform_get_drvdata(pdev);
  404. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  405. struct sdhci_pxa *pxa = sdhci_pltfm_priv(pltfm_host);
  406. pm_runtime_get_sync(&pdev->dev);
  407. pm_runtime_disable(&pdev->dev);
  408. pm_runtime_put_noidle(&pdev->dev);
  409. sdhci_remove_host(host, 1);
  410. clk_disable_unprepare(pxa->clk_io);
  411. clk_disable_unprepare(pxa->clk_core);
  412. sdhci_pltfm_free(pdev);
  413. return 0;
  414. }
  415. #ifdef CONFIG_PM_SLEEP
  416. static int sdhci_pxav3_suspend(struct device *dev)
  417. {
  418. int ret;
  419. struct sdhci_host *host = dev_get_drvdata(dev);
  420. pm_runtime_get_sync(dev);
  421. if (host->tuning_mode != SDHCI_TUNING_MODE_3)
  422. mmc_retune_needed(host->mmc);
  423. ret = sdhci_suspend_host(host);
  424. pm_runtime_mark_last_busy(dev);
  425. pm_runtime_put_autosuspend(dev);
  426. return ret;
  427. }
  428. static int sdhci_pxav3_resume(struct device *dev)
  429. {
  430. int ret;
  431. struct sdhci_host *host = dev_get_drvdata(dev);
  432. pm_runtime_get_sync(dev);
  433. ret = sdhci_resume_host(host);
  434. pm_runtime_mark_last_busy(dev);
  435. pm_runtime_put_autosuspend(dev);
  436. return ret;
  437. }
  438. #endif
  439. #ifdef CONFIG_PM
  440. static int sdhci_pxav3_runtime_suspend(struct device *dev)
  441. {
  442. struct sdhci_host *host = dev_get_drvdata(dev);
  443. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  444. struct sdhci_pxa *pxa = sdhci_pltfm_priv(pltfm_host);
  445. int ret;
  446. ret = sdhci_runtime_suspend_host(host);
  447. if (ret)
  448. return ret;
  449. if (host->tuning_mode != SDHCI_TUNING_MODE_3)
  450. mmc_retune_needed(host->mmc);
  451. clk_disable_unprepare(pxa->clk_io);
  452. if (!IS_ERR(pxa->clk_core))
  453. clk_disable_unprepare(pxa->clk_core);
  454. return 0;
  455. }
  456. static int sdhci_pxav3_runtime_resume(struct device *dev)
  457. {
  458. struct sdhci_host *host = dev_get_drvdata(dev);
  459. struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
  460. struct sdhci_pxa *pxa = sdhci_pltfm_priv(pltfm_host);
  461. clk_prepare_enable(pxa->clk_io);
  462. if (!IS_ERR(pxa->clk_core))
  463. clk_prepare_enable(pxa->clk_core);
  464. return sdhci_runtime_resume_host(host, 0);
  465. }
  466. #endif
  467. static const struct dev_pm_ops sdhci_pxav3_pmops = {
  468. SET_SYSTEM_SLEEP_PM_OPS(sdhci_pxav3_suspend, sdhci_pxav3_resume)
  469. SET_RUNTIME_PM_OPS(sdhci_pxav3_runtime_suspend,
  470. sdhci_pxav3_runtime_resume, NULL)
  471. };
  472. static struct platform_driver sdhci_pxav3_driver = {
  473. .driver = {
  474. .name = "sdhci-pxav3",
  475. .probe_type = PROBE_PREFER_ASYNCHRONOUS,
  476. .of_match_table = of_match_ptr(sdhci_pxav3_of_match),
  477. .pm = &sdhci_pxav3_pmops,
  478. },
  479. .probe = sdhci_pxav3_probe,
  480. .remove = sdhci_pxav3_remove,
  481. };
  482. module_platform_driver(sdhci_pxav3_driver);
  483. MODULE_DESCRIPTION("SDHCI driver for pxav3");
  484. MODULE_AUTHOR("Marvell International Ltd.");
  485. MODULE_LICENSE("GPL v2");