aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-mcasp.c
diff options
context:
space:
mode:
authorVaibhav Bedia <vaibhav.bedia@ti.com>2011-02-09 18:39:54 +0530
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-09 22:33:32 +0000
commit4f82f0285297b89bb1d612b52dfd38fd572a8282 (patch)
treea45cdb22c28c0311dd287012ad9d7400b029cd46 /sound/soc/davinci/davinci-mcasp.c
parenteef6d7b8c24e8dd5af6094ef453a05c80b68d36e (diff)
downloadkernel_samsung_smdk4412-4f82f0285297b89bb1d612b52dfd38fd572a8282.zip
kernel_samsung_smdk4412-4f82f0285297b89bb1d612b52dfd38fd572a8282.tar.gz
kernel_samsung_smdk4412-4f82f0285297b89bb1d612b52dfd38fd572a8282.tar.bz2
ASoC: Davinci: Replace usage of IO_ADDRESS with ioremap()
This patch modifies the Davinci i2s and mcasp drivers to make use of ioremap() instead of IO_ADDRESS() Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-rw-r--r--sound/soc/davinci/davinci-mcasp.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index e7ae621..a5af834 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -885,7 +885,13 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
clk_enable(dev->clk);
dev->clk_active = 1;
- dev->base = (void __iomem *)IO_ADDRESS(mem->start);
+ dev->base = ioremap(mem->start, resource_size(mem));
+ if (!dev->base) {
+ dev_err(&pdev->dev, "ioremap failed\n");
+ ret = -ENOMEM;
+ goto err_release_clk;
+ }
+
dev->op_mode = pdata->op_mode;
dev->tdm_slots = pdata->tdm_slots;
dev->num_serializer = pdata->num_serializer;
@@ -899,14 +905,14 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dma_data->asp_chan_q = pdata->asp_chan_q;
dma_data->ram_chan_q = pdata->ram_chan_q;
dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset +
- io_v2p(dev->base));
+ mem->start);
/* first TX, then RX */
res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
if (!res) {
dev_err(&pdev->dev, "no DMA resource\n");
ret = -ENODEV;
- goto err_release_clk;
+ goto err_iounmap;
}
dma_data->channel = res->start;
@@ -915,13 +921,13 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dma_data->asp_chan_q = pdata->asp_chan_q;
dma_data->ram_chan_q = pdata->ram_chan_q;
dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
- io_v2p(dev->base));
+ mem->start);
res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
if (!res) {
dev_err(&pdev->dev, "no DMA resource\n");
ret = -ENODEV;
- goto err_release_clk;
+ goto err_iounmap;
}
dma_data->channel = res->start;
@@ -929,9 +935,11 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
ret = snd_soc_register_dai(&pdev->dev, &davinci_mcasp_dai[pdata->op_mode]);
if (ret != 0)
- goto err_release_clk;
+ goto err_iounmap;
return 0;
+err_iounmap:
+ iounmap(dev->base);
err_release_clk:
clk_disable(dev->clk);
clk_put(dev->clk);