Commit 05cf9dd8 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next

parents 897074d8 1974a042
...@@ -38,12 +38,6 @@ struct samsung_i2s { ...@@ -38,12 +38,6 @@ struct samsung_i2s {
#define QUIRK_NEED_RSTCLR (1 << 3) #define QUIRK_NEED_RSTCLR (1 << 3)
/* Quirks of the I2S controller */ /* Quirks of the I2S controller */
u32 quirks; u32 quirks;
/*
* Array of clock names that can be used to generate I2S signals.
* Also corresponds to clocks of I2SMOD[10]
*/
const char **src_clk;
dma_addr_t idma_addr; dma_addr_t idma_addr;
}; };
......
...@@ -442,7 +442,7 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev) ...@@ -442,7 +442,7 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev)
ret = -ENODEV; ret = -ENODEV;
goto err2; goto err2;
} }
clk_enable(s3c_ac97.ac97_clk); clk_prepare_enable(s3c_ac97.ac97_clk);
if (ac97_pdata->cfg_gpio(pdev)) { if (ac97_pdata->cfg_gpio(pdev)) {
dev_err(&pdev->dev, "Unable to configure gpio\n"); dev_err(&pdev->dev, "Unable to configure gpio\n");
...@@ -468,7 +468,7 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev) ...@@ -468,7 +468,7 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev)
free_irq(irq_res->start, NULL); free_irq(irq_res->start, NULL);
err4: err4:
err3: err3:
clk_disable(s3c_ac97.ac97_clk); clk_disable_unprepare(s3c_ac97.ac97_clk);
clk_put(s3c_ac97.ac97_clk); clk_put(s3c_ac97.ac97_clk);
err2: err2:
iounmap(s3c_ac97.regs); iounmap(s3c_ac97.regs);
...@@ -488,7 +488,7 @@ static __devexit int s3c_ac97_remove(struct platform_device *pdev) ...@@ -488,7 +488,7 @@ static __devexit int s3c_ac97_remove(struct platform_device *pdev)
if (irq_res) if (irq_res)
free_irq(irq_res->start, NULL); free_irq(irq_res->start, NULL);
clk_disable(s3c_ac97.ac97_clk); clk_disable_unprepare(s3c_ac97.ac97_clk);
clk_put(s3c_ac97.ac97_clk); clk_put(s3c_ac97.ac97_clk);
iounmap(s3c_ac97.regs); iounmap(s3c_ac97.regs);
......
This diff is collapsed.
...@@ -49,8 +49,6 @@ struct i2s_dai { ...@@ -49,8 +49,6 @@ struct i2s_dai {
struct clk *clk; struct clk *clk;
/* Clock for generating I2S signals */ /* Clock for generating I2S signals */
struct clk *op_clk; struct clk *op_clk;
/* Array of clock names for op_clk */
const char **src_clk;
/* Pointer to the Primary_Fifo if this is Sec_Fifo, NULL otherwise */ /* Pointer to the Primary_Fifo if this is Sec_Fifo, NULL otherwise */
struct i2s_dai *pri_dai; struct i2s_dai *pri_dai;
/* Pointer to the Secondary_Fifo if it has one, NULL otherwise */ /* Pointer to the Secondary_Fifo if it has one, NULL otherwise */
...@@ -423,7 +421,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, ...@@ -423,7 +421,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
if (i2s->op_clk) { if (i2s->op_clk) {
if ((clk_id && !(mod & MOD_IMS_SYSMUX)) || if ((clk_id && !(mod & MOD_IMS_SYSMUX)) ||
(!clk_id && (mod & MOD_IMS_SYSMUX))) { (!clk_id && (mod & MOD_IMS_SYSMUX))) {
clk_disable(i2s->op_clk); clk_disable_unprepare(i2s->op_clk);
clk_put(i2s->op_clk); clk_put(i2s->op_clk);
} else { } else {
i2s->rclk_srcrate = i2s->rclk_srcrate =
...@@ -432,9 +430,13 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, ...@@ -432,9 +430,13 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
} }
} }
if (clk_id)
i2s->op_clk = clk_get(&i2s->pdev->dev, i2s->op_clk = clk_get(&i2s->pdev->dev,
i2s->src_clk[clk_id]); "i2s_opclk1");
clk_enable(i2s->op_clk); else
i2s->op_clk = clk_get(&i2s->pdev->dev,
"i2s_opclk0");
clk_prepare_enable(i2s->op_clk);
i2s->rclk_srcrate = clk_get_rate(i2s->op_clk); i2s->rclk_srcrate = clk_get_rate(i2s->op_clk);
/* Over-ride the other's */ /* Over-ride the other's */
...@@ -880,7 +882,7 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) ...@@ -880,7 +882,7 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)
iounmap(i2s->addr); iounmap(i2s->addr);
return -ENOENT; return -ENOENT;
} }
clk_enable(i2s->clk); clk_prepare_enable(i2s->clk);
if (other) { if (other) {
other->addr = i2s->addr; other->addr = i2s->addr;
...@@ -922,7 +924,7 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai) ...@@ -922,7 +924,7 @@ static int samsung_i2s_dai_remove(struct snd_soc_dai *dai)
if (i2s->quirks & QUIRK_NEED_RSTCLR) if (i2s->quirks & QUIRK_NEED_RSTCLR)
writel(0, i2s->addr + I2SCON); writel(0, i2s->addr + I2SCON);
clk_disable(i2s->clk); clk_disable_unprepare(i2s->clk);
clk_put(i2s->clk); clk_put(i2s->clk);
iounmap(i2s->addr); iounmap(i2s->addr);
...@@ -1067,7 +1069,6 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev) ...@@ -1067,7 +1069,6 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev)
(struct s3c2410_dma_client *)&pri_dai->dma_capture; (struct s3c2410_dma_client *)&pri_dai->dma_capture;
pri_dai->dma_playback.channel = dma_pl_chan; pri_dai->dma_playback.channel = dma_pl_chan;
pri_dai->dma_capture.channel = dma_cp_chan; pri_dai->dma_capture.channel = dma_cp_chan;
pri_dai->src_clk = i2s_cfg->src_clk;
pri_dai->dma_playback.dma_size = 4; pri_dai->dma_playback.dma_size = 4;
pri_dai->dma_capture.dma_size = 4; pri_dai->dma_capture.dma_size = 4;
pri_dai->base = regs_base; pri_dai->base = regs_base;
...@@ -1088,7 +1089,6 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev) ...@@ -1088,7 +1089,6 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev)
(struct s3c2410_dma_client *)&sec_dai->dma_playback; (struct s3c2410_dma_client *)&sec_dai->dma_playback;
/* Use iDMA always if SysDMA not provided */ /* Use iDMA always if SysDMA not provided */
sec_dai->dma_playback.channel = dma_pl_sec_chan ? : -1; sec_dai->dma_playback.channel = dma_pl_sec_chan ? : -1;
sec_dai->src_clk = i2s_cfg->src_clk;
sec_dai->dma_playback.dma_size = 4; sec_dai->dma_playback.dma_size = 4;
sec_dai->base = regs_base; sec_dai->base = regs_base;
sec_dai->quirks = quirks; sec_dai->quirks = quirks;
......
...@@ -543,7 +543,7 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) ...@@ -543,7 +543,7 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
ret = PTR_ERR(pcm->cclk); ret = PTR_ERR(pcm->cclk);
goto err1; goto err1;
} }
clk_enable(pcm->cclk); clk_prepare_enable(pcm->cclk);
/* record our pcm structure for later use in the callbacks */ /* record our pcm structure for later use in the callbacks */
dev_set_drvdata(&pdev->dev, pcm); dev_set_drvdata(&pdev->dev, pcm);
...@@ -568,7 +568,7 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) ...@@ -568,7 +568,7 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
ret = -ENOENT; ret = -ENOENT;
goto err4; goto err4;
} }
clk_enable(pcm->pclk); clk_prepare_enable(pcm->pclk);
s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start
+ S3C_PCM_RXFIFO; + S3C_PCM_RXFIFO;
...@@ -592,14 +592,14 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev) ...@@ -592,14 +592,14 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
return 0; return 0;
err5: err5:
clk_disable(pcm->pclk); clk_disable_unprepare(pcm->pclk);
clk_put(pcm->pclk); clk_put(pcm->pclk);
err4: err4:
iounmap(pcm->regs); iounmap(pcm->regs);
err3: err3:
release_mem_region(mem_res->start, resource_size(mem_res)); release_mem_region(mem_res->start, resource_size(mem_res));
err2: err2:
clk_disable(pcm->cclk); clk_disable_unprepare(pcm->cclk);
clk_put(pcm->cclk); clk_put(pcm->cclk);
err1: err1:
return ret; return ret;
...@@ -619,8 +619,8 @@ static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev) ...@@ -619,8 +619,8 @@ static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev)
mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(mem_res->start, resource_size(mem_res)); release_mem_region(mem_res->start, resource_size(mem_res));
clk_disable(pcm->cclk); clk_disable_unprepare(pcm->cclk);
clk_disable(pcm->pclk); clk_disable_unprepare(pcm->pclk);
clk_put(pcm->pclk); clk_put(pcm->pclk);
clk_put(pcm->cclk); clk_put(pcm->cclk);
......
...@@ -397,7 +397,7 @@ static __devinit int spdif_probe(struct platform_device *pdev) ...@@ -397,7 +397,7 @@ static __devinit int spdif_probe(struct platform_device *pdev)
ret = -ENOENT; ret = -ENOENT;
goto err0; goto err0;
} }
clk_enable(spdif->pclk); clk_prepare_enable(spdif->pclk);
spdif->sclk = clk_get(&pdev->dev, "sclk_spdif"); spdif->sclk = clk_get(&pdev->dev, "sclk_spdif");
if (IS_ERR(spdif->sclk)) { if (IS_ERR(spdif->sclk)) {
...@@ -405,7 +405,7 @@ static __devinit int spdif_probe(struct platform_device *pdev) ...@@ -405,7 +405,7 @@ static __devinit int spdif_probe(struct platform_device *pdev)
ret = -ENOENT; ret = -ENOENT;
goto err1; goto err1;
} }
clk_enable(spdif->sclk); clk_prepare_enable(spdif->sclk);
/* Request S/PDIF Register's memory region */ /* Request S/PDIF Register's memory region */
if (!request_mem_region(mem_res->start, if (!request_mem_region(mem_res->start,
...@@ -444,10 +444,10 @@ static __devinit int spdif_probe(struct platform_device *pdev) ...@@ -444,10 +444,10 @@ static __devinit int spdif_probe(struct platform_device *pdev)
err3: err3:
release_mem_region(mem_res->start, resource_size(mem_res)); release_mem_region(mem_res->start, resource_size(mem_res));
err2: err2:
clk_disable(spdif->sclk); clk_disable_unprepare(spdif->sclk);
clk_put(spdif->sclk); clk_put(spdif->sclk);
err1: err1:
clk_disable(spdif->pclk); clk_disable_unprepare(spdif->pclk);
clk_put(spdif->pclk); clk_put(spdif->pclk);
err0: err0:
return ret; return ret;
...@@ -466,9 +466,9 @@ static __devexit int spdif_remove(struct platform_device *pdev) ...@@ -466,9 +466,9 @@ static __devexit int spdif_remove(struct platform_device *pdev)
if (mem_res) if (mem_res)
release_mem_region(mem_res->start, resource_size(mem_res)); release_mem_region(mem_res->start, resource_size(mem_res));
clk_disable(spdif->sclk); clk_disable_unprepare(spdif->sclk);
clk_put(spdif->sclk); clk_put(spdif->sclk);
clk_disable(spdif->pclk); clk_disable_unprepare(spdif->pclk);
clk_put(spdif->pclk); clk_put(spdif->pclk);
return 0; return 0;
......
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