.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * MMCIF eMMC driver. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2010 Renesas Solutions Corp. |
---|
5 | 6 | * Yusuke Goda <yusuke.goda.sx@renesas.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License as published by |
---|
9 | | - * the Free Software Foundation; either version 2 of the License. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | /* |
---|
.. | .. |
---|
194 | 191 | STS2_AC12BSYTO | STS2_RSPBSYTO | \ |
---|
195 | 192 | STS2_AC12RSPTO | STS2_RSPTO) |
---|
196 | 193 | |
---|
197 | | -#define CLKDEV_EMMC_DATA 52000000 /* 52MHz */ |
---|
198 | | -#define CLKDEV_MMC_DATA 20000000 /* 20MHz */ |
---|
199 | | -#define CLKDEV_INIT 400000 /* 400 KHz */ |
---|
| 194 | +#define CLKDEV_EMMC_DATA 52000000 /* 52 MHz */ |
---|
| 195 | +#define CLKDEV_MMC_DATA 20000000 /* 20 MHz */ |
---|
| 196 | +#define CLKDEV_INIT 400000 /* 400 kHz */ |
---|
200 | 197 | |
---|
201 | 198 | enum sh_mmcif_state { |
---|
202 | 199 | STATE_IDLE, |
---|
.. | .. |
---|
435 | 432 | host->chan_rx = sh_mmcif_request_dma_pdata(host, |
---|
436 | 433 | pdata->slave_id_rx); |
---|
437 | 434 | } else { |
---|
438 | | - host->chan_tx = dma_request_slave_channel(dev, "tx"); |
---|
439 | | - host->chan_rx = dma_request_slave_channel(dev, "rx"); |
---|
| 435 | + host->chan_tx = dma_request_chan(dev, "tx"); |
---|
| 436 | + if (IS_ERR(host->chan_tx)) |
---|
| 437 | + host->chan_tx = NULL; |
---|
| 438 | + host->chan_rx = dma_request_chan(dev, "rx"); |
---|
| 439 | + if (IS_ERR(host->chan_rx)) |
---|
| 440 | + host->chan_rx = NULL; |
---|
440 | 441 | } |
---|
441 | 442 | dev_dbg(dev, "%s: got channel TX %p RX %p\n", __func__, host->chan_tx, |
---|
442 | 443 | host->chan_rx); |
---|
.. | .. |
---|
1391 | 1392 | struct sh_mmcif_host *host; |
---|
1392 | 1393 | struct device *dev = &pdev->dev; |
---|
1393 | 1394 | struct sh_mmcif_plat_data *pd = dev->platform_data; |
---|
1394 | | - struct resource *res; |
---|
1395 | 1395 | void __iomem *reg; |
---|
1396 | 1396 | const char *name; |
---|
1397 | 1397 | |
---|
1398 | 1398 | irq[0] = platform_get_irq(pdev, 0); |
---|
1399 | | - irq[1] = platform_get_irq(pdev, 1); |
---|
1400 | | - if (irq[0] < 0) { |
---|
1401 | | - dev_err(dev, "Get irq error\n"); |
---|
| 1399 | + irq[1] = platform_get_irq_optional(pdev, 1); |
---|
| 1400 | + if (irq[0] < 0) |
---|
1402 | 1401 | return -ENXIO; |
---|
1403 | | - } |
---|
1404 | 1402 | |
---|
1405 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
1406 | | - reg = devm_ioremap_resource(dev, res); |
---|
| 1403 | + reg = devm_platform_ioremap_resource(pdev, 0); |
---|
1407 | 1404 | if (IS_ERR(reg)) |
---|
1408 | 1405 | return PTR_ERR(reg); |
---|
1409 | 1406 | |
---|
.. | .. |
---|
1574 | 1571 | module_platform_driver(sh_mmcif_driver); |
---|
1575 | 1572 | |
---|
1576 | 1573 | MODULE_DESCRIPTION("SuperH on-chip MMC/eMMC interface driver"); |
---|
1577 | | -MODULE_LICENSE("GPL"); |
---|
| 1574 | +MODULE_LICENSE("GPL v2"); |
---|
1578 | 1575 | MODULE_ALIAS("platform:" DRIVER_NAME); |
---|
1579 | 1576 | MODULE_AUTHOR("Yusuke Goda <yusuke.goda.sx@renesas.com>"); |
---|