summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-09-10 13:55:12 -0400
committerMark Brown <broonie@kernel.org>2018-09-10 13:55:12 -0400
commit54a3da1c105ca91c4d32f25c3d9c57a61e9a3467 (patch)
tree5be69ff9ccab03760f2ae17cbaecbfea0b016087
parent1c8bc7b3de5e76cb89aacdc7be1475a028af505f (diff)
parent90a3b7f8aba3011badacd6d8121e03aa24ac79d1 (diff)
Merge branch 'asoc-4.19' into asoc-4.20 Cirrus conflict
-rw-r--r--MAINTAINERS3
-rw-r--r--sound/soc/amd/acp-pcm-dma.c21
-rw-r--r--sound/soc/sh/rcar/adg.c5
-rw-r--r--sound/soc/sh/rcar/core.c10
-rw-r--r--sound/soc/sh/rcar/dma.c4
5 files changed, 40 insertions, 3 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 161b26e05732..d3814c46d60a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13432,9 +13432,8 @@ F: drivers/i2c/busses/i2c-synquacer.c
13432F: Documentation/devicetree/bindings/i2c/i2c-synquacer.txt 13432F: Documentation/devicetree/bindings/i2c/i2c-synquacer.txt
13433 13433
13434SOCIONEXT UNIPHIER SOUND DRIVER 13434SOCIONEXT UNIPHIER SOUND DRIVER
13435M: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
13436L: alsa-devel@alsa-project.org (moderated for non-subscribers) 13435L: alsa-devel@alsa-project.org (moderated for non-subscribers)
13437S: Maintained 13436S: Orphan
13438F: sound/soc/uniphier/ 13437F: sound/soc/uniphier/
13439 13438
13440SOEKRIS NET48XX LED SUPPORT 13439SOEKRIS NET48XX LED SUPPORT
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 8f3bc6e37f26..c7e972b17c90 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/iopoll.h>
19#include <linux/sizes.h> 20#include <linux/sizes.h>
20#include <linux/pm_runtime.h> 21#include <linux/pm_runtime.h>
21 22
@@ -184,6 +185,24 @@ static void config_dma_descriptor_in_sram(void __iomem *acp_mmio,
184 acp_reg_write(descr_info->xfer_val, acp_mmio, mmACP_SRBM_Targ_Idx_Data); 185 acp_reg_write(descr_info->xfer_val, acp_mmio, mmACP_SRBM_Targ_Idx_Data);
185} 186}
186 187
188static void pre_config_reset(void __iomem *acp_mmio, u16 ch_num)
189{
190 u32 dma_ctrl;
191 int ret;
192
193 /* clear the reset bit */
194 dma_ctrl = acp_reg_read(acp_mmio, mmACP_DMA_CNTL_0 + ch_num);
195 dma_ctrl &= ~ACP_DMA_CNTL_0__DMAChRst_MASK;
196 acp_reg_write(dma_ctrl, acp_mmio, mmACP_DMA_CNTL_0 + ch_num);
197 /* check the reset bit before programming configuration registers */
198 ret = readl_poll_timeout(acp_mmio + ((mmACP_DMA_CNTL_0 + ch_num) * 4),
199 dma_ctrl,
200 !(dma_ctrl & ACP_DMA_CNTL_0__DMAChRst_MASK),
201 100, ACP_DMA_RESET_TIME);
202 if (ret < 0)
203 pr_err("Failed to clear reset of channel : %d\n", ch_num);
204}
205
187/* 206/*
188 * Initialize the DMA descriptor information for transfer between 207 * Initialize the DMA descriptor information for transfer between
189 * system memory <-> ACP SRAM 208 * system memory <-> ACP SRAM
@@ -236,6 +255,7 @@ static void set_acp_sysmem_dma_descriptors(void __iomem *acp_mmio,
236 config_dma_descriptor_in_sram(acp_mmio, dma_dscr_idx, 255 config_dma_descriptor_in_sram(acp_mmio, dma_dscr_idx,
237 &dmadscr[i]); 256 &dmadscr[i]);
238 } 257 }
258 pre_config_reset(acp_mmio, ch);
239 config_acp_dma_channel(acp_mmio, ch, 259 config_acp_dma_channel(acp_mmio, ch,
240 dma_dscr_idx - 1, 260 dma_dscr_idx - 1,
241 NUM_DSCRS_PER_CHANNEL, 261 NUM_DSCRS_PER_CHANNEL,
@@ -275,6 +295,7 @@ static void set_acp_to_i2s_dma_descriptors(void __iomem *acp_mmio, u32 size,
275 config_dma_descriptor_in_sram(acp_mmio, dma_dscr_idx, 295 config_dma_descriptor_in_sram(acp_mmio, dma_dscr_idx,
276 &dmadscr[i]); 296 &dmadscr[i]);
277 } 297 }
298 pre_config_reset(acp_mmio, ch);
278 /* Configure the DMA channel with the above descriptore */ 299 /* Configure the DMA channel with the above descriptore */
279 config_acp_dma_channel(acp_mmio, ch, dma_dscr_idx - 1, 300 config_acp_dma_channel(acp_mmio, ch, dma_dscr_idx - 1,
280 NUM_DSCRS_PER_CHANNEL, 301 NUM_DSCRS_PER_CHANNEL,
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index b100c44ec3a3..28327dd2c6cb 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -462,6 +462,11 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
462 goto rsnd_adg_get_clkout_end; 462 goto rsnd_adg_get_clkout_end;
463 463
464 req_size = prop->length / sizeof(u32); 464 req_size = prop->length / sizeof(u32);
465 if (req_size > REQ_SIZE) {
466 dev_err(dev,
467 "too many clock-frequency, use top %d\n", REQ_SIZE);
468 req_size = REQ_SIZE;
469 }
465 470
466 of_property_read_u32_array(np, "clock-frequency", req_rate, req_size); 471 of_property_read_u32_array(np, "clock-frequency", req_rate, req_size);
467 req_48kHz_rate = 0; 472 req_48kHz_rate = 0;
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index e46415c807a0..40d7dc4f7839 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -482,7 +482,7 @@ static int rsnd_status_update(u32 *status,
482 (func_call && (mod)->ops->fn) ? #fn : ""); \ 482 (func_call && (mod)->ops->fn) ? #fn : ""); \
483 if (func_call && (mod)->ops->fn) \ 483 if (func_call && (mod)->ops->fn) \
484 tmp = (mod)->ops->fn(mod, io, param); \ 484 tmp = (mod)->ops->fn(mod, io, param); \
485 if (tmp) \ 485 if (tmp && (tmp != -EPROBE_DEFER)) \
486 dev_err(dev, "%s[%d] : %s error %d\n", \ 486 dev_err(dev, "%s[%d] : %s error %d\n", \
487 rsnd_mod_name(mod), rsnd_mod_id(mod), \ 487 rsnd_mod_name(mod), rsnd_mod_id(mod), \
488 #fn, tmp); \ 488 #fn, tmp); \
@@ -1557,6 +1557,14 @@ exit_snd_probe:
1557 rsnd_dai_call(remove, &rdai->capture, priv); 1557 rsnd_dai_call(remove, &rdai->capture, priv);
1558 } 1558 }
1559 1559
1560 /*
1561 * adg is very special mod which can't use rsnd_dai_call(remove),
1562 * and it registers ADG clock on probe.
1563 * It should be unregister if probe failed.
1564 * Mainly it is assuming -EPROBE_DEFER case
1565 */
1566 rsnd_adg_remove(priv);
1567
1560 return ret; 1568 return ret;
1561} 1569}
1562 1570
diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index c19342d18998..0bbc4b0ea2c6 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -241,6 +241,10 @@ static int rsnd_dmaen_attach(struct rsnd_dai_stream *io,
241 /* try to get DMAEngine channel */ 241 /* try to get DMAEngine channel */
242 chan = rsnd_dmaen_request_channel(io, mod_from, mod_to); 242 chan = rsnd_dmaen_request_channel(io, mod_from, mod_to);
243 if (IS_ERR_OR_NULL(chan)) { 243 if (IS_ERR_OR_NULL(chan)) {
244 /* Let's follow when -EPROBE_DEFER case */
245 if (PTR_ERR(chan) == -EPROBE_DEFER)
246 return PTR_ERR(chan);
247
244 /* 248 /*
245 * DMA failed. try to PIO mode 249 * DMA failed. try to PIO mode
246 * see 250 * see