* [PATCH 6/7] ASoC: S3C64XX: Pass I2S base address from platform data
@ 2009-12-09 4:29 jassisinghbrar
2009-12-09 11:09 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: jassisinghbrar @ 2009-12-09 4:29 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, Jassi Brar, ben-linux
From: Jassi Brar <jassi.brar@samsung.com>
Instead of having I2Sv2 core to figure out the base address of I2Sv3 controller
pass the address directly.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
---
sound/soc/s3c24xx/s3c64xx-i2s.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c
index 751a1b6..9cf62c2 100644
--- a/sound/soc/s3c24xx/s3c64xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c64xx-i2s.c
@@ -166,6 +166,13 @@ static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "Unable to get I2S SFR address\n");
return -ENXIO;
}
+
+ if (!request_mem_region(res->start, resource_size(res),
+ "s3c64xx-i2s")) {
+ dev_err(&pdev->dev, "Unable to request SFR region\n");
+ return -EBUSY;
+ }
+
i2s->dma_capture->dma_addr = res->start + S3C2412_IISRXD;
i2s->dma_playback->dma_addr = res->start + S3C2412_IISTXD;
@@ -191,7 +198,8 @@ static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev)
clk_enable(i2s->iis_cclk);
- ret = s3c_i2sv2_probe(pdev, dai, i2s, 0);
+ ret = s3c_i2sv2_probe(pdev, dai, i2s,
+ i2s->dma_playback->dma_addr - S3C2412_IISTXD);
if (ret)
goto err_clk;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 6/7] ASoC: S3C64XX: Pass I2S base address from platform data
2009-12-09 4:29 [PATCH 6/7] ASoC: S3C64XX: Pass I2S base address from platform data jassisinghbrar
@ 2009-12-09 11:09 ` Mark Brown
2009-12-09 11:14 ` jassi brar
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2009-12-09 11:09 UTC (permalink / raw)
To: jassisinghbrar; +Cc: alsa-devel, Jassi Brar, ben-linux
On Wed, Dec 09, 2009 at 01:29:54PM +0900, jassisinghbrar@gmail.com wrote:
> +
> + if (!request_mem_region(res->start, resource_size(res),
> + "s3c64xx-i2s")) {
> + dev_err(&pdev->dev, "Unable to request SFR region\n");
> + return -EBUSY;
> + }
> +
This feels like it should be in the patch that requested the resource
rather than here. Probably ought to have a version that does the
request in 2.6.33 too if we can...
> @@ -191,7 +198,8 @@ static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev)
>
> clk_enable(i2s->iis_cclk);
>
> - ret = s3c_i2sv2_probe(pdev, dai, i2s, 0);
> + ret = s3c_i2sv2_probe(pdev, dai, i2s,
> + i2s->dma_playback->dma_addr - S3C2412_IISTXD);
> if (ret)
> goto err_clk;
A comment explaining why we're doing the subtraction wouldn't hurt; the
code is OK.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 6/7] ASoC: S3C64XX: Pass I2S base address from platform data
2009-12-09 11:09 ` Mark Brown
@ 2009-12-09 11:14 ` jassi brar
2009-12-09 11:25 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: jassi brar @ 2009-12-09 11:14 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Jassi Brar, ben-linux
On Wed, Dec 9, 2009 at 8:09 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Wed, Dec 09, 2009 at 01:29:54PM +0900, jassisinghbrar@gmail.com wrote:
>
>> +
>> + if (!request_mem_region(res->start, resource_size(res),
>> + "s3c64xx-i2s")) {
>> + dev_err(&pdev->dev, "Unable to request SFR region\n");
>> + return -EBUSY;
>> + }
>> +
>
> This feels like it should be in the patch that requested the resource
> rather than here. Probably ought to have a version that does the
> request in 2.6.33 too if we can...
that patch is only for setting DMA channel and dst addresses, so we
request MEM resource there.
>> @@ -191,7 +198,8 @@ static __devinit int s3c64xx_iis_dev_probe(struct platform_device *pdev)
>>
>> clk_enable(i2s->iis_cclk);
>>
>> - ret = s3c_i2sv2_probe(pdev, dai, i2s, 0);
>> + ret = s3c_i2sv2_probe(pdev, dai, i2s,
>> + i2s->dma_playback->dma_addr - S3C2412_IISTXD);
>> if (ret)
>> goto err_clk;
>
> A comment explaining why we're doing the subtraction wouldn't hurt; the
> code is OK.
its just that i didn't want to reorder the code and MEM resource was requested
into a temporary variable 'res' not immediately before this call. At this point
res->start should do too though.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 6/7] ASoC: S3C64XX: Pass I2S base address from platform data
2009-12-09 11:14 ` jassi brar
@ 2009-12-09 11:25 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2009-12-09 11:25 UTC (permalink / raw)
To: jassi brar; +Cc: alsa-devel, Jassi Brar, ben-linux
On Wed, Dec 09, 2009 at 08:14:24PM +0900, jassi brar wrote:
> On Wed, Dec 9, 2009 at 8:09 PM, Mark Brown
> >> + if (!request_mem_region(res->start, resource_size(res),
> >> + "s3c64xx-i2s")) {
> >> + dev_err(&pdev->dev, "Unable to request SFR region\n");
> >> + return -EBUSY;
> >> + }
> >> +
> > This feels like it should be in the patch that requested the resource
> > rather than here. Probably ought to have a version that does the
> > request in 2.6.33 too if we can...
> that patch is only for setting DMA channel and dst addresses, so we
> request MEM resource there.
I'm not sure I follow? In any case the real issue here is that looking
at this change and it's hard to see how it's immediately related to the
subject of the patch; it's not about how the data is passed and somewhat
distant from the code which does do the passing.
> > A comment explaining why we're doing the subtraction wouldn't hurt; the
> > code is OK.
> its just that i didn't want to reorder the code and MEM resource was requested
> into a temporary variable 'res' not immediately before this call. At this point
> res->start should do too though.
Yes, I saw - all I'm saying is that putting a note in the code
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-09 11:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-09 4:29 [PATCH 6/7] ASoC: S3C64XX: Pass I2S base address from platform data jassisinghbrar
2009-12-09 11:09 ` Mark Brown
2009-12-09 11:14 ` jassi brar
2009-12-09 11:25 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.