* [PATCH 17/20] ASoC: S3C: I2Sv2: Define new field for controller features
2010-03-10 7:49 ` [PATCH 16/20] ASoC: S3C64XX: I2S: Use s3c2412 defines Jassi Brar
@ 2010-03-10 7:49 ` Jassi Brar
2010-03-10 11:09 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Jassi Brar @ 2010-03-10 7:49 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, Jassi Brar, ben-linux
In order to make s3c-i2s-v2.c manage controllers with minor
quirks and variation in features, we define a per-block flag
that indicates the availability/lack of a particular feature
to the s3c-i2s-v2.c
While adding support for new SoCs' I2S, check for the blocks
of older SoCs that have similar feature and set the flag for
that feature.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
---
sound/soc/s3c24xx/s3c-i2s-v2.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.h b/sound/soc/s3c24xx/s3c-i2s-v2.h
index 39a6db6..766f43a 100644
--- a/sound/soc/s3c24xx/s3c-i2s-v2.h
+++ b/sound/soc/s3c24xx/s3c-i2s-v2.h
@@ -29,10 +29,16 @@
#define S3C_I2SV2_CLKSRC_AUDIOBUS 1
#define S3C_I2SV2_CLKSRC_CDCLK 2
+/* Set this flag for I2S controllers that have the bit IISMOD[12]
+ * bridge/break RCLK signal and external Xi2sCDCLK pin.
+ */
+#define S3C_FEATURE_CDCLKCON (1 << 0)
+
/**
* struct s3c_i2sv2_info - S3C I2S-V2 information
* @dev: The parent device passed to use from the probe.
* @regs: The pointer to the device registe block.
+ * @feature: Set of bit-flags indicating features of the controller.
* @master: True if the I2S core is the I2S bit clock master.
* @dma_playback: DMA information for playback channel.
* @dma_capture: DMA information for capture channel.
@@ -47,6 +53,8 @@ struct s3c_i2sv2_info {
struct device *dev;
void __iomem *regs;
+ u32 feature;
+
struct clk *iis_pclk;
struct clk *iis_cclk;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 17/20] ASoC: S3C: I2Sv2: Define new field for controller features
@ 2010-03-10 8:12 Jassi Brar
0 siblings, 0 replies; 4+ messages in thread
From: Jassi Brar @ 2010-03-10 8:12 UTC (permalink / raw)
To: alsa-devel; +Cc: broonie, Jassi Brar, ben-linux
In order to make s3c-i2s-v2.c manage controllers with minor
quirks and variation in features, we define a per-block flag
that indicates the availability/lack of a particular feature
to the s3c-i2s-v2.c
While adding support for new SoCs' I2S, check for the blocks
of older SoCs that have similar feature and set the flag for
that feature.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
---
sound/soc/s3c24xx/s3c-i2s-v2.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.h b/sound/soc/s3c24xx/s3c-i2s-v2.h
index 39a6db6..766f43a 100644
--- a/sound/soc/s3c24xx/s3c-i2s-v2.h
+++ b/sound/soc/s3c24xx/s3c-i2s-v2.h
@@ -29,10 +29,16 @@
#define S3C_I2SV2_CLKSRC_AUDIOBUS 1
#define S3C_I2SV2_CLKSRC_CDCLK 2
+/* Set this flag for I2S controllers that have the bit IISMOD[12]
+ * bridge/break RCLK signal and external Xi2sCDCLK pin.
+ */
+#define S3C_FEATURE_CDCLKCON (1 << 0)
+
/**
* struct s3c_i2sv2_info - S3C I2S-V2 information
* @dev: The parent device passed to use from the probe.
* @regs: The pointer to the device registe block.
+ * @feature: Set of bit-flags indicating features of the controller.
* @master: True if the I2S core is the I2S bit clock master.
* @dma_playback: DMA information for playback channel.
* @dma_capture: DMA information for capture channel.
@@ -47,6 +53,8 @@ struct s3c_i2sv2_info {
struct device *dev;
void __iomem *regs;
+ u32 feature;
+
struct clk *iis_pclk;
struct clk *iis_cclk;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 17/20] ASoC: S3C: I2Sv2: Define new field for controller features
2010-03-10 7:49 ` [PATCH 17/20] ASoC: S3C: I2Sv2: Define new field for controller features Jassi Brar
@ 2010-03-10 11:09 ` Mark Brown
2010-03-10 11:11 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2010-03-10 11:09 UTC (permalink / raw)
To: Jassi Brar; +Cc: alsa-devel, ben-linux
On Wed, Mar 10, 2010 at 04:49:06PM +0900, Jassi Brar wrote:
> While adding support for new SoCs' I2S, check for the blocks
> of older SoCs that have similar feature and set the flag for
> that feature.
As a result of this...
> +/* Set this flag for I2S controllers that have the bit IISMOD[12]
> + * bridge/break RCLK signal and external Xi2sCDCLK pin.
> + */
> +#define S3C_FEATURE_CDCLKCON (1 << 0)
> +
...I'd suggest moving this into the patch that adds support for
CDCLKCON (or merging that patch in with this one).
Probably worth namespacing these defines a bit more (eg, S3C_IIS_) since
I'd expect they'll end up being used by the arch/arm code too in the
platform data definition. They ought to be in include/sound or arch/arm
for visibility to arch/arm code too.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 17/20] ASoC: S3C: I2Sv2: Define new field for controller features
2010-03-10 11:09 ` Mark Brown
@ 2010-03-10 11:11 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2010-03-10 11:11 UTC (permalink / raw)
To: Jassi Brar; +Cc: alsa-devel, ben-linux
On Wed, Mar 10, 2010 at 11:09:59AM +0000, Mark Brown wrote:
> Probably worth namespacing these defines a bit more (eg, S3C_IIS_) since
> I'd expect they'll end up being used by the arch/arm code too in the
> platform data definition. They ought to be in include/sound or arch/arm
> for visibility to arch/arm code too.
Meh, scratch that - I see where this is being used now.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-10 11:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10 8:12 [PATCH 17/20] ASoC: S3C: I2Sv2: Define new field for controller features Jassi Brar
-- strict thread matches above, loose matches on Subject: below --
2010-03-10 7:48 [PATCH 01/20] ASoC: S3C: I2Sv2: Add missing semicolon Jassi Brar
2010-03-10 7:48 ` [PATCH 02/20] ASoC: S3C: I2Sv2: Reject immidiate register value Jassi Brar
2010-03-10 7:48 ` [PATCH 03/20] ASoC: S3C64XX: I2S: Make BCLK independent of sample size Jassi Brar
2010-03-10 7:48 ` [PATCH 04/20] ASoC: S3C: I2Sv2: Remove S3C_IIS_V2_SUPPORTED define Jassi Brar
2010-03-10 7:48 ` [PATCH 05/20] ASoC: S3C: I2Sv2: Unify clock source IDs Jassi Brar
2010-03-10 7:48 ` [PATCH 06/20] ASoC: s3c-i2s-v2 remove unnecessary headers Jassi Brar
2010-03-10 7:48 ` [PATCH 07/20] ASoC: s3c64xx-i2s remove unncessary headers Jassi Brar
2010-03-10 7:48 ` [PATCH 08/20] ASoC: S3C64XX: I2S: Move RATE and FMT defines to header Jassi Brar
2010-03-10 7:48 ` [PATCH 09/20] ASoC: S3C: I2Sv2: Segregate hw_params callback Jassi Brar
2010-03-10 7:48 ` [PATCH 10/20] ASoC: S3C: I2Sv2: Move register definitions closer to driver Jassi Brar
2010-03-10 7:49 ` [PATCH 11/20] ASoC: SAMSUNG: I2S: Add bit definitions Jassi Brar
2010-03-10 7:49 ` [PATCH 12/20] ASoC: S3C2412: I2S: Debug IMS field Jassi Brar
2010-03-10 7:49 ` [PATCH 13/20] ASoC: S3C2412: I2S: Return correct source clock Jassi Brar
2010-03-10 7:49 ` [PATCH 14/20] ASoC: S3C: I2Sv2: Discard redundant field iis_clk Jassi Brar
2010-03-10 7:49 ` [PATCH 15/20] ASoC: S3C: I2Sv2: Unify i2s_get_clock callback Jassi Brar
2010-03-10 7:49 ` [PATCH 16/20] ASoC: S3C64XX: I2S: Use s3c2412 defines Jassi Brar
2010-03-10 7:49 ` [PATCH 17/20] ASoC: S3C: I2Sv2: Define new field for controller features Jassi Brar
2010-03-10 11:09 ` Mark Brown
2010-03-10 11:11 ` Mark Brown
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).