aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-05-14 15:47:42 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-05-15 03:58:58 -0400
commita62114cb90a351016121bca02e69d6a9e24afa0e (patch)
tree79493df5aa72f43b40239078668ffd9ac88201a3 /sound
parent82075af6cb9b4918ab52a7100425b09fae6aafe3 (diff)
ASoC: DaVinci I2S updates
This resyncs the DaVinci I2S code with the version in the DaVinci tree. The behavioral change uses updated clock interfaces which recently merged to mainline. Two other changes include adding a comment on the ASP/McBSP/McASP confusion, and dropping pdev->id in order to support more boards than just the DM644x EVM. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/davinci/davinci-i2s.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index ffdb9439d3d8..b1ea52fc83c7 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -24,6 +24,26 @@
24 24
25#include "davinci-pcm.h" 25#include "davinci-pcm.h"
26 26
27
28/*
29 * NOTE: terminology here is confusing.
30 *
31 * - This driver supports the "Audio Serial Port" (ASP),
32 * found on dm6446, dm355, and other DaVinci chips.
33 *
34 * - But it labels it a "Multi-channel Buffered Serial Port"
35 * (McBSP) as on older chips like the dm642 ... which was
36 * backward-compatible, possibly explaining that confusion.
37 *
38 * - OMAP chips have a controller called McBSP, which is
39 * incompatible with the DaVinci flavor of McBSP.
40 *
41 * - Newer DaVinci chips have a controller called McASP,
42 * incompatible with ASP and with either McBSP.
43 *
44 * In short: this uses ASP to implement I2S, not McBSP.
45 * And it won't be the only DaVinci implemention of I2S.
46 */
27#define DAVINCI_MCBSP_DRR_REG 0x00 47#define DAVINCI_MCBSP_DRR_REG 0x00
28#define DAVINCI_MCBSP_DXR_REG 0x04 48#define DAVINCI_MCBSP_DXR_REG 0x04
29#define DAVINCI_MCBSP_SPCR_REG 0x08 49#define DAVINCI_MCBSP_SPCR_REG 0x08
@@ -421,7 +441,7 @@ static int davinci_i2s_probe(struct platform_device *pdev,
421{ 441{
422 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 442 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
423 struct snd_soc_card *card = socdev->card; 443 struct snd_soc_card *card = socdev->card;
424 struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai; 444 struct snd_soc_dai *cpu_dai = card->dai_link->cpu_dai;
425 struct davinci_mcbsp_dev *dev; 445 struct davinci_mcbsp_dev *dev;
426 struct resource *mem, *ioarea; 446 struct resource *mem, *ioarea;
427 struct evm_snd_platform_data *pdata; 447 struct evm_snd_platform_data *pdata;
@@ -448,7 +468,7 @@ static int davinci_i2s_probe(struct platform_device *pdev,
448 468
449 cpu_dai->private_data = dev; 469 cpu_dai->private_data = dev;
450 470
451 dev->clk = clk_get(&pdev->dev, "McBSPCLK"); 471 dev->clk = clk_get(&pdev->dev, NULL);
452 if (IS_ERR(dev->clk)) { 472 if (IS_ERR(dev->clk)) {
453 ret = -ENODEV; 473 ret = -ENODEV;
454 goto err_free_mem; 474 goto err_free_mem;
@@ -483,7 +503,7 @@ static void davinci_i2s_remove(struct platform_device *pdev,
483{ 503{
484 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 504 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
485 struct snd_soc_card *card = socdev->card; 505 struct snd_soc_card *card = socdev->card;
486 struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai; 506 struct snd_soc_dai *cpu_dai = card->dai_link->cpu_dai;
487 struct davinci_mcbsp_dev *dev = cpu_dai->private_data; 507 struct davinci_mcbsp_dev *dev = cpu_dai->private_data;
488 struct resource *mem; 508 struct resource *mem;
489 509