diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2016-10-25 11:08:41 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-10-25 15:26:10 -0400 |
commit | 2ef9555bd13d00c63fdbe3cdca6ab0e2ded42695 (patch) | |
tree | e71d74f2b5b7ed3602440a99a521f4a08615c807 | |
parent | b57a089bd4213b5e33007f8293bf83a8b14e4729 (diff) |
ASoC: samsung: s3c24xx-i2s: Debug/error trace cleanup
pr_err() are replaced with dev_err() so information about
device the error logs refer to is also included.
pr_debug() at beginning of each function are removed
as they are likely very rarely used and can always be
added again when doing any serious debugging.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/samsung/s3c24xx-i2s.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index 29196a9933a6..7c7061bc0ded 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c | |||
@@ -54,8 +54,6 @@ static void s3c24xx_snd_txctrl(int on) | |||
54 | u32 iiscon; | 54 | u32 iiscon; |
55 | u32 iismod; | 55 | u32 iismod; |
56 | 56 | ||
57 | pr_debug("Entered %s\n", __func__); | ||
58 | |||
59 | iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); | 57 | iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); |
60 | iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); | 58 | iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); |
61 | iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); | 59 | iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); |
@@ -99,8 +97,6 @@ static void s3c24xx_snd_rxctrl(int on) | |||
99 | u32 iiscon; | 97 | u32 iiscon; |
100 | u32 iismod; | 98 | u32 iismod; |
101 | 99 | ||
102 | pr_debug("Entered %s\n", __func__); | ||
103 | |||
104 | iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); | 100 | iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); |
105 | iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); | 101 | iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); |
106 | iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); | 102 | iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); |
@@ -147,8 +143,6 @@ static int s3c24xx_snd_lrsync(void) | |||
147 | u32 iiscon; | 143 | u32 iiscon; |
148 | int timeout = 50; /* 5ms */ | 144 | int timeout = 50; /* 5ms */ |
149 | 145 | ||
150 | pr_debug("Entered %s\n", __func__); | ||
151 | |||
152 | while (1) { | 146 | while (1) { |
153 | iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); | 147 | iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); |
154 | if (iiscon & S3C2410_IISCON_LRINDEX) | 148 | if (iiscon & S3C2410_IISCON_LRINDEX) |
@@ -167,8 +161,6 @@ static int s3c24xx_snd_lrsync(void) | |||
167 | */ | 161 | */ |
168 | static inline int s3c24xx_snd_is_clkmaster(void) | 162 | static inline int s3c24xx_snd_is_clkmaster(void) |
169 | { | 163 | { |
170 | pr_debug("Entered %s\n", __func__); | ||
171 | |||
172 | return (readl(s3c24xx_i2s.regs + S3C2410_IISMOD) & S3C2410_IISMOD_SLAVE) ? 0:1; | 164 | return (readl(s3c24xx_i2s.regs + S3C2410_IISMOD) & S3C2410_IISMOD_SLAVE) ? 0:1; |
173 | } | 165 | } |
174 | 166 | ||
@@ -180,8 +172,6 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai, | |||
180 | { | 172 | { |
181 | u32 iismod; | 173 | u32 iismod; |
182 | 174 | ||
183 | pr_debug("Entered %s\n", __func__); | ||
184 | |||
185 | iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); | 175 | iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); |
186 | pr_debug("hw_params r: IISMOD: %x \n", iismod); | 176 | pr_debug("hw_params r: IISMOD: %x \n", iismod); |
187 | 177 | ||
@@ -209,6 +199,7 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai, | |||
209 | 199 | ||
210 | writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); | 200 | writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); |
211 | pr_debug("hw_params w: IISMOD: %x \n", iismod); | 201 | pr_debug("hw_params w: IISMOD: %x \n", iismod); |
202 | |||
212 | return 0; | 203 | return 0; |
213 | } | 204 | } |
214 | 205 | ||
@@ -219,8 +210,6 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
219 | struct snd_dmaengine_dai_dma_data *dma_data; | 210 | struct snd_dmaengine_dai_dma_data *dma_data; |
220 | u32 iismod; | 211 | u32 iismod; |
221 | 212 | ||
222 | pr_debug("Entered %s\n", __func__); | ||
223 | |||
224 | dma_data = snd_soc_dai_get_dma_data(dai, substream); | 213 | dma_data = snd_soc_dai_get_dma_data(dai, substream); |
225 | 214 | ||
226 | /* Working copies of register */ | 215 | /* Working copies of register */ |
@@ -242,6 +231,7 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
242 | 231 | ||
243 | writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); | 232 | writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); |
244 | pr_debug("hw_params w: IISMOD: %x\n", iismod); | 233 | pr_debug("hw_params w: IISMOD: %x\n", iismod); |
234 | |||
245 | return 0; | 235 | return 0; |
246 | } | 236 | } |
247 | 237 | ||
@@ -250,8 +240,6 @@ static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd, | |||
250 | { | 240 | { |
251 | int ret = 0; | 241 | int ret = 0; |
252 | 242 | ||
253 | pr_debug("Entered %s\n", __func__); | ||
254 | |||
255 | switch (cmd) { | 243 | switch (cmd) { |
256 | case SNDRV_PCM_TRIGGER_START: | 244 | case SNDRV_PCM_TRIGGER_START: |
257 | case SNDRV_PCM_TRIGGER_RESUME: | 245 | case SNDRV_PCM_TRIGGER_RESUME: |
@@ -293,8 +281,6 @@ static int s3c24xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, | |||
293 | { | 281 | { |
294 | u32 iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); | 282 | u32 iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); |
295 | 283 | ||
296 | pr_debug("Entered %s\n", __func__); | ||
297 | |||
298 | iismod &= ~S3C2440_IISMOD_MPLL; | 284 | iismod &= ~S3C2440_IISMOD_MPLL; |
299 | 285 | ||
300 | switch (clk_id) { | 286 | switch (clk_id) { |
@@ -319,8 +305,6 @@ static int s3c24xx_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai, | |||
319 | { | 305 | { |
320 | u32 reg; | 306 | u32 reg; |
321 | 307 | ||
322 | pr_debug("Entered %s\n", __func__); | ||
323 | |||
324 | switch (div_id) { | 308 | switch (div_id) { |
325 | case S3C24XX_DIV_BCLK: | 309 | case S3C24XX_DIV_BCLK: |
326 | reg = readl(s3c24xx_i2s.regs + S3C2410_IISMOD) & ~S3C2410_IISMOD_FS_MASK; | 310 | reg = readl(s3c24xx_i2s.regs + S3C2410_IISMOD) & ~S3C2410_IISMOD_FS_MASK; |
@@ -354,8 +338,6 @@ EXPORT_SYMBOL_GPL(s3c24xx_i2s_get_clockrate); | |||
354 | 338 | ||
355 | static int s3c24xx_i2s_probe(struct snd_soc_dai *dai) | 339 | static int s3c24xx_i2s_probe(struct snd_soc_dai *dai) |
356 | { | 340 | { |
357 | pr_debug("Entered %s\n", __func__); | ||
358 | |||
359 | snd_soc_dai_init_dma_data(dai, &s3c24xx_i2s_pcm_stereo_out, | 341 | snd_soc_dai_init_dma_data(dai, &s3c24xx_i2s_pcm_stereo_out, |
360 | &s3c24xx_i2s_pcm_stereo_in); | 342 | &s3c24xx_i2s_pcm_stereo_in); |
361 | 343 | ||
@@ -381,8 +363,6 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai) | |||
381 | #ifdef CONFIG_PM | 363 | #ifdef CONFIG_PM |
382 | static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai) | 364 | static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai) |
383 | { | 365 | { |
384 | pr_debug("Entered %s\n", __func__); | ||
385 | |||
386 | s3c24xx_i2s.iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); | 366 | s3c24xx_i2s.iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); |
387 | s3c24xx_i2s.iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); | 367 | s3c24xx_i2s.iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); |
388 | s3c24xx_i2s.iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); | 368 | s3c24xx_i2s.iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); |
@@ -395,7 +375,6 @@ static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai) | |||
395 | 375 | ||
396 | static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai) | 376 | static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai) |
397 | { | 377 | { |
398 | pr_debug("Entered %s\n", __func__); | ||
399 | clk_prepare_enable(s3c24xx_i2s.iis_clk); | 378 | clk_prepare_enable(s3c24xx_i2s.iis_clk); |
400 | 379 | ||
401 | writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON); | 380 | writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON); |
@@ -410,7 +389,6 @@ static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai) | |||
410 | #define s3c24xx_i2s_resume NULL | 389 | #define s3c24xx_i2s_resume NULL |
411 | #endif | 390 | #endif |
412 | 391 | ||
413 | |||
414 | #define S3C24XX_I2S_RATES \ | 392 | #define S3C24XX_I2S_RATES \ |
415 | (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_16000 | \ | 393 | (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_16000 | \ |
416 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ | 394 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ |
@@ -465,14 +443,14 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev) | |||
465 | ret = devm_snd_soc_register_component(&pdev->dev, | 443 | ret = devm_snd_soc_register_component(&pdev->dev, |
466 | &s3c24xx_i2s_component, &s3c24xx_i2s_dai, 1); | 444 | &s3c24xx_i2s_component, &s3c24xx_i2s_dai, 1); |
467 | if (ret) { | 445 | if (ret) { |
468 | pr_err("failed to register the dai\n"); | 446 | dev_err(&pdev->dev, "Failed to register the DAI\n"); |
469 | return ret; | 447 | return ret; |
470 | } | 448 | } |
471 | 449 | ||
472 | ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL, | 450 | ret = samsung_asoc_dma_platform_register(&pdev->dev, NULL, |
473 | NULL, NULL); | 451 | NULL, NULL); |
474 | if (ret) | 452 | if (ret) |
475 | pr_err("failed to register the dma: %d\n", ret); | 453 | dev_err(&pdev->dev, "Failed to register the DMA: %d\n", ret); |
476 | 454 | ||
477 | return ret; | 455 | return ret; |
478 | } | 456 | } |