summaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2010-04-27 15:56:34 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-05-05 15:11:52 +0100
commitd79696ff443eb16a1a13bd7db030a25fee9f44a7 (patch)
tree55d4d4b2c47f8812066443a1432eee3c12d15340 /sound/soc/s3c24xx
parentce76f9fd34d4d39fbda330f14b327273551e2f54 (diff)
downloadtalos-op-linux-d79696ff443eb16a1a13bd7db030a25fee9f44a7.tar.gz
talos-op-linux-d79696ff443eb16a1a13bd7db030a25fee9f44a7.zip
ASoC: S3C2412: I2S: Return correct source clock
Until now, s3c2412_get_iisclk would return NULL since iis_clk was never initialized. Return appropriate pointer as per the selection made for source clock. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/s3c24xx')
-rw-r--r--sound/soc/s3c24xx/s3c2412-i2s.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/s3c24xx/s3c2412-i2s.c b/sound/soc/s3c24xx/s3c2412-i2s.c
index cf0c15482c34..ce2daacc4eb9 100644
--- a/sound/soc/s3c24xx/s3c2412-i2s.c
+++ b/sound/soc/s3c24xx/s3c2412-i2s.c
@@ -94,7 +94,13 @@ static int s3c2412_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
struct clk *s3c2412_get_iisclk(void)
{
- return s3c2412_i2s.iis_clk;
+ struct s3c_i2sv2_info *i2s = &s3c2412_i2s;
+ u32 iismod = readl(i2s->regs + S3C2412_IISMOD);
+
+ if (iismod & S3C2412_IISMOD_IMS_SYSMUX)
+ return i2s->iis_cclk;
+ else
+ return i2s->iis_pclk;
}
EXPORT_SYMBOL_GPL(s3c2412_get_iisclk);
OpenPOWER on IntegriCloud