Commit a62114cb authored by David Brownell's avatar David Brownell Committed by Mark Brown

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 82075af6
...@@ -24,6 +24,26 @@ ...@@ -24,6 +24,26 @@
#include "davinci-pcm.h" #include "davinci-pcm.h"
/*
* NOTE: terminology here is confusing.
*
* - This driver supports the "Audio Serial Port" (ASP),
* found on dm6446, dm355, and other DaVinci chips.
*
* - But it labels it a "Multi-channel Buffered Serial Port"
* (McBSP) as on older chips like the dm642 ... which was
* backward-compatible, possibly explaining that confusion.
*
* - OMAP chips have a controller called McBSP, which is
* incompatible with the DaVinci flavor of McBSP.
*
* - Newer DaVinci chips have a controller called McASP,
* incompatible with ASP and with either McBSP.
*
* In short: this uses ASP to implement I2S, not McBSP.
* And it won't be the only DaVinci implemention of I2S.
*/
#define DAVINCI_MCBSP_DRR_REG 0x00 #define DAVINCI_MCBSP_DRR_REG 0x00
#define DAVINCI_MCBSP_DXR_REG 0x04 #define DAVINCI_MCBSP_DXR_REG 0x04
#define DAVINCI_MCBSP_SPCR_REG 0x08 #define DAVINCI_MCBSP_SPCR_REG 0x08
...@@ -421,7 +441,7 @@ static int davinci_i2s_probe(struct platform_device *pdev, ...@@ -421,7 +441,7 @@ static int davinci_i2s_probe(struct platform_device *pdev,
{ {
struct snd_soc_device *socdev = platform_get_drvdata(pdev); struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_card *card = socdev->card; struct snd_soc_card *card = socdev->card;
struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai; struct snd_soc_dai *cpu_dai = card->dai_link->cpu_dai;
struct davinci_mcbsp_dev *dev; struct davinci_mcbsp_dev *dev;
struct resource *mem, *ioarea; struct resource *mem, *ioarea;
struct evm_snd_platform_data *pdata; struct evm_snd_platform_data *pdata;
...@@ -448,7 +468,7 @@ static int davinci_i2s_probe(struct platform_device *pdev, ...@@ -448,7 +468,7 @@ static int davinci_i2s_probe(struct platform_device *pdev,
cpu_dai->private_data = dev; cpu_dai->private_data = dev;
dev->clk = clk_get(&pdev->dev, "McBSPCLK"); dev->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(dev->clk)) { if (IS_ERR(dev->clk)) {
ret = -ENODEV; ret = -ENODEV;
goto err_free_mem; goto err_free_mem;
...@@ -483,7 +503,7 @@ static void davinci_i2s_remove(struct platform_device *pdev, ...@@ -483,7 +503,7 @@ static void davinci_i2s_remove(struct platform_device *pdev,
{ {
struct snd_soc_device *socdev = platform_get_drvdata(pdev); struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_card *card = socdev->card; struct snd_soc_card *card = socdev->card;
struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai; struct snd_soc_dai *cpu_dai = card->dai_link->cpu_dai;
struct davinci_mcbsp_dev *dev = cpu_dai->private_data; struct davinci_mcbsp_dev *dev = cpu_dai->private_data;
struct resource *mem; struct resource *mem;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment