From 5b7cdc8068e3f02ff4c6ef75bd7398af244869d4 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 17 Feb 2015 01:48:08 +0000 Subject: ASoC: fsi: remove slave_id settings for DMAEngine Current fsi sets dma_slave_config :: slave_id field for DMAEngine, but it is no longer needed. Let's remove it. Signed-off-by: Kuninori Morimoto Acked-by: Mark Brown Signed-off-by: Vinod Koul --- sound/soc/sh/fsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sound/soc/sh/fsi.c') diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index b87b22e88e43..dc28b03db6e5 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1371,10 +1371,9 @@ static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct dev shdma_chan_filter, (void *)io->dma_id, dev, is_play ? "tx" : "rx"); if (io->chan) { - struct dma_slave_config cfg; + struct dma_slave_config cfg = {}; int ret; - cfg.slave_id = io->dma_id; cfg.dst_addr = 0; /* use default addr */ cfg.src_addr = 0; /* use default addr */ cfg.direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; -- cgit v1.2.3-59-g8ed1b From 7c6cc8f2012f4146b05b8ec7238f98884100db8c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 17 Feb 2015 01:48:19 +0000 Subject: ASoC: fsi: Configure DMA slave settings Current FSI driver is assuming that dst_addr/src_addr of DMAEngine will be set by platform data. But it should be set via dmaengine_slave_config(). Special thanks to Arnd Reported-by: Arnd Bergmann Signed-off-by: Kuninori Morimoto Acked-by: Mark Brown Signed-off-by: Vinod Koul --- sound/soc/sh/fsi.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'sound/soc/sh/fsi.c') diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index dc28b03db6e5..bb20550b007c 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -250,6 +250,7 @@ struct fsi_clk { struct fsi_priv { void __iomem *base; + phys_addr_t phys; struct fsi_master *master; struct fsi_stream playback; @@ -1374,9 +1375,15 @@ static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct dev struct dma_slave_config cfg = {}; int ret; - cfg.dst_addr = 0; /* use default addr */ - cfg.src_addr = 0; /* use default addr */ - cfg.direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; + if (is_play) { + cfg.dst_addr = fsi->phys + REG_DODT; + cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.direction = DMA_MEM_TO_DEV; + } else { + cfg.src_addr = fsi->phys + REG_DIDT; + cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; + cfg.direction = DMA_DEV_TO_MEM; + } ret = dmaengine_slave_config(io->chan, &cfg); if (ret < 0) { @@ -1940,6 +1947,7 @@ static int fsi_probe(struct platform_device *pdev) /* FSI A setting */ fsi = &master->fsia; fsi->base = master->base; + fsi->phys = res->start; fsi->master = master; fsi_port_info_init(fsi, &info.port_a); fsi_handler_init(fsi, &info.port_a); @@ -1952,6 +1960,7 @@ static int fsi_probe(struct platform_device *pdev) /* FSI B setting */ fsi = &master->fsib; fsi->base = master->base + 0x40; + fsi->phys = res->start + 0x40; fsi->master = master; fsi_port_info_init(fsi, &info.port_b); fsi_handler_init(fsi, &info.port_b); -- cgit v1.2.3-59-g8ed1b