projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'v3.14.25' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
drivers
/
mmc
/
host
/
sh_mmcif.c
diff --git
a/drivers/mmc/host/sh_mmcif.c
b/drivers/mmc/host/sh_mmcif.c
index
a0776ce
..
d11708c
100644
(file)
--- a/
drivers/mmc/host/sh_mmcif.c
+++ b/
drivers/mmc/host/sh_mmcif.c
@@
-386,7
+386,7
@@
sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
struct sh_mmcif_plat_data *pdata,
enum dma_transfer_direction direction)
{
struct sh_mmcif_plat_data *pdata,
enum dma_transfer_direction direction)
{
- struct dma_slave_config cfg;
+ struct dma_slave_config cfg
= { 0, }
;
struct dma_chan *chan;
unsigned int slave_id;
struct resource *res;
struct dma_chan *chan;
unsigned int slave_id;
struct resource *res;
@@
-417,8
+417,15
@@
sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
/* In the OF case the driver will get the slave ID from the DT */
cfg.slave_id = slave_id;
cfg.direction = direction;
/* In the OF case the driver will get the slave ID from the DT */
cfg.slave_id = slave_id;
cfg.direction = direction;
- cfg.dst_addr = res->start + MMCIF_CE_DATA;
- cfg.src_addr = 0;
+
+ if (direction == DMA_DEV_TO_MEM) {
+ cfg.src_addr = res->start + MMCIF_CE_DATA;
+ cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+ } else {
+ cfg.dst_addr = res->start + MMCIF_CE_DATA;
+ cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+ }
+
ret = dmaengine_slave_config(chan, &cfg);
if (ret < 0) {
dma_release_channel(chan);
ret = dmaengine_slave_config(chan, &cfg);
if (ret < 0) {
dma_release_channel(chan);
@@
-1444,7
+1451,7
@@
static int sh_mmcif_probe(struct platform_device *pdev)
sh_mmcif_irqt, 0, name, host);
if (ret) {
dev_err(&pdev->dev, "request_irq error (%s)\n", name);
sh_mmcif_irqt, 0, name, host);
if (ret) {
dev_err(&pdev->dev, "request_irq error (%s)\n", name);
- goto err_
irq
;
+ goto err_
clk
;
}
if (irq[1] >= 0) {
ret = devm_request_threaded_irq(&pdev->dev, irq[1],
}
if (irq[1] >= 0) {
ret = devm_request_threaded_irq(&pdev->dev, irq[1],
@@
-1452,21
+1459,21
@@
static int sh_mmcif_probe(struct platform_device *pdev)
0, "sh_mmc:int", host);
if (ret) {
dev_err(&pdev->dev, "request_irq error (sh_mmc:int)\n");
0, "sh_mmc:int", host);
if (ret) {
dev_err(&pdev->dev, "request_irq error (sh_mmc:int)\n");
- goto err_
irq
;
+ goto err_
clk
;
}
}
if (pd && pd->use_cd_gpio) {
ret = mmc_gpio_request_cd(mmc, pd->cd_gpio, 0);
if (ret < 0)
}
}
if (pd && pd->use_cd_gpio) {
ret = mmc_gpio_request_cd(mmc, pd->cd_gpio, 0);
if (ret < 0)
- goto er
qcd
;
+ goto er
r_clk
;
}
mutex_init(&host->thread_lock);
ret = mmc_add_host(mmc);
if (ret < 0)
}
mutex_init(&host->thread_lock);
ret = mmc_add_host(mmc);
if (ret < 0)
- goto e
mmcaddh
;
+ goto e
rr_clk
;
dev_pm_qos_expose_latency_limit(&pdev->dev, 100);
dev_pm_qos_expose_latency_limit(&pdev->dev, 100);
@@
-1477,10
+1484,6
@@
static int sh_mmcif_probe(struct platform_device *pdev)
clk_disable_unprepare(host->hclk);
return ret;
clk_disable_unprepare(host->hclk);
return ret;
-emmcaddh:
-erqcd:
-err_irq:
- pm_runtime_suspend(&pdev->dev);
err_clk:
clk_disable_unprepare(host->hclk);
err_pm:
err_clk:
clk_disable_unprepare(host->hclk);
err_pm: