1*f707079dSWolfram Sang // SPDX-License-Identifier: GPL-2.0 22a68ea78SSimon Horman /* 32a68ea78SSimon Horman * DMA support for Internal DMAC with SDHI SD/SDIO controller 42a68ea78SSimon Horman * 52a68ea78SSimon Horman * Copyright (C) 2016-17 Renesas Electronics Corporation 62a68ea78SSimon Horman * Copyright (C) 2016-17 Horms Solutions, Simon Horman 72a68ea78SSimon Horman */ 82a68ea78SSimon Horman 90cbc94daSWolfram Sang #include <linux/bitops.h> 102a68ea78SSimon Horman #include <linux/device.h> 112a68ea78SSimon Horman #include <linux/dma-mapping.h> 122a68ea78SSimon Horman #include <linux/io-64-nonatomic-hi-lo.h> 132a68ea78SSimon Horman #include <linux/mfd/tmio.h> 142a68ea78SSimon Horman #include <linux/mmc/host.h> 152a68ea78SSimon Horman #include <linux/mod_devicetable.h> 162a68ea78SSimon Horman #include <linux/module.h> 172a68ea78SSimon Horman #include <linux/pagemap.h> 182a68ea78SSimon Horman #include <linux/scatterlist.h> 19cd09780fSSimon Horman #include <linux/sys_soc.h> 202a68ea78SSimon Horman 212a68ea78SSimon Horman #include "renesas_sdhi.h" 222a68ea78SSimon Horman #include "tmio_mmc.h" 232a68ea78SSimon Horman 242a68ea78SSimon Horman #define DM_CM_DTRAN_MODE 0x820 252a68ea78SSimon Horman #define DM_CM_DTRAN_CTRL 0x828 262a68ea78SSimon Horman #define DM_CM_RST 0x830 272a68ea78SSimon Horman #define DM_CM_INFO1 0x840 282a68ea78SSimon Horman #define DM_CM_INFO1_MASK 0x848 292a68ea78SSimon Horman #define DM_CM_INFO2 0x850 302a68ea78SSimon Horman #define DM_CM_INFO2_MASK 0x858 312a68ea78SSimon Horman #define DM_DTRAN_ADDR 0x880 322a68ea78SSimon Horman 332a68ea78SSimon Horman /* DM_CM_DTRAN_MODE */ 342a68ea78SSimon Horman #define DTRAN_MODE_CH_NUM_CH0 0 /* "downstream" = for write commands */ 35c1ec8f86SSergei Shtylyov #define DTRAN_MODE_CH_NUM_CH1 BIT(16) /* "upstream" = for read commands */ 36c1ec8f86SSergei Shtylyov #define DTRAN_MODE_BUS_WIDTH (BIT(5) | BIT(4)) 372a68ea78SSimon Horman #define DTRAN_MODE_ADDR_MODE BIT(0) /* 1 = Increment address */ 382a68ea78SSimon Horman 392a68ea78SSimon Horman /* DM_CM_DTRAN_CTRL */ 402a68ea78SSimon Horman #define DTRAN_CTRL_DM_START BIT(0) 412a68ea78SSimon Horman 422a68ea78SSimon Horman /* DM_CM_RST */ 432a68ea78SSimon Horman #define RST_DTRANRST1 BIT(9) 442a68ea78SSimon Horman #define RST_DTRANRST0 BIT(8) 459faf870eSSergei Shtylyov #define RST_RESERVED_BITS GENMASK_ULL(31, 0) 462a68ea78SSimon Horman 472a68ea78SSimon Horman /* DM_CM_INFO1 and DM_CM_INFO1_MASK */ 482a68ea78SSimon Horman #define INFO1_CLEAR 0 49d2332f88SSergei Shtylyov #define INFO1_MASK_CLEAR GENMASK_ULL(31, 0) 502a68ea78SSimon Horman #define INFO1_DTRANEND1 BIT(17) 512a68ea78SSimon Horman #define INFO1_DTRANEND0 BIT(16) 522a68ea78SSimon Horman 532a68ea78SSimon Horman /* DM_CM_INFO2 and DM_CM_INFO2_MASK */ 54d2332f88SSergei Shtylyov #define INFO2_MASK_CLEAR GENMASK_ULL(31, 0) 552a68ea78SSimon Horman #define INFO2_DTRANERR1 BIT(17) 562a68ea78SSimon Horman #define INFO2_DTRANERR0 BIT(16) 572a68ea78SSimon Horman 582a68ea78SSimon Horman /* 592a68ea78SSimon Horman * Specification of this driver: 602a68ea78SSimon Horman * - host->chan_{rx,tx} will be used as a flag of enabling/disabling the dma 612a68ea78SSimon Horman * - Since this SDHI DMAC register set has 16 but 32-bit width, we 622a68ea78SSimon Horman * need a custom accessor. 632a68ea78SSimon Horman */ 642a68ea78SSimon Horman 650cbc94daSWolfram Sang static unsigned long global_flags; 660cbc94daSWolfram Sang /* 670cbc94daSWolfram Sang * Workaround for avoiding to use RX DMAC by multiple channels. 680cbc94daSWolfram Sang * On R-Car H3 ES1.* and M3-W ES1.0, when multiple SDHI channels use 690cbc94daSWolfram Sang * RX DMAC simultaneously, sometimes hundreds of bytes data are not 700cbc94daSWolfram Sang * stored into the system memory even if the DMAC interrupt happened. 710cbc94daSWolfram Sang * So, this driver then uses one RX DMAC channel only. 720cbc94daSWolfram Sang */ 730cbc94daSWolfram Sang #define SDHI_INTERNAL_DMAC_ONE_RX_ONLY 0 740cbc94daSWolfram Sang #define SDHI_INTERNAL_DMAC_RX_IN_USE 1 750cbc94daSWolfram Sang 762a68ea78SSimon Horman /* Definitions for sampling clocks */ 772a68ea78SSimon Horman static struct renesas_sdhi_scc rcar_gen3_scc_taps[] = { 782a68ea78SSimon Horman { 792a68ea78SSimon Horman .clk_rate = 0, 802a68ea78SSimon Horman .tap = 0x00000300, 812a68ea78SSimon Horman }, 822a68ea78SSimon Horman }; 832a68ea78SSimon Horman 8426eb2607SMasaharu Hayakawa static const struct renesas_sdhi_of_data of_rcar_r8a7795_compatible = { 8526eb2607SMasaharu Hayakawa .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_CLK_ACTUAL | 8626eb2607SMasaharu Hayakawa TMIO_MMC_HAVE_CBSY | TMIO_MMC_MIN_RCAR2 | 8726eb2607SMasaharu Hayakawa TMIO_MMC_HAVE_4TAP_HS400, 8826eb2607SMasaharu Hayakawa .capabilities = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | 8926eb2607SMasaharu Hayakawa MMC_CAP_CMD23, 9026eb2607SMasaharu Hayakawa .capabilities2 = MMC_CAP2_NO_WRITE_PROTECT, 9126eb2607SMasaharu Hayakawa .bus_shift = 2, 9226eb2607SMasaharu Hayakawa .scc_offset = 0x1000, 9326eb2607SMasaharu Hayakawa .taps = rcar_gen3_scc_taps, 9426eb2607SMasaharu Hayakawa .taps_num = ARRAY_SIZE(rcar_gen3_scc_taps), 9526eb2607SMasaharu Hayakawa /* DMAC can handle 0xffffffff blk count but only 1 segment */ 9626eb2607SMasaharu Hayakawa .max_blk_count = 0xffffffff, 9726eb2607SMasaharu Hayakawa .max_segs = 1, 9826eb2607SMasaharu Hayakawa }; 9926eb2607SMasaharu Hayakawa 1002a68ea78SSimon Horman static const struct renesas_sdhi_of_data of_rcar_gen3_compatible = { 1012ad1db05SMasahiro Yamada .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_CLK_ACTUAL | 1022ad1db05SMasahiro Yamada TMIO_MMC_HAVE_CBSY | TMIO_MMC_MIN_RCAR2, 1032a68ea78SSimon Horman .capabilities = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | 1042a68ea78SSimon Horman MMC_CAP_CMD23, 105ef5332c1SWolfram Sang .capabilities2 = MMC_CAP2_NO_WRITE_PROTECT, 1062a68ea78SSimon Horman .bus_shift = 2, 1072a68ea78SSimon Horman .scc_offset = 0x1000, 1082a68ea78SSimon Horman .taps = rcar_gen3_scc_taps, 1092a68ea78SSimon Horman .taps_num = ARRAY_SIZE(rcar_gen3_scc_taps), 110ebca50dfSWolfram Sang /* DMAC can handle 0xffffffff blk count but only 1 segment */ 1112a68ea78SSimon Horman .max_blk_count = 0xffffffff, 1122a68ea78SSimon Horman .max_segs = 1, 1132a68ea78SSimon Horman }; 1142a68ea78SSimon Horman 1152a68ea78SSimon Horman static const struct of_device_id renesas_sdhi_internal_dmac_of_match[] = { 11626eb2607SMasaharu Hayakawa { .compatible = "renesas,sdhi-r8a7795", .data = &of_rcar_r8a7795_compatible, }, 11726eb2607SMasaharu Hayakawa { .compatible = "renesas,sdhi-r8a7796", .data = &of_rcar_r8a7795_compatible, }, 118d6dc425aSSimon Horman { .compatible = "renesas,rcar-gen3-sdhi", .data = &of_rcar_gen3_compatible, }, 1192a68ea78SSimon Horman {}, 1202a68ea78SSimon Horman }; 1212a68ea78SSimon Horman MODULE_DEVICE_TABLE(of, renesas_sdhi_internal_dmac_of_match); 1222a68ea78SSimon Horman 1232a68ea78SSimon Horman static void 1242a68ea78SSimon Horman renesas_sdhi_internal_dmac_dm_write(struct tmio_mmc_host *host, 1252a68ea78SSimon Horman int addr, u64 val) 1262a68ea78SSimon Horman { 1272a68ea78SSimon Horman writeq(val, host->ctl + addr); 1282a68ea78SSimon Horman } 1292a68ea78SSimon Horman 1302a68ea78SSimon Horman static void 1312a68ea78SSimon Horman renesas_sdhi_internal_dmac_enable_dma(struct tmio_mmc_host *host, bool enable) 1322a68ea78SSimon Horman { 133058db286SMasahiro Yamada struct renesas_sdhi *priv = host_to_priv(host); 134058db286SMasahiro Yamada 1352a68ea78SSimon Horman if (!host->chan_tx || !host->chan_rx) 1362a68ea78SSimon Horman return; 1372a68ea78SSimon Horman 1382a68ea78SSimon Horman if (!enable) 1392a68ea78SSimon Horman renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO1, 1402a68ea78SSimon Horman INFO1_CLEAR); 1412a68ea78SSimon Horman 142058db286SMasahiro Yamada if (priv->dma_priv.enable) 143058db286SMasahiro Yamada priv->dma_priv.enable(host, enable); 1442a68ea78SSimon Horman } 1452a68ea78SSimon Horman 1462a68ea78SSimon Horman static void 1472a68ea78SSimon Horman renesas_sdhi_internal_dmac_abort_dma(struct tmio_mmc_host *host) { 1482a68ea78SSimon Horman u64 val = RST_DTRANRST1 | RST_DTRANRST0; 1492a68ea78SSimon Horman 1502a68ea78SSimon Horman renesas_sdhi_internal_dmac_enable_dma(host, false); 1512a68ea78SSimon Horman 1522a68ea78SSimon Horman renesas_sdhi_internal_dmac_dm_write(host, DM_CM_RST, 1532a68ea78SSimon Horman RST_RESERVED_BITS & ~val); 1542a68ea78SSimon Horman renesas_sdhi_internal_dmac_dm_write(host, DM_CM_RST, 1552a68ea78SSimon Horman RST_RESERVED_BITS | val); 1562a68ea78SSimon Horman 1570cbc94daSWolfram Sang clear_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags); 1580cbc94daSWolfram Sang 1592a68ea78SSimon Horman renesas_sdhi_internal_dmac_enable_dma(host, true); 1602a68ea78SSimon Horman } 1612a68ea78SSimon Horman 1622a68ea78SSimon Horman static void 1632a68ea78SSimon Horman renesas_sdhi_internal_dmac_dataend_dma(struct tmio_mmc_host *host) { 16490d95106SMasahiro Yamada struct renesas_sdhi *priv = host_to_priv(host); 16590d95106SMasahiro Yamada 16690d95106SMasahiro Yamada tasklet_schedule(&priv->dma_priv.dma_complete); 1672a68ea78SSimon Horman } 1682a68ea78SSimon Horman 1692a68ea78SSimon Horman static void 1702a68ea78SSimon Horman renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host, 1712a68ea78SSimon Horman struct mmc_data *data) 1722a68ea78SSimon Horman { 1732a68ea78SSimon Horman struct scatterlist *sg = host->sg_ptr; 174c1ec8f86SSergei Shtylyov u32 dtran_mode = DTRAN_MODE_BUS_WIDTH | DTRAN_MODE_ADDR_MODE; 1752a68ea78SSimon Horman 176ae275b9dSMasaharu Hayakawa if (!dma_map_sg(&host->pdev->dev, sg, host->sg_len, 177ae275b9dSMasaharu Hayakawa mmc_get_dma_dir(data))) 17848e1dc10SYoshihiro Shimoda goto force_pio; 1792a68ea78SSimon Horman 180ae275b9dSMasaharu Hayakawa /* This DMAC cannot handle if buffer is not 8-bytes alignment */ 181fe6e0494SYoshihiro Shimoda if (!IS_ALIGNED(sg_dma_address(sg), 8)) 182fe6e0494SYoshihiro Shimoda goto force_pio_with_unmap; 183ae275b9dSMasaharu Hayakawa 1842a68ea78SSimon Horman if (data->flags & MMC_DATA_READ) { 1852a68ea78SSimon Horman dtran_mode |= DTRAN_MODE_CH_NUM_CH1; 1860cbc94daSWolfram Sang if (test_bit(SDHI_INTERNAL_DMAC_ONE_RX_ONLY, &global_flags) && 1870cbc94daSWolfram Sang test_and_set_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags)) 188fe6e0494SYoshihiro Shimoda goto force_pio_with_unmap; 1892a68ea78SSimon Horman } else { 1902a68ea78SSimon Horman dtran_mode |= DTRAN_MODE_CH_NUM_CH0; 1912a68ea78SSimon Horman } 1922a68ea78SSimon Horman 1932a68ea78SSimon Horman renesas_sdhi_internal_dmac_enable_dma(host, true); 1942a68ea78SSimon Horman 1952a68ea78SSimon Horman /* set dma parameters */ 1962a68ea78SSimon Horman renesas_sdhi_internal_dmac_dm_write(host, DM_CM_DTRAN_MODE, 1972a68ea78SSimon Horman dtran_mode); 1982a68ea78SSimon Horman renesas_sdhi_internal_dmac_dm_write(host, DM_DTRAN_ADDR, 199a028b435SNiklas Söderlund sg_dma_address(sg)); 20048e1dc10SYoshihiro Shimoda 20148e1dc10SYoshihiro Shimoda return; 20248e1dc10SYoshihiro Shimoda 203fe6e0494SYoshihiro Shimoda force_pio_with_unmap: 204fe6e0494SYoshihiro Shimoda dma_unmap_sg(&host->pdev->dev, sg, host->sg_len, mmc_get_dma_dir(data)); 205fe6e0494SYoshihiro Shimoda 20648e1dc10SYoshihiro Shimoda force_pio: 20748e1dc10SYoshihiro Shimoda host->force_pio = true; 20848e1dc10SYoshihiro Shimoda renesas_sdhi_internal_dmac_enable_dma(host, false); 2092a68ea78SSimon Horman } 2102a68ea78SSimon Horman 2112a68ea78SSimon Horman static void renesas_sdhi_internal_dmac_issue_tasklet_fn(unsigned long arg) 2122a68ea78SSimon Horman { 2132a68ea78SSimon Horman struct tmio_mmc_host *host = (struct tmio_mmc_host *)arg; 2142a68ea78SSimon Horman 2152a68ea78SSimon Horman tmio_mmc_enable_mmc_irqs(host, TMIO_STAT_DATAEND); 2162a68ea78SSimon Horman 2172a68ea78SSimon Horman /* start the DMAC */ 2182a68ea78SSimon Horman renesas_sdhi_internal_dmac_dm_write(host, DM_CM_DTRAN_CTRL, 2192a68ea78SSimon Horman DTRAN_CTRL_DM_START); 2202a68ea78SSimon Horman } 2212a68ea78SSimon Horman 2222a68ea78SSimon Horman static void renesas_sdhi_internal_dmac_complete_tasklet_fn(unsigned long arg) 2232a68ea78SSimon Horman { 2242a68ea78SSimon Horman struct tmio_mmc_host *host = (struct tmio_mmc_host *)arg; 2252a68ea78SSimon Horman enum dma_data_direction dir; 2262a68ea78SSimon Horman 2272a68ea78SSimon Horman spin_lock_irq(&host->lock); 2282a68ea78SSimon Horman 2292a68ea78SSimon Horman if (!host->data) 2302a68ea78SSimon Horman goto out; 2312a68ea78SSimon Horman 2322a68ea78SSimon Horman if (host->data->flags & MMC_DATA_READ) 2332a68ea78SSimon Horman dir = DMA_FROM_DEVICE; 2342a68ea78SSimon Horman else 2352a68ea78SSimon Horman dir = DMA_TO_DEVICE; 2362a68ea78SSimon Horman 2372a68ea78SSimon Horman renesas_sdhi_internal_dmac_enable_dma(host, false); 2382a68ea78SSimon Horman dma_unmap_sg(&host->pdev->dev, host->sg_ptr, host->sg_len, dir); 2392a68ea78SSimon Horman 2400cbc94daSWolfram Sang if (dir == DMA_FROM_DEVICE) 2410cbc94daSWolfram Sang clear_bit(SDHI_INTERNAL_DMAC_RX_IN_USE, &global_flags); 2420cbc94daSWolfram Sang 2432a68ea78SSimon Horman tmio_mmc_do_data_irq(host); 2442a68ea78SSimon Horman out: 2452a68ea78SSimon Horman spin_unlock_irq(&host->lock); 2462a68ea78SSimon Horman } 2472a68ea78SSimon Horman 2482a68ea78SSimon Horman static void 2492a68ea78SSimon Horman renesas_sdhi_internal_dmac_request_dma(struct tmio_mmc_host *host, 2502a68ea78SSimon Horman struct tmio_mmc_data *pdata) 2512a68ea78SSimon Horman { 25290d95106SMasahiro Yamada struct renesas_sdhi *priv = host_to_priv(host); 25390d95106SMasahiro Yamada 254d2332f88SSergei Shtylyov /* Disable DMAC interrupts, we don't use them */ 255d2332f88SSergei Shtylyov renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO1_MASK, 256d2332f88SSergei Shtylyov INFO1_MASK_CLEAR); 257d2332f88SSergei Shtylyov renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO2_MASK, 258d2332f88SSergei Shtylyov INFO2_MASK_CLEAR); 259d2332f88SSergei Shtylyov 2602a68ea78SSimon Horman /* Each value is set to non-zero to assume "enabling" each DMA */ 2612a68ea78SSimon Horman host->chan_rx = host->chan_tx = (void *)0xdeadbeaf; 2622a68ea78SSimon Horman 26390d95106SMasahiro Yamada tasklet_init(&priv->dma_priv.dma_complete, 2642a68ea78SSimon Horman renesas_sdhi_internal_dmac_complete_tasklet_fn, 2652a68ea78SSimon Horman (unsigned long)host); 2662a68ea78SSimon Horman tasklet_init(&host->dma_issue, 2672a68ea78SSimon Horman renesas_sdhi_internal_dmac_issue_tasklet_fn, 2682a68ea78SSimon Horman (unsigned long)host); 2692a68ea78SSimon Horman } 2702a68ea78SSimon Horman 2712a68ea78SSimon Horman static void 2722a68ea78SSimon Horman renesas_sdhi_internal_dmac_release_dma(struct tmio_mmc_host *host) 2732a68ea78SSimon Horman { 2742a68ea78SSimon Horman /* Each value is set to zero to assume "disabling" each DMA */ 2752a68ea78SSimon Horman host->chan_rx = host->chan_tx = NULL; 2762a68ea78SSimon Horman } 2772a68ea78SSimon Horman 27810154068SJulia Lawall static const struct tmio_mmc_dma_ops renesas_sdhi_internal_dmac_dma_ops = { 2792a68ea78SSimon Horman .start = renesas_sdhi_internal_dmac_start_dma, 2802a68ea78SSimon Horman .enable = renesas_sdhi_internal_dmac_enable_dma, 2812a68ea78SSimon Horman .request = renesas_sdhi_internal_dmac_request_dma, 2822a68ea78SSimon Horman .release = renesas_sdhi_internal_dmac_release_dma, 2832a68ea78SSimon Horman .abort = renesas_sdhi_internal_dmac_abort_dma, 2842a68ea78SSimon Horman .dataend = renesas_sdhi_internal_dmac_dataend_dma, 2852a68ea78SSimon Horman }; 2862a68ea78SSimon Horman 287cd09780fSSimon Horman /* 288cd09780fSSimon Horman * Whitelist of specific R-Car Gen3 SoC ES versions to use this DMAC 289cd09780fSSimon Horman * implementation as others may use a different implementation. 290cd09780fSSimon Horman */ 291cd09780fSSimon Horman static const struct soc_device_attribute gen3_soc_whitelist[] = { 2921abf9e52SWolfram Sang /* specific ones */ 2930cbc94daSWolfram Sang { .soc_id = "r8a7795", .revision = "ES1.*", 2940cbc94daSWolfram Sang .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) }, 2950cbc94daSWolfram Sang { .soc_id = "r8a7796", .revision = "ES1.0", 2960cbc94daSWolfram Sang .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) }, 2971abf9e52SWolfram Sang /* generic ones */ 2982e1501a8SFabrizio Castro { .soc_id = "r8a774a1" }, 2991abf9e52SWolfram Sang { .soc_id = "r8a7795" }, 3001abf9e52SWolfram Sang { .soc_id = "r8a7796" }, 301caeffcf1SMasaharu Hayakawa { .soc_id = "r8a77965" }, 30216a129b3SSergei Shtylyov { .soc_id = "r8a77970" }, 303e419768fSSergei Shtylyov { .soc_id = "r8a77980" }, 3041abf9e52SWolfram Sang { .soc_id = "r8a77995" }, 305cd09780fSSimon Horman { /* sentinel */ } 306cd09780fSSimon Horman }; 307cd09780fSSimon Horman 3082a68ea78SSimon Horman static int renesas_sdhi_internal_dmac_probe(struct platform_device *pdev) 3092a68ea78SSimon Horman { 3100cbc94daSWolfram Sang const struct soc_device_attribute *soc = soc_device_match(gen3_soc_whitelist); 3110cbc94daSWolfram Sang 3120cbc94daSWolfram Sang if (!soc) 313cd09780fSSimon Horman return -ENODEV; 314cd09780fSSimon Horman 3150cbc94daSWolfram Sang global_flags |= (unsigned long)soc->data; 3160cbc94daSWolfram Sang 3172a68ea78SSimon Horman return renesas_sdhi_probe(pdev, &renesas_sdhi_internal_dmac_dma_ops); 3182a68ea78SSimon Horman } 3192a68ea78SSimon Horman 3202a68ea78SSimon Horman static const struct dev_pm_ops renesas_sdhi_internal_dmac_dev_pm_ops = { 3212a68ea78SSimon Horman SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 3222a68ea78SSimon Horman pm_runtime_force_resume) 3232a68ea78SSimon Horman SET_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend, 3242a68ea78SSimon Horman tmio_mmc_host_runtime_resume, 3252a68ea78SSimon Horman NULL) 3262a68ea78SSimon Horman }; 3272a68ea78SSimon Horman 3282a68ea78SSimon Horman static struct platform_driver renesas_internal_dmac_sdhi_driver = { 3292a68ea78SSimon Horman .driver = { 3302a68ea78SSimon Horman .name = "renesas_sdhi_internal_dmac", 3312a68ea78SSimon Horman .pm = &renesas_sdhi_internal_dmac_dev_pm_ops, 3322a68ea78SSimon Horman .of_match_table = renesas_sdhi_internal_dmac_of_match, 3332a68ea78SSimon Horman }, 3342a68ea78SSimon Horman .probe = renesas_sdhi_internal_dmac_probe, 3352a68ea78SSimon Horman .remove = renesas_sdhi_remove, 3362a68ea78SSimon Horman }; 3372a68ea78SSimon Horman 3382a68ea78SSimon Horman module_platform_driver(renesas_internal_dmac_sdhi_driver); 3392a68ea78SSimon Horman 3402a68ea78SSimon Horman MODULE_DESCRIPTION("Renesas SDHI driver for internal DMAC"); 3412a68ea78SSimon Horman MODULE_AUTHOR("Yoshihiro Shimoda"); 3422a68ea78SSimon Horman MODULE_LICENSE("GPL v2"); 343