linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/10] S3C64XX I2S: Codec Clock Gating Option
@ 2009-09-15 10:02 Jassi
  2009-09-15 10:44 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Jassi @ 2009-09-15 10:02 UTC (permalink / raw)
  To: linux-arm-kernel

In SoC-Master mode, CODCLK maybe gated out as MCLK of the CODEC.
In SoC-Slave mode, CODCLK needs to be cut-off from PAD inorder
to avoid collision with MCLK from CODEC.
Option to gate/block CODCLK is implemented in this patch.

Signed-Off-by: Jassi <jassi.brar@samsung.com>
---
 arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h |    2 ++
 sound/soc/s3c24xx/s3c64xx-i2s.c                   |    8 ++++++++
 sound/soc/s3c24xx/s3c64xx-i2s.h                   |    2 ++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
index 07659da..08ae50f 100644
--- a/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
+++ b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
@@ -38,6 +38,8 @@
 #define S3C64XX_IISMOD_BLC_24BIT	(2 << 13)
 #define S3C64XX_IISMOD_BLC_MASK		(3 << 13)
 
+#define S3C64XX_IISMOD_CDCLK_EXT	(1 << 12)
+
 #define S3C64XX_IISMOD_IMS_PCLK		(0 << 10)
 #define S3C64XX_IISMOD_IMS_SYSMUX	(1 << 10)
 
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c
index 3c06c40..6f8959d 100644
--- a/sound/soc/s3c24xx/s3c64xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c64xx-i2s.c
@@ -99,6 +99,14 @@ static int s3c64xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
 		iismod |= S3C64XX_IISMOD_IMS_SYSMUX;
 		break;
 
+	case S3C64XX_CODCLKSRC_INT:
+		iismod &= ~S3C64XX_IISMOD_CDCLK_EXT;
+		break;
+
+	case S3C64XX_CODCLKSRC_EXT:
+		iismod |= S3C64XX_IISMOD_CDCLK_EXT;
+		break;
+
 	default:
 		return -EINVAL;
 	}
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.h b/sound/soc/s3c24xx/s3c64xx-i2s.h
index 02148ce..4197da5 100644
--- a/sound/soc/s3c24xx/s3c64xx-i2s.h
+++ b/sound/soc/s3c24xx/s3c64xx-i2s.h
@@ -25,6 +25,8 @@ struct clk;
 
 #define S3C64XX_CLKSRC_PCLK	(0)
 #define S3C64XX_CLKSRC_MUX	(1)
+#define S3C64XX_CODCLKSRC_INT	(2)
+#define S3C64XX_CODCLKSRC_EXT	(3)
 
 extern struct snd_soc_dai s3c64xx_i2s_dai[];
 
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-16 23:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-15 10:02 [PATCH 03/10] S3C64XX I2S: Codec Clock Gating Option Jassi
2009-09-15 10:44 ` Mark Brown
2009-09-16  1:37   ` jassi brar
2009-09-16 11:02     ` Mark Brown
2009-09-16 20:12       ` Mark Brown
2009-09-16 23:59         ` jassi brar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).