* [PATCH 0/7] S3C64XX IISv4 support
@ 2009-11-27 16:43 Mark Brown
2009-11-27 16:43 ` [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices Mark Brown
` (6 more replies)
0 siblings, 7 replies; 23+ messages in thread
From: Mark Brown @ 2009-11-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
This patch series adds the arch/arm changes required to support the
IISv4 block on the S3C6410 CPU, plus providing hookup for the block on
the SMDK6410. I know it's a bit late but it'd be great if we could get
this into 2.6.33 - it'd be *very* handy for ASoC development.
Jassi (1):
S3C64XX: Declare IISv4 PCLK for S3C6410
Mark Brown (6):
S3C64XX: Staticise platform data for PCM devices
S3C6410: Correct names of IISv4 data output pin definitions
S3C64XX: Add support for CLK_SRC2 configured clocks
S3C6410: Define CLK_AUDIO2 for IISv4 block
S3C6410: Use platform data to supply pin configuration for IISv4
SMDK6410: Register IISv4 device
arch/arm/mach-s3c6410/mach-smdk6410.c | 1 +
arch/arm/plat-s3c64xx/clock.c | 8 +++
arch/arm/plat-s3c64xx/dev-audio.c | 26 ++++++++-
arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h | 6 +-
arch/arm/plat-s3c64xx/include/plat/regs-clock.h | 4 ++
arch/arm/plat-s3c64xx/s3c6400-clock.c | 64 +++++++++++++++++++++-
6 files changed, 101 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
@ 2009-11-27 16:43 ` Mark Brown
2009-11-28 1:40 ` jassi brar
` (2 more replies)
2009-11-27 16:43 ` [PATCH 2/7] S3C6410: Correct names of IISv4 data output pin definitions Mark Brown
` (5 subsequent siblings)
6 siblings, 3 replies; 23+ messages in thread
From: Mark Brown @ 2009-11-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
The symbols aren't declared and don't need to be exported, they go
along with the device structure.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/arm/plat-s3c64xx/dev-audio.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
index 9e07344..a21a88f 100644
--- a/arch/arm/plat-s3c64xx/dev-audio.c
+++ b/arch/arm/plat-s3c64xx/dev-audio.c
@@ -118,7 +118,7 @@ static struct resource s3c64xx_pcm0_resource[] = {
},
};
-struct s3c_audio_pdata s3c_pcm0_pdata = {
+static struct s3c_audio_pdata s3c_pcm0_pdata = {
.cfg_gpio = s3c64xx_pcm_cfg_gpio,
};
@@ -151,7 +151,7 @@ static struct resource s3c64xx_pcm1_resource[] = {
},
};
-struct s3c_audio_pdata s3c_pcm1_pdata = {
+static struct s3c_audio_pdata s3c_pcm1_pdata = {
.cfg_gpio = s3c64xx_pcm_cfg_gpio,
};
--
1.6.5.3
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 2/7] S3C6410: Correct names of IISv4 data output pin definitions
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
2009-11-27 16:43 ` [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices Mark Brown
@ 2009-11-27 16:43 ` Mark Brown
2009-12-01 18:16 ` Ben Dooks
2009-11-27 16:43 ` [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks Mark Brown
` (4 subsequent siblings)
6 siblings, 1 reply; 23+ messages in thread
From: Mark Brown @ 2009-11-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
The naming of the defines suggests that there are three IISv4 ports
with one data line each when in fact there is a single IISv4 port
with three data lines.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h
index c47daf7..e22b49f 100644
--- a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h
+++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h
@@ -36,18 +36,18 @@
#define S3C64XX_GPC4_SPI_MISO1 (0x02 << 16)
#define S3C64XX_GPC4_MMC2_CMD (0x03 << 16)
-#define S3C64XX_GPC4_I2S0_V40_DO (0x05 << 16)
+#define S3C64XX_GPC4_I2S_V40_DO0 (0x05 << 16)
#define S3C64XX_GPC4_EINT_G2_4 (0x07 << 16)
#define S3C64XX_GPC5_SPI_CLK1 (0x02 << 20)
#define S3C64XX_GPC5_MMC2_CLK (0x03 << 20)
-#define S3C64XX_GPC5_I2S1_V40_DO (0x05 << 20)
+#define S3C64XX_GPC5_I2S_V40_DO1 (0x05 << 20)
#define S3C64XX_GPC5_EINT_G2_5 (0x07 << 20)
#define S3C64XX_GPC6_SPI_MOSI1 (0x02 << 24)
#define S3C64XX_GPC6_EINT_G2_6 (0x07 << 24)
#define S3C64XX_GPC7_SPI_nCS1 (0x02 << 28)
-#define S3C64XX_GPC7_I2S2_V40_DO (0x05 << 28)
+#define S3C64XX_GPC7_I2S_V40_DO2 (0x05 << 28)
#define S3C64XX_GPC7_EINT_G2_7 (0x07 << 28)
--
1.6.5.3
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
2009-11-27 16:43 ` [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices Mark Brown
2009-11-27 16:43 ` [PATCH 2/7] S3C6410: Correct names of IISv4 data output pin definitions Mark Brown
@ 2009-11-27 16:43 ` Mark Brown
2009-11-28 1:46 ` jassi brar
2009-12-01 18:17 ` Ben Dooks
2009-11-27 16:43 ` [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410 Mark Brown
` (3 subsequent siblings)
6 siblings, 2 replies; 23+ messages in thread
From: Mark Brown @ 2009-11-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
The S3C6410 has two clock source registers used for the clock muxes
but currently the s3c_clksrc_clk infrastructure hardcodes the first
one (where almost all of the clocks are). Make the source register
a part of the clock definition to support addition of clocks using
CLK_SRC2.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/arm/plat-s3c64xx/s3c6400-clock.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index 6ffa21e..b7e2015 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -61,6 +61,7 @@ struct clksrc_clk {
unsigned int divider_shift;
void __iomem *reg_divider;
+ void __iomem *reg_src;
};
static struct clk clk_fout_apll = {
@@ -86,6 +87,7 @@ static struct clksrc_clk clk_mout_apll = {
.shift = S3C6400_CLKSRC_APLL_MOUT_SHIFT,
.mask = S3C6400_CLKSRC_APLL_MOUT,
.sources = &clk_src_apll,
+ .reg_src = S3C_CLK_SRC,
};
static struct clk clk_fout_epll = {
@@ -111,6 +113,7 @@ static struct clksrc_clk clk_mout_epll = {
.shift = S3C6400_CLKSRC_EPLL_MOUT_SHIFT,
.mask = S3C6400_CLKSRC_EPLL_MOUT,
.sources = &clk_src_epll,
+ .reg_src = S3C_CLK_SRC,
};
static struct clk *clk_src_mpll_list[] = {
@@ -131,6 +134,7 @@ static struct clksrc_clk clk_mout_mpll = {
.shift = S3C6400_CLKSRC_MPLL_MOUT_SHIFT,
.mask = S3C6400_CLKSRC_MPLL_MOUT,
.sources = &clk_src_mpll,
+ .reg_src = S3C_CLK_SRC,
};
static unsigned int armclk_mask;
@@ -313,7 +317,7 @@ static int s3c64xx_setparent_clksrc(struct clk *clk, struct clk *parent)
{
struct clksrc_clk *sclk = to_clksrc(clk);
struct clk_sources *srcs = sclk->sources;
- u32 clksrc = __raw_readl(S3C_CLK_SRC);
+ u32 clksrc = __raw_readl(sclk->reg_src);
int src_nr = -1;
int ptr;
@@ -327,7 +331,7 @@ static int s3c64xx_setparent_clksrc(struct clk *clk, struct clk *parent)
clksrc &= ~sclk->mask;
clksrc |= src_nr << sclk->shift;
- __raw_writel(clksrc, S3C_CLK_SRC);
+ __raw_writel(clksrc, sclk->reg_src);
clk->parent = parent;
return 0;
@@ -374,6 +378,7 @@ static struct clksrc_clk clk_mmc0 = {
.sources = &clkset_spi_mmc,
.divider_shift = S3C6400_CLKDIV1_MMC0_SHIFT,
.reg_divider = S3C_CLK_DIV1,
+ .reg_src = S3C_CLK_SRC,
};
static struct clksrc_clk clk_mmc1 = {
@@ -392,6 +397,7 @@ static struct clksrc_clk clk_mmc1 = {
.sources = &clkset_spi_mmc,
.divider_shift = S3C6400_CLKDIV1_MMC1_SHIFT,
.reg_divider = S3C_CLK_DIV1,
+ .reg_src = S3C_CLK_SRC,
};
static struct clksrc_clk clk_mmc2 = {
@@ -410,6 +416,7 @@ static struct clksrc_clk clk_mmc2 = {
.sources = &clkset_spi_mmc,
.divider_shift = S3C6400_CLKDIV1_MMC2_SHIFT,
.reg_divider = S3C_CLK_DIV1,
+ .reg_src = S3C_CLK_SRC,
};
static struct clksrc_clk clk_usbhost = {
@@ -428,6 +435,7 @@ static struct clksrc_clk clk_usbhost = {
.sources = &clkset_uhost,
.divider_shift = S3C6400_CLKDIV1_UHOST_SHIFT,
.reg_divider = S3C_CLK_DIV1,
+ .reg_src = S3C_CLK_SRC,
};
static struct clksrc_clk clk_uart_uclk1 = {
@@ -446,6 +454,7 @@ static struct clksrc_clk clk_uart_uclk1 = {
.sources = &clkset_uart,
.divider_shift = S3C6400_CLKDIV2_UART_SHIFT,
.reg_divider = S3C_CLK_DIV2,
+ .reg_src = S3C_CLK_SRC,
};
/* Where does UCLK0 come from? */
@@ -466,6 +475,7 @@ static struct clksrc_clk clk_spi0 = {
.sources = &clkset_spi_mmc,
.divider_shift = S3C6400_CLKDIV2_SPI0_SHIFT,
.reg_divider = S3C_CLK_DIV2,
+ .reg_src = S3C_CLK_SRC,
};
static struct clksrc_clk clk_spi1 = {
@@ -484,6 +494,7 @@ static struct clksrc_clk clk_spi1 = {
.sources = &clkset_spi_mmc,
.divider_shift = S3C6400_CLKDIV2_SPI1_SHIFT,
.reg_divider = S3C_CLK_DIV2,
+ .reg_src = S3C_CLK_SRC,
};
static struct clk clk_iis_cd0 = {
@@ -530,6 +541,7 @@ static struct clksrc_clk clk_audio0 = {
.sources = &clkset_audio0,
.divider_shift = S3C6400_CLKDIV2_AUDIO0_SHIFT,
.reg_divider = S3C_CLK_DIV2,
+ .reg_src = S3C_CLK_SRC,
};
static struct clk *clkset_audio1_list[] = {
@@ -561,6 +573,7 @@ static struct clksrc_clk clk_audio1 = {
.sources = &clkset_audio1,
.divider_shift = S3C6400_CLKDIV2_AUDIO1_SHIFT,
.reg_divider = S3C_CLK_DIV2,
+ .reg_src = S3C_CLK_SRC,
};
static struct clksrc_clk clk_irda = {
@@ -579,6 +592,7 @@ static struct clksrc_clk clk_irda = {
.sources = &clkset_irda,
.divider_shift = S3C6400_CLKDIV2_IRDA_SHIFT,
.reg_divider = S3C_CLK_DIV2,
+ .reg_src = S3C_CLK_SRC,
};
static struct clk *clkset_camif_list[] = {
@@ -606,6 +620,7 @@ static struct clksrc_clk clk_camif = {
.sources = &clkset_camif,
.divider_shift = S3C6400_CLKDIV0_CAM_SHIFT,
.reg_divider = S3C_CLK_DIV0,
+ .reg_src = S3C_CLK_SRC,
};
/* Clock initialisation code */
@@ -630,7 +645,7 @@ static struct clksrc_clk *init_parents[] = {
static void __init_or_cpufreq s3c6400_set_clksrc(struct clksrc_clk *clk)
{
struct clk_sources *srcs = clk->sources;
- u32 clksrc = __raw_readl(S3C_CLK_SRC);
+ u32 clksrc = __raw_readl(clk->reg_src);
clksrc &= clk->mask;
clksrc >>= clk->shift;
--
1.6.5.3
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
` (2 preceding siblings ...)
2009-11-27 16:43 ` [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks Mark Brown
@ 2009-11-27 16:43 ` Mark Brown
2009-12-01 21:42 ` Ben Dooks
2009-11-27 16:43 ` [PATCH 5/7] S3C6410: Define CLK_AUDIO2 for IISv4 block Mark Brown
` (2 subsequent siblings)
6 siblings, 1 reply; 23+ messages in thread
From: Mark Brown @ 2009-11-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
From: Jassi <jassi.brar@samsung.com>
[Updated the device ID to -1 since there's only one IISv4 device but the
S3C clock API tries to match based on the ID of the requesting device
(and not the name) -- broonie.]
Signed-Off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/arm/plat-s3c64xx/clock.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-s3c64xx/clock.c b/arch/arm/plat-s3c64xx/clock.c
index 7a36e89..2f1548e 100644
--- a/arch/arm/plat-s3c64xx/clock.c
+++ b/arch/arm/plat-s3c64xx/clock.c
@@ -129,6 +129,14 @@ static struct clk init_clocks_disable[] = {
.enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_IIS1,
}, {
+#ifdef CONFIG_CPU_S3C6410
+ .name = "iis",
+ .id = -1, /* There's only one IISv4 port */
+ .parent = &clk_p,
+ .enable = s3c64xx_pclk_ctrl,
+ .ctrlbit = S3C6410_CLKCON_PCLK_IIS2,
+ }, {
+#endif
.name = "spi",
.id = 0,
.parent = &clk_p,
--
1.6.5.3
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 5/7] S3C6410: Define CLK_AUDIO2 for IISv4 block
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
` (3 preceding siblings ...)
2009-11-27 16:43 ` [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410 Mark Brown
@ 2009-11-27 16:43 ` Mark Brown
2009-11-27 16:43 ` [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4 Mark Brown
2009-11-27 16:43 ` [PATCH 7/7] SMDK6410: Register IISv4 device Mark Brown
6 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2009-11-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
Note that due to the way the S3C clock API does matching based on
the ID of the platform device the ID of CLK_AUDIO2 is set to -1.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/arm/plat-s3c64xx/include/plat/regs-clock.h | 4 ++
arch/arm/plat-s3c64xx/s3c6400-clock.c | 43 +++++++++++++++++++++++
2 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-s3c64xx/include/plat/regs-clock.h b/arch/arm/plat-s3c64xx/include/plat/regs-clock.h
index ff46e7f..8c429bb 100644
--- a/arch/arm/plat-s3c64xx/include/plat/regs-clock.h
+++ b/arch/arm/plat-s3c64xx/include/plat/regs-clock.h
@@ -25,6 +25,7 @@
#define S3C_EPLL_CON0 S3C_CLKREG(0x14)
#define S3C_EPLL_CON1 S3C_CLKREG(0x18)
#define S3C_CLK_SRC S3C_CLKREG(0x1C)
+#define S3C_CLK_SRC2 S3C_CLKREG(0x10C)
#define S3C_CLK_DIV0 S3C_CLKREG(0x20)
#define S3C_CLK_DIV1 S3C_CLKREG(0x24)
#define S3C_CLK_DIV2 S3C_CLKREG(0x28)
@@ -221,5 +222,8 @@
#define S3C6400_CLKSRC_UHOST_MASK (0x3 << 5)
#define S3C6400_CLKSRC_UHOST_SHIFT (5)
+/* CLK_SRC2 */
+#define S3C6410_CLKSRC_AUDIO2_MASK (0x7 << 0)
+#define S3C6410_CLKSRC_AUDIO2_SHIFT (0)
#endif /* _PLAT_REGS_CLOCK_H */
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index b7e2015..1dee8c5 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -507,6 +507,11 @@ static struct clk clk_iis_cd1 = {
.id = -1,
};
+static struct clk clk_iis_v4_cd = {
+ .name = "iis_v40_cdclk",
+ .id = -1,
+};
+
static struct clk clk_pcm_cd = {
.name = "pcm_cdclk",
.id = -1,
@@ -576,6 +581,42 @@ static struct clksrc_clk clk_audio1 = {
.reg_src = S3C_CLK_SRC,
};
+static struct clk *clkset_audio2_list[] = {
+ [0] = &clk_mout_epll.clk,
+ [1] = &clk_dout_mpll,
+ [2] = &clk_fin_epll,
+ [3] = &clk_iis_v4_cd,
+ [4] = &clk_pcm_cd,
+};
+
+static struct clk_sources clkset_audio2 = {
+ .sources = clkset_audio2_list,
+ .nr_sources = ARRAY_SIZE(clkset_audio2_list),
+};
+
+/* Note that due to hard coding of clock ID to platform device ID we
+ * declare the ID for this clock as -1 even though it's called AUDIO2
+ * by the datasheet.
+ */
+static struct clksrc_clk clk_audio2 = {
+ .clk = {
+ .name = "audio-bus",
+ .id = -1,
+ .ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2,
+ .enable = s3c64xx_sclk_ctrl,
+ .set_parent = s3c64xx_setparent_clksrc,
+ .get_rate = s3c64xx_getrate_clksrc,
+ .set_rate = s3c64xx_setrate_clksrc,
+ .round_rate = s3c64xx_roundrate_clksrc,
+ },
+ .shift = S3C6410_CLKSRC_AUDIO2_SHIFT,
+ .mask = S3C6410_CLKSRC_AUDIO2_MASK,
+ .sources = &clkset_audio2,
+ .divider_shift = S3C6410_CLKDIV2_AUDIO2_SHIFT,
+ .reg_divider = S3C_CLK_DIV2,
+ .reg_src = S3C_CLK_SRC2,
+};
+
static struct clksrc_clk clk_irda = {
.clk = {
.name = "irda-bus",
@@ -638,6 +679,7 @@ static struct clksrc_clk *init_parents[] = {
&clk_spi1,
&clk_audio0,
&clk_audio1,
+ &clk_audio2,
&clk_irda,
&clk_camif,
};
@@ -742,6 +784,7 @@ static struct clk *clks[] __initdata = {
&clk_spi1.clk,
&clk_audio0.clk,
&clk_audio1.clk,
+ &clk_audio2.clk,
&clk_irda.clk,
&clk_camif.clk,
&clk_arm,
--
1.6.5.3
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
` (4 preceding siblings ...)
2009-11-27 16:43 ` [PATCH 5/7] S3C6410: Define CLK_AUDIO2 for IISv4 block Mark Brown
@ 2009-11-27 16:43 ` Mark Brown
2009-11-28 1:31 ` jassi brar
2009-12-01 18:24 ` Ben Dooks
2009-11-27 16:43 ` [PATCH 7/7] SMDK6410: Register IISv4 device Mark Brown
6 siblings, 2 replies; 23+ messages in thread
From: Mark Brown @ 2009-11-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
Follow the lead of the PCM controller and make the driver less
directly dependant on the particular CPU configuration.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/arm/plat-s3c64xx/dev-audio.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
index a21a88f..e49e1eb 100644
--- a/arch/arm/plat-s3c64xx/dev-audio.c
+++ b/arch/arm/plat-s3c64xx/dev-audio.c
@@ -20,8 +20,10 @@
#include <plat/devs.h>
#include <plat/audio.h>
+#include <plat/gpio-bank-c.h>
#include <plat/gpio-bank-d.h>
#include <plat/gpio-bank-e.h>
+#include <plat/gpio-bank-h.h>
#include <plat/gpio-cfg.h>
static struct resource s3c64xx_iis0_resource[] = {
@@ -56,6 +58,23 @@ struct platform_device s3c64xx_device_iis1 = {
};
EXPORT_SYMBOL(s3c64xx_device_iis1);
+static int s3c64xx_iisv4_cfg_gpio(struct platform_device *pdev)
+{
+ s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C64XX_GPC4_I2S_V40_DO0);
+ s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C64XX_GPC5_I2S_V40_DO1);
+ s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C64XX_GPC7_I2S_V40_DO2);
+ s3c_gpio_cfgpin(S3C64XX_GPH(6), S3C64XX_GPH6_I2S_V40_BCLK);
+ s3c_gpio_cfgpin(S3C64XX_GPH(7), S3C64XX_GPH7_I2S_V40_CDCLK);
+ s3c_gpio_cfgpin(S3C64XX_GPH(8), S3C64XX_GPH8_I2S_V40_LRCLK);
+ s3c_gpio_cfgpin(S3C64XX_GPH(9), S3C64XX_GPH9_I2S_V40_DI);
+
+ return 0;
+}
+
+static struct s3c_audio_pdata s3c64xx_iisv4_pdata = {
+ .cfg_gpio = s3c64xx_iisv4_cfg_gpio,
+};
+
static struct resource s3c64xx_iisv4_resource[] = {
[0] = {
.start = S3C64XX_PA_IISV4,
@@ -69,6 +88,9 @@ struct platform_device s3c64xx_device_iisv4 = {
.id = -1,
.num_resources = ARRAY_SIZE(s3c64xx_iisv4_resource),
.resource = s3c64xx_iisv4_resource,
+ .dev = {
+ .platform_data = &s3c64xx_iisv4_pdata,
+ },
};
EXPORT_SYMBOL(s3c64xx_device_iisv4);
--
1.6.5.3
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 7/7] SMDK6410: Register IISv4 device
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
` (5 preceding siblings ...)
2009-11-27 16:43 ` [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4 Mark Brown
@ 2009-11-27 16:43 ` Mark Brown
6 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2009-11-27 16:43 UTC (permalink / raw)
To: linux-arm-kernel
The IISv4 controller is connected to the WM8580 on the board.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
arch/arm/mach-s3c6410/mach-smdk6410.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s3c6410/mach-smdk6410.c b/arch/arm/mach-s3c6410/mach-smdk6410.c
index 480d297..52d431c 100644
--- a/arch/arm/mach-s3c6410/mach-smdk6410.c
+++ b/arch/arm/mach-s3c6410/mach-smdk6410.c
@@ -236,6 +236,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
&s3c_device_fb,
&s3c_device_usb,
&s3c_device_usb_hsotg,
+ &s3c64xx_device_iisv4,
#ifdef CONFIG_REGULATOR
&smdk6410_b_pwr_5v,
--
1.6.5.3
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4
2009-11-27 16:43 ` [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4 Mark Brown
@ 2009-11-28 1:31 ` jassi brar
2009-12-01 18:24 ` Ben Dooks
1 sibling, 0 replies; 23+ messages in thread
From: jassi brar @ 2009-11-28 1:31 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Nov 28, 2009 at 1:43 AM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> Follow the lead of the PCM controller and make the driver less
> directly dependant on the particular CPU configuration.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> ?arch/arm/plat-s3c64xx/dev-audio.c | ? 22 ++++++++++++++++++++++
> ?1 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
> index a21a88f..e49e1eb 100644
> --- a/arch/arm/plat-s3c64xx/dev-audio.c
> +++ b/arch/arm/plat-s3c64xx/dev-audio.c
> @@ -20,8 +20,10 @@
>
> ?#include <plat/devs.h>
> ?#include <plat/audio.h>
> +#include <plat/gpio-bank-c.h>
> ?#include <plat/gpio-bank-d.h>
> ?#include <plat/gpio-bank-e.h>
> +#include <plat/gpio-bank-h.h>
> ?#include <plat/gpio-cfg.h>
>
> ?static struct resource s3c64xx_iis0_resource[] = {
> @@ -56,6 +58,23 @@ struct platform_device s3c64xx_device_iis1 = {
> ?};
> ?EXPORT_SYMBOL(s3c64xx_device_iis1);
>
> +static int s3c64xx_iisv4_cfg_gpio(struct platform_device *pdev)
> +{
> + ? ? ? s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C64XX_GPC4_I2S_V40_DO0);
> + ? ? ? s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C64XX_GPC5_I2S_V40_DO1);
> + ? ? ? s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C64XX_GPC7_I2S_V40_DO2);
> + ? ? ? s3c_gpio_cfgpin(S3C64XX_GPH(6), S3C64XX_GPH6_I2S_V40_BCLK);
> + ? ? ? s3c_gpio_cfgpin(S3C64XX_GPH(7), S3C64XX_GPH7_I2S_V40_CDCLK);
> + ? ? ? s3c_gpio_cfgpin(S3C64XX_GPH(8), S3C64XX_GPH8_I2S_V40_LRCLK);
> + ? ? ? s3c_gpio_cfgpin(S3C64XX_GPH(9), S3C64XX_GPH9_I2S_V40_DI);
> +
> + ? ? ? return 0;
> +}
> +
> +static struct s3c_audio_pdata s3c64xx_iisv4_pdata = {
> + ? ? ? .cfg_gpio = s3c64xx_iisv4_cfg_gpio,
> +};
> +
Yes. And I was preparing for v3 I2S controllers of s3c64xx too to be
converted this way, otherwise the forthcoming support for 6440,C100,C110
etc wud need duplication of the code.
> ?static struct resource s3c64xx_iisv4_resource[] = {
> ? ? ? ?[0] = {
> ? ? ? ? ? ? ? ?.start = S3C64XX_PA_IISV4,
> @@ -69,6 +88,9 @@ struct platform_device s3c64xx_device_iisv4 = {
> ? ? ? ?.id ? ? ? ? ? ? ? = -1,
> ? ? ? ?.num_resources ? ?= ARRAY_SIZE(s3c64xx_iisv4_resource),
> ? ? ? ?.resource ? ? ? ? = s3c64xx_iisv4_resource,
> + ? ? ? .dev = {
> + ? ? ? ? ? ? ? .platform_data = &s3c64xx_iisv4_pdata,
> + ? ? ? },
> ?};
> ?EXPORT_SYMBOL(s3c64xx_device_iisv4);
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices
2009-11-27 16:43 ` [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices Mark Brown
@ 2009-11-28 1:40 ` jassi brar
2009-12-01 18:08 ` Ben Dooks
2009-12-02 0:22 ` jassi brar
2009-12-03 22:01 ` Ben Dooks
2 siblings, 1 reply; 23+ messages in thread
From: jassi brar @ 2009-11-28 1:40 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Nov 28, 2009 at 1:43 AM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> The symbols aren't declared and don't need to be exported, they go
> along with the device structure.
yes, that was a careless omission on my part. thanks.
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> ?arch/arm/plat-s3c64xx/dev-audio.c | ? ?4 ++--
> ?1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
> index 9e07344..a21a88f 100644
> --- a/arch/arm/plat-s3c64xx/dev-audio.c
> +++ b/arch/arm/plat-s3c64xx/dev-audio.c
> @@ -118,7 +118,7 @@ static struct resource s3c64xx_pcm0_resource[] = {
> ? ? ? ?},
> ?};
>
> -struct s3c_audio_pdata s3c_pcm0_pdata = {
> +static struct s3c_audio_pdata s3c_pcm0_pdata = {
> ? ? ? ?.cfg_gpio = s3c64xx_pcm_cfg_gpio,
> ?};
>
> @@ -151,7 +151,7 @@ static struct resource s3c64xx_pcm1_resource[] = {
> ? ? ? ?},
> ?};
>
> -struct s3c_audio_pdata s3c_pcm1_pdata = {
> +static struct s3c_audio_pdata s3c_pcm1_pdata = {
> ? ? ? ?.cfg_gpio = s3c64xx_pcm_cfg_gpio,
> ?};
>
> --
> 1.6.5.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks
2009-11-27 16:43 ` [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks Mark Brown
@ 2009-11-28 1:46 ` jassi brar
2009-12-01 18:17 ` Ben Dooks
1 sibling, 0 replies; 23+ messages in thread
From: jassi brar @ 2009-11-28 1:46 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Nov 28, 2009 at 1:43 AM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> The S3C6410 has two clock source registers used for the clock muxes
> but currently the s3c_clksrc_clk infrastructure hardcodes the first
> one (where almost all of the clocks are). Make the source register
> a part of the clock definition to support addition of clocks using
> CLK_SRC2.
The s3c clock support is being restructured by Ben, so I didn't submit some
patches that i had ready at one time. Maybe this too wud either have to wait
or get consumed in the final changes.
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> ?arch/arm/plat-s3c64xx/s3c6400-clock.c | ? 21 ++++++++++++++++++---
> ?1 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
> index 6ffa21e..b7e2015 100644
> --- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
> +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
> @@ -61,6 +61,7 @@ struct clksrc_clk {
>
> ? ? ? ?unsigned int ? ? ? ? ? ?divider_shift;
> ? ? ? ?void __iomem ? ? ? ? ? ?*reg_divider;
> + ? ? ? void __iomem ? ? ? ? ? ?*reg_src;
> ?};
>
> ?static struct clk clk_fout_apll = {
> @@ -86,6 +87,7 @@ static struct clksrc_clk clk_mout_apll = {
> ? ? ? ?.shift ? ? ? ? ?= S3C6400_CLKSRC_APLL_MOUT_SHIFT,
> ? ? ? ?.mask ? ? ? ? ? = S3C6400_CLKSRC_APLL_MOUT,
> ? ? ? ?.sources ? ? ? ?= &clk_src_apll,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clk clk_fout_epll = {
> @@ -111,6 +113,7 @@ static struct clksrc_clk clk_mout_epll = {
> ? ? ? ?.shift ? ? ? ? ?= S3C6400_CLKSRC_EPLL_MOUT_SHIFT,
> ? ? ? ?.mask ? ? ? ? ? = S3C6400_CLKSRC_EPLL_MOUT,
> ? ? ? ?.sources ? ? ? ?= &clk_src_epll,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clk *clk_src_mpll_list[] = {
> @@ -131,6 +134,7 @@ static struct clksrc_clk clk_mout_mpll = {
> ? ? ? ?.shift ? ? ? ? ?= S3C6400_CLKSRC_MPLL_MOUT_SHIFT,
> ? ? ? ?.mask ? ? ? ? ? = S3C6400_CLKSRC_MPLL_MOUT,
> ? ? ? ?.sources ? ? ? ?= &clk_src_mpll,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static unsigned int armclk_mask;
> @@ -313,7 +317,7 @@ static int s3c64xx_setparent_clksrc(struct clk *clk, struct clk *parent)
> ?{
> ? ? ? ?struct clksrc_clk *sclk = to_clksrc(clk);
> ? ? ? ?struct clk_sources *srcs = sclk->sources;
> - ? ? ? u32 clksrc = __raw_readl(S3C_CLK_SRC);
> + ? ? ? u32 clksrc = __raw_readl(sclk->reg_src);
> ? ? ? ?int src_nr = -1;
> ? ? ? ?int ptr;
>
> @@ -327,7 +331,7 @@ static int s3c64xx_setparent_clksrc(struct clk *clk, struct clk *parent)
> ? ? ? ? ? ? ? ?clksrc &= ~sclk->mask;
> ? ? ? ? ? ? ? ?clksrc |= src_nr << sclk->shift;
>
> - ? ? ? ? ? ? ? __raw_writel(clksrc, S3C_CLK_SRC);
> + ? ? ? ? ? ? ? __raw_writel(clksrc, sclk->reg_src);
>
> ? ? ? ? ? ? ? ?clk->parent = parent;
> ? ? ? ? ? ? ? ?return 0;
> @@ -374,6 +378,7 @@ static struct clksrc_clk clk_mmc0 = {
> ? ? ? ?.sources ? ? ? ?= &clkset_spi_mmc,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV1_MMC0_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV1,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clksrc_clk clk_mmc1 = {
> @@ -392,6 +397,7 @@ static struct clksrc_clk clk_mmc1 = {
> ? ? ? ?.sources ? ? ? ?= &clkset_spi_mmc,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV1_MMC1_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV1,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clksrc_clk clk_mmc2 = {
> @@ -410,6 +416,7 @@ static struct clksrc_clk clk_mmc2 = {
> ? ? ? ?.sources ? ? ? ?= &clkset_spi_mmc,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV1_MMC2_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV1,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clksrc_clk clk_usbhost = {
> @@ -428,6 +435,7 @@ static struct clksrc_clk clk_usbhost = {
> ? ? ? ?.sources ? ? ? ?= &clkset_uhost,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV1_UHOST_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV1,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clksrc_clk clk_uart_uclk1 = {
> @@ -446,6 +454,7 @@ static struct clksrc_clk clk_uart_uclk1 = {
> ? ? ? ?.sources ? ? ? ?= &clkset_uart,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV2_UART_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV2,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?/* Where does UCLK0 come from? */
> @@ -466,6 +475,7 @@ static struct clksrc_clk clk_spi0 = {
> ? ? ? ?.sources ? ? ? ?= &clkset_spi_mmc,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV2_SPI0_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV2,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clksrc_clk clk_spi1 = {
> @@ -484,6 +494,7 @@ static struct clksrc_clk clk_spi1 = {
> ? ? ? ?.sources ? ? ? ?= &clkset_spi_mmc,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV2_SPI1_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV2,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clk clk_iis_cd0 = {
> @@ -530,6 +541,7 @@ static struct clksrc_clk clk_audio0 = {
> ? ? ? ?.sources ? ? ? ?= &clkset_audio0,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV2_AUDIO0_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV2,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clk *clkset_audio1_list[] = {
> @@ -561,6 +573,7 @@ static struct clksrc_clk clk_audio1 = {
> ? ? ? ?.sources ? ? ? ?= &clkset_audio1,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV2_AUDIO1_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV2,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clksrc_clk clk_irda = {
> @@ -579,6 +592,7 @@ static struct clksrc_clk clk_irda = {
> ? ? ? ?.sources ? ? ? ?= &clkset_irda,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV2_IRDA_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV2,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?static struct clk *clkset_camif_list[] = {
> @@ -606,6 +620,7 @@ static struct clksrc_clk clk_camif = {
> ? ? ? ?.sources ? ? ? ?= &clkset_camif,
> ? ? ? ?.divider_shift ?= S3C6400_CLKDIV0_CAM_SHIFT,
> ? ? ? ?.reg_divider ? ?= S3C_CLK_DIV0,
> + ? ? ? .reg_src ? ? ? ?= S3C_CLK_SRC,
> ?};
>
> ?/* Clock initialisation code */
> @@ -630,7 +645,7 @@ static struct clksrc_clk *init_parents[] = {
> ?static void __init_or_cpufreq s3c6400_set_clksrc(struct clksrc_clk *clk)
> ?{
> ? ? ? ?struct clk_sources *srcs = clk->sources;
> - ? ? ? u32 clksrc = __raw_readl(S3C_CLK_SRC);
> + ? ? ? u32 clksrc = __raw_readl(clk->reg_src);
>
> ? ? ? ?clksrc &= clk->mask;
> ? ? ? ?clksrc >>= clk->shift;
> --
> 1.6.5.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices
2009-11-28 1:40 ` jassi brar
@ 2009-12-01 18:08 ` Ben Dooks
0 siblings, 0 replies; 23+ messages in thread
From: Ben Dooks @ 2009-12-01 18:08 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Nov 28, 2009 at 10:40:47AM +0900, jassi brar wrote:
> On Sat, Nov 28, 2009 at 1:43 AM, Mark Brown
> <broonie@opensource.wolfsonmicro.com> wrote:
> > The symbols aren't declared and don't need to be exported, they go
> > along with the device structure.
> yes, that was a careless omission on my part. thanks.
would be nice to supply an Acked-by: line if you think this is a good idea.
> > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > ---
> > ?arch/arm/plat-s3c64xx/dev-audio.c | ? ?4 ++--
> > ?1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
> > index 9e07344..a21a88f 100644
> > --- a/arch/arm/plat-s3c64xx/dev-audio.c
> > +++ b/arch/arm/plat-s3c64xx/dev-audio.c
> > @@ -118,7 +118,7 @@ static struct resource s3c64xx_pcm0_resource[] = {
> > ? ? ? ?},
> > ?};
> >
> > -struct s3c_audio_pdata s3c_pcm0_pdata = {
> > +static struct s3c_audio_pdata s3c_pcm0_pdata = {
> > ? ? ? ?.cfg_gpio = s3c64xx_pcm_cfg_gpio,
> > ?};
> >
> > @@ -151,7 +151,7 @@ static struct resource s3c64xx_pcm1_resource[] = {
> > ? ? ? ?},
> > ?};
> >
> > -struct s3c_audio_pdata s3c_pcm1_pdata = {
> > +static struct s3c_audio_pdata s3c_pcm1_pdata = {
> > ? ? ? ?.cfg_gpio = s3c64xx_pcm_cfg_gpio,
> > ?};
> >
> > --
> > 1.6.5.3
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 2/7] S3C6410: Correct names of IISv4 data output pin definitions
2009-11-27 16:43 ` [PATCH 2/7] S3C6410: Correct names of IISv4 data output pin definitions Mark Brown
@ 2009-12-01 18:16 ` Ben Dooks
0 siblings, 0 replies; 23+ messages in thread
From: Ben Dooks @ 2009-12-01 18:16 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 27, 2009 at 04:43:54PM +0000, Mark Brown wrote:
> The naming of the defines suggests that there are three IISv4 ports
> with one data line each when in fact there is a single IISv4 port
> with three data lines.
ok, will sort this out.
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h
> index c47daf7..e22b49f 100644
> --- a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h
> +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h
> @@ -36,18 +36,18 @@
>
> #define S3C64XX_GPC4_SPI_MISO1 (0x02 << 16)
> #define S3C64XX_GPC4_MMC2_CMD (0x03 << 16)
> -#define S3C64XX_GPC4_I2S0_V40_DO (0x05 << 16)
> +#define S3C64XX_GPC4_I2S_V40_DO0 (0x05 << 16)
> #define S3C64XX_GPC4_EINT_G2_4 (0x07 << 16)
>
> #define S3C64XX_GPC5_SPI_CLK1 (0x02 << 20)
> #define S3C64XX_GPC5_MMC2_CLK (0x03 << 20)
> -#define S3C64XX_GPC5_I2S1_V40_DO (0x05 << 20)
> +#define S3C64XX_GPC5_I2S_V40_DO1 (0x05 << 20)
> #define S3C64XX_GPC5_EINT_G2_5 (0x07 << 20)
>
> #define S3C64XX_GPC6_SPI_MOSI1 (0x02 << 24)
> #define S3C64XX_GPC6_EINT_G2_6 (0x07 << 24)
>
> #define S3C64XX_GPC7_SPI_nCS1 (0x02 << 28)
> -#define S3C64XX_GPC7_I2S2_V40_DO (0x05 << 28)
> +#define S3C64XX_GPC7_I2S_V40_DO2 (0x05 << 28)
> #define S3C64XX_GPC7_EINT_G2_7 (0x07 << 28)
>
> --
> 1.6.5.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks
2009-11-27 16:43 ` [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks Mark Brown
2009-11-28 1:46 ` jassi brar
@ 2009-12-01 18:17 ` Ben Dooks
1 sibling, 0 replies; 23+ messages in thread
From: Ben Dooks @ 2009-12-01 18:17 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 27, 2009 at 04:43:55PM +0000, Mark Brown wrote:
> The S3C6410 has two clock source registers used for the clock muxes
> but currently the s3c_clksrc_clk infrastructure hardcodes the first
> one (where almost all of the clocks are). Make the source register
> a part of the clock definition to support addition of clocks using
> CLK_SRC2.
the clock updates that where posted late last night will sort this
out.
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> arch/arm/plat-s3c64xx/s3c6400-clock.c | 21 ++++++++++++++++++---
> 1 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
> index 6ffa21e..b7e2015 100644
> --- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
> +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
> @@ -61,6 +61,7 @@ struct clksrc_clk {
>
> unsigned int divider_shift;
> void __iomem *reg_divider;
> + void __iomem *reg_src;
> };
>
> static struct clk clk_fout_apll = {
> @@ -86,6 +87,7 @@ static struct clksrc_clk clk_mout_apll = {
> .shift = S3C6400_CLKSRC_APLL_MOUT_SHIFT,
> .mask = S3C6400_CLKSRC_APLL_MOUT,
> .sources = &clk_src_apll,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clk clk_fout_epll = {
> @@ -111,6 +113,7 @@ static struct clksrc_clk clk_mout_epll = {
> .shift = S3C6400_CLKSRC_EPLL_MOUT_SHIFT,
> .mask = S3C6400_CLKSRC_EPLL_MOUT,
> .sources = &clk_src_epll,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clk *clk_src_mpll_list[] = {
> @@ -131,6 +134,7 @@ static struct clksrc_clk clk_mout_mpll = {
> .shift = S3C6400_CLKSRC_MPLL_MOUT_SHIFT,
> .mask = S3C6400_CLKSRC_MPLL_MOUT,
> .sources = &clk_src_mpll,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static unsigned int armclk_mask;
> @@ -313,7 +317,7 @@ static int s3c64xx_setparent_clksrc(struct clk *clk, struct clk *parent)
> {
> struct clksrc_clk *sclk = to_clksrc(clk);
> struct clk_sources *srcs = sclk->sources;
> - u32 clksrc = __raw_readl(S3C_CLK_SRC);
> + u32 clksrc = __raw_readl(sclk->reg_src);
> int src_nr = -1;
> int ptr;
>
> @@ -327,7 +331,7 @@ static int s3c64xx_setparent_clksrc(struct clk *clk, struct clk *parent)
> clksrc &= ~sclk->mask;
> clksrc |= src_nr << sclk->shift;
>
> - __raw_writel(clksrc, S3C_CLK_SRC);
> + __raw_writel(clksrc, sclk->reg_src);
>
> clk->parent = parent;
> return 0;
> @@ -374,6 +378,7 @@ static struct clksrc_clk clk_mmc0 = {
> .sources = &clkset_spi_mmc,
> .divider_shift = S3C6400_CLKDIV1_MMC0_SHIFT,
> .reg_divider = S3C_CLK_DIV1,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clksrc_clk clk_mmc1 = {
> @@ -392,6 +397,7 @@ static struct clksrc_clk clk_mmc1 = {
> .sources = &clkset_spi_mmc,
> .divider_shift = S3C6400_CLKDIV1_MMC1_SHIFT,
> .reg_divider = S3C_CLK_DIV1,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clksrc_clk clk_mmc2 = {
> @@ -410,6 +416,7 @@ static struct clksrc_clk clk_mmc2 = {
> .sources = &clkset_spi_mmc,
> .divider_shift = S3C6400_CLKDIV1_MMC2_SHIFT,
> .reg_divider = S3C_CLK_DIV1,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clksrc_clk clk_usbhost = {
> @@ -428,6 +435,7 @@ static struct clksrc_clk clk_usbhost = {
> .sources = &clkset_uhost,
> .divider_shift = S3C6400_CLKDIV1_UHOST_SHIFT,
> .reg_divider = S3C_CLK_DIV1,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clksrc_clk clk_uart_uclk1 = {
> @@ -446,6 +454,7 @@ static struct clksrc_clk clk_uart_uclk1 = {
> .sources = &clkset_uart,
> .divider_shift = S3C6400_CLKDIV2_UART_SHIFT,
> .reg_divider = S3C_CLK_DIV2,
> + .reg_src = S3C_CLK_SRC,
> };
>
> /* Where does UCLK0 come from? */
> @@ -466,6 +475,7 @@ static struct clksrc_clk clk_spi0 = {
> .sources = &clkset_spi_mmc,
> .divider_shift = S3C6400_CLKDIV2_SPI0_SHIFT,
> .reg_divider = S3C_CLK_DIV2,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clksrc_clk clk_spi1 = {
> @@ -484,6 +494,7 @@ static struct clksrc_clk clk_spi1 = {
> .sources = &clkset_spi_mmc,
> .divider_shift = S3C6400_CLKDIV2_SPI1_SHIFT,
> .reg_divider = S3C_CLK_DIV2,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clk clk_iis_cd0 = {
> @@ -530,6 +541,7 @@ static struct clksrc_clk clk_audio0 = {
> .sources = &clkset_audio0,
> .divider_shift = S3C6400_CLKDIV2_AUDIO0_SHIFT,
> .reg_divider = S3C_CLK_DIV2,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clk *clkset_audio1_list[] = {
> @@ -561,6 +573,7 @@ static struct clksrc_clk clk_audio1 = {
> .sources = &clkset_audio1,
> .divider_shift = S3C6400_CLKDIV2_AUDIO1_SHIFT,
> .reg_divider = S3C_CLK_DIV2,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clksrc_clk clk_irda = {
> @@ -579,6 +592,7 @@ static struct clksrc_clk clk_irda = {
> .sources = &clkset_irda,
> .divider_shift = S3C6400_CLKDIV2_IRDA_SHIFT,
> .reg_divider = S3C_CLK_DIV2,
> + .reg_src = S3C_CLK_SRC,
> };
>
> static struct clk *clkset_camif_list[] = {
> @@ -606,6 +620,7 @@ static struct clksrc_clk clk_camif = {
> .sources = &clkset_camif,
> .divider_shift = S3C6400_CLKDIV0_CAM_SHIFT,
> .reg_divider = S3C_CLK_DIV0,
> + .reg_src = S3C_CLK_SRC,
> };
>
> /* Clock initialisation code */
> @@ -630,7 +645,7 @@ static struct clksrc_clk *init_parents[] = {
> static void __init_or_cpufreq s3c6400_set_clksrc(struct clksrc_clk *clk)
> {
> struct clk_sources *srcs = clk->sources;
> - u32 clksrc = __raw_readl(S3C_CLK_SRC);
> + u32 clksrc = __raw_readl(clk->reg_src);
>
> clksrc &= clk->mask;
> clksrc >>= clk->shift;
> --
> 1.6.5.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4
2009-11-27 16:43 ` [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4 Mark Brown
2009-11-28 1:31 ` jassi brar
@ 2009-12-01 18:24 ` Ben Dooks
1 sibling, 0 replies; 23+ messages in thread
From: Ben Dooks @ 2009-12-01 18:24 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 27, 2009 at 04:43:58PM +0000, Mark Brown wrote:
> Follow the lead of the PCM controller and make the driver less
> directly dependant on the particular CPU configuration.
ok, will apply.
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> arch/arm/plat-s3c64xx/dev-audio.c | 22 ++++++++++++++++++++++
> 1 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
> index a21a88f..e49e1eb 100644
> --- a/arch/arm/plat-s3c64xx/dev-audio.c
> +++ b/arch/arm/plat-s3c64xx/dev-audio.c
> @@ -20,8 +20,10 @@
>
> #include <plat/devs.h>
> #include <plat/audio.h>
> +#include <plat/gpio-bank-c.h>
> #include <plat/gpio-bank-d.h>
> #include <plat/gpio-bank-e.h>
> +#include <plat/gpio-bank-h.h>
> #include <plat/gpio-cfg.h>
>
> static struct resource s3c64xx_iis0_resource[] = {
> @@ -56,6 +58,23 @@ struct platform_device s3c64xx_device_iis1 = {
> };
> EXPORT_SYMBOL(s3c64xx_device_iis1);
>
> +static int s3c64xx_iisv4_cfg_gpio(struct platform_device *pdev)
> +{
> + s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C64XX_GPC4_I2S_V40_DO0);
> + s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C64XX_GPC5_I2S_V40_DO1);
> + s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C64XX_GPC7_I2S_V40_DO2);
> + s3c_gpio_cfgpin(S3C64XX_GPH(6), S3C64XX_GPH6_I2S_V40_BCLK);
> + s3c_gpio_cfgpin(S3C64XX_GPH(7), S3C64XX_GPH7_I2S_V40_CDCLK);
> + s3c_gpio_cfgpin(S3C64XX_GPH(8), S3C64XX_GPH8_I2S_V40_LRCLK);
> + s3c_gpio_cfgpin(S3C64XX_GPH(9), S3C64XX_GPH9_I2S_V40_DI);
> +
> + return 0;
> +}
> +
> +static struct s3c_audio_pdata s3c64xx_iisv4_pdata = {
> + .cfg_gpio = s3c64xx_iisv4_cfg_gpio,
> +};
> +
> static struct resource s3c64xx_iisv4_resource[] = {
> [0] = {
> .start = S3C64XX_PA_IISV4,
> @@ -69,6 +88,9 @@ struct platform_device s3c64xx_device_iisv4 = {
> .id = -1,
> .num_resources = ARRAY_SIZE(s3c64xx_iisv4_resource),
> .resource = s3c64xx_iisv4_resource,
> + .dev = {
> + .platform_data = &s3c64xx_iisv4_pdata,
> + },
> };
> EXPORT_SYMBOL(s3c64xx_device_iisv4);
>
> --
> 1.6.5.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410
2009-11-27 16:43 ` [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410 Mark Brown
@ 2009-12-01 21:42 ` Ben Dooks
2009-12-02 0:50 ` jassi brar
2009-12-02 11:20 ` Mark Brown
0 siblings, 2 replies; 23+ messages in thread
From: Ben Dooks @ 2009-12-01 21:42 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 27, 2009 at 04:43:56PM +0000, Mark Brown wrote:
> From: Jassi <jassi.brar@samsung.com>
>
> [Updated the device ID to -1 since there's only one IISv4 device but the
> S3C clock API tries to match based on the ID of the requesting device
> (and not the name) -- broonie.]
I had a quick look at the other clock changes and there are a couple
of questions that have come up:
1) If changing the .id field of the iisv4 device really a good idea,
especially if there might be more than one of them in the future?
2) The clock name for the current audio bus clock for the iisv4 unit
is wrong as we're using it for both the iis and iisv4 blocks. It
might be worth renaming the clock for the iisv4 audio bus before
looking at changing the usage of the clock support (once the current
changes have been sorted)
As such is the #ifdef of the clock code when the S3C6410 support
really necesary?
> Signed-Off-by: Jassi <jassi.brar@samsung.com>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> arch/arm/plat-s3c64xx/clock.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-s3c64xx/clock.c b/arch/arm/plat-s3c64xx/clock.c
> index 7a36e89..2f1548e 100644
> --- a/arch/arm/plat-s3c64xx/clock.c
> +++ b/arch/arm/plat-s3c64xx/clock.c
> @@ -129,6 +129,14 @@ static struct clk init_clocks_disable[] = {
> .enable = s3c64xx_pclk_ctrl,
> .ctrlbit = S3C_CLKCON_PCLK_IIS1,
> }, {
> +#ifdef CONFIG_CPU_S3C6410
> + .name = "iis",
> + .id = -1, /* There's only one IISv4 port */
> + .parent = &clk_p,
> + .enable = s3c64xx_pclk_ctrl,
> + .ctrlbit = S3C6410_CLKCON_PCLK_IIS2,
> + }, {
> +#endif
> .name = "spi",
> .id = 0,
> .parent = &clk_p,
> --
> 1.6.5.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices
2009-11-27 16:43 ` [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices Mark Brown
2009-11-28 1:40 ` jassi brar
@ 2009-12-02 0:22 ` jassi brar
2009-12-03 22:01 ` Ben Dooks
2 siblings, 0 replies; 23+ messages in thread
From: jassi brar @ 2009-12-02 0:22 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Nov 28, 2009 at 1:43 AM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> The symbols aren't declared and don't need to be exported, they go
> along with the device structure.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> ?arch/arm/plat-s3c64xx/dev-audio.c | ? ?4 ++--
> ?1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
> index 9e07344..a21a88f 100644
> --- a/arch/arm/plat-s3c64xx/dev-audio.c
> +++ b/arch/arm/plat-s3c64xx/dev-audio.c
> @@ -118,7 +118,7 @@ static struct resource s3c64xx_pcm0_resource[] = {
> ? ? ? ?},
> ?};
>
> -struct s3c_audio_pdata s3c_pcm0_pdata = {
> +static struct s3c_audio_pdata s3c_pcm0_pdata = {
> ? ? ? ?.cfg_gpio = s3c64xx_pcm_cfg_gpio,
> ?};
>
> @@ -151,7 +151,7 @@ static struct resource s3c64xx_pcm1_resource[] = {
> ? ? ? ?},
> ?};
>
> -struct s3c_audio_pdata s3c_pcm1_pdata = {
> +static struct s3c_audio_pdata s3c_pcm1_pdata = {
> ? ? ? ?.cfg_gpio = s3c64xx_pcm_cfg_gpio,
> ?};
>
> --
> 1.6.5.3
Acked-By: Jassi Brar <jassi.brar@samsung.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410
2009-12-01 21:42 ` Ben Dooks
@ 2009-12-02 0:50 ` jassi brar
2009-12-02 12:10 ` Mark Brown
2009-12-02 11:20 ` Mark Brown
1 sibling, 1 reply; 23+ messages in thread
From: jassi brar @ 2009-12-02 0:50 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 2, 2009 at 6:42 AM, Ben Dooks <ben-linux@fluff.org> wrote:
> On Fri, Nov 27, 2009 at 04:43:56PM +0000, Mark Brown wrote:
>> From: Jassi <jassi.brar@samsung.com>
>>
>> [Updated the device ID to -1 since there's only one IISv4 device but the
>> S3C clock API tries to match based on the ID of the requesting device
>> (and not the name) -- broonie.]
>
> I had a quick look at the other clock changes and there are a couple
> of questions that have come up:
>
> 1) If changing the .id field of the iisv4 device really a good idea,
> ? especially if there might be more than one of them in the future?
I agree.
Also, changing indices of devices with disregard to their respective clock
might force further adhoc changes in system resources.
I think, best wud be to modify s3c64xx_i2s.c to support 2 channel, 6
channel, h/w mixing(maybe LP-Audio feature too) and pass flag for each
feature via platform data
by something like:- .has_6_channels, .has_hw_mixer, .has_lp_audio etc
The point to note here is to write drivers around functionality, rather than
version, of the controller.
> 2) The clock name for the current audio bus clock for the iisv4 unit
> ? is wrong as we're using it for both the iis and iisv4 blocks. It
> ? might be worth renaming the clock for the iisv4 audio bus before
> ? looking at changing the usage of the clock support (once the current
> ? changes have been sorted)
> As such is the #ifdef of the clock code when the S3C6410 support
> really necesary?
>
>> Signed-Off-by: Jassi <jassi.brar@samsung.com>
>> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>> ---
>> ?arch/arm/plat-s3c64xx/clock.c | ? ?8 ++++++++
>> ?1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/plat-s3c64xx/clock.c b/arch/arm/plat-s3c64xx/clock.c
>> index 7a36e89..2f1548e 100644
>> --- a/arch/arm/plat-s3c64xx/clock.c
>> +++ b/arch/arm/plat-s3c64xx/clock.c
>> @@ -129,6 +129,14 @@ static struct clk init_clocks_disable[] = {
>> ? ? ? ? ? ? ? .enable ? ? ? ? = s3c64xx_pclk_ctrl,
>> ? ? ? ? ? ? ? .ctrlbit ? ? ? ?= S3C_CLKCON_PCLK_IIS1,
>> ? ? ? }, {
>> +#ifdef CONFIG_CPU_S3C6410
>> + ? ? ? ? ? ? .name ? ? ? ? ? = "iis",
>> + ? ? ? ? ? ? .id ? ? ? ? ? ? = -1, ?/* There's only one IISv4 port */
>> + ? ? ? ? ? ? .parent ? ? ? ? = &clk_p,
>> + ? ? ? ? ? ? .enable ? ? ? ? = s3c64xx_pclk_ctrl,
>> + ? ? ? ? ? ? .ctrlbit ? ? ? ?= S3C6410_CLKCON_PCLK_IIS2,
>> + ? ? }, {
>> +#endif
>> ? ? ? ? ? ? ? .name ? ? ? ? ? = "spi",
>> ? ? ? ? ? ? ? .id ? ? ? ? ? ? = 0,
>> ? ? ? ? ? ? ? .parent ? ? ? ? = &clk_p,
>> --
>> 1.6.5.3
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> --
> --
> Ben
>
> Q: ? ? ?What's a light-year?
> A: ? ? ?One-third less calories than a regular year.
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410
2009-12-01 21:42 ` Ben Dooks
2009-12-02 0:50 ` jassi brar
@ 2009-12-02 11:20 ` Mark Brown
1 sibling, 0 replies; 23+ messages in thread
From: Mark Brown @ 2009-12-02 11:20 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Dec 01, 2009 at 09:42:01PM +0000, Ben Dooks wrote:
> On Fri, Nov 27, 2009 at 04:43:56PM +0000, Mark Brown wrote:
> > [Updated the device ID to -1 since there's only one IISv4 device but the
> > S3C clock API tries to match based on the ID of the requesting device
> I had a quick look at the other clock changes and there are a couple
> of questions that have come up:
> 1) If changing the .id field of the iisv4 device really a good idea,
> especially if there might be more than one of them in the future?
Half the problem here is that the current S3C clock implementation is
doing a half clkdevish thing and matching on the id field of the struct
device that gets passed in with no indirection. This means that the
either the devices or the clocks need their ids fixing to match the
other. If we're worrying about further chips sharing the same clock
tree definition tables we also need to worry about the possibility that
a chip is going to come along which swaps out the hookup for one IP
block with another unrelated IP block.
With the current scheme I imagine that all of this would be handled with
conditional registration of the affected clocks based on the chip we're
running on.
> 2) The clock name for the current audio bus clock for the iisv4 unit
> is wrong as we're using it for both the iis and iisv4 blocks. It
I'm not sure what you mean by this. The IIS and IISv4 blocks both use
the same clock names in their documentation (as does the PCM block).
> might be worth renaming the clock for the iisv4 audio bus before
> looking at changing the usage of the clock support (once the current
> changes have been sorted)
What name would you suggest?
> As such is the #ifdef of the clock code when the S3C6410 support
> really necesary?
I inherited that bit from Jassi's original patch. The IISv4 block is
not present on the S3C6400 so it didn't seem unreasonable.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410
2009-12-02 0:50 ` jassi brar
@ 2009-12-02 12:10 ` Mark Brown
2009-12-04 13:17 ` jassi brar
0 siblings, 1 reply; 23+ messages in thread
From: Mark Brown @ 2009-12-02 12:10 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 02, 2009 at 09:50:15AM +0900, jassi brar wrote:
> On Wed, Dec 2, 2009 at 6:42 AM, Ben Dooks <ben-linux@fluff.org> wrote:
> > 1) If changing the .id field of the iisv4 device really a good idea,
> > ? especially if there might be more than one of them in the future?
> Also, changing indices of devices with disregard to their respective clock
> might force further adhoc changes in system resources.
Well, from that point of view we'd be much better off with clkdev which
completely avoids the need to fiddle with id numbers to match clocks and
devices; the fact that this is a concern is really a limitation of the
clock API and open to fragility. There would also be issues if someone
decided to do something like hang the PCM controllers off CLKAUDIO1 and
2 instead of 0 and 1, for example. It's only a concern because there is
insufficient abstracton between the devices and clocks.
> I think, best wud be to modify s3c64xx_i2s.c to support 2 channel, 6
> channel, h/w mixing(maybe LP-Audio feature too) and pass flag for each
> feature via platform data
> by something like:- .has_6_channels, .has_hw_mixer, .has_lp_audio etc
> The point to note here is to write drivers around functionality, rather than
> version, of the controller.
This can also be addressed via use of library code (which is what's
happening at the minute for the stuff that's shared between the 24xx and
64xx series). You can also look at this from the point of view of
saying that IP blocks that are documented as having separate programming
interfaces should be presented in a similar way to the user so that it's
easier for them to find the functionality they need.
None of the approach I'm suggesting means that we can't have a single
driver file which handles more than one revision of the controller, we
can always move the registration of multiple variants into a single
source file. The benefit is that we're not forced to do that so if the
conditional code gets to be too much which does seem likely - there's
already differences going from 24xx to 64xx, and I seem to recall that
there are some incompatibilities between IISv2 and IISv4 on the 6410 too.
Since Samsung have not been willing to share documentation (I do have
access to some but not all) it's hard to comment in detail on the most
tasteful way of handling all these things but I have particular concerns
about trying to fit more substantial functionality like hardware mixing
support into the existing driver.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices
2009-11-27 16:43 ` [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices Mark Brown
2009-11-28 1:40 ` jassi brar
2009-12-02 0:22 ` jassi brar
@ 2009-12-03 22:01 ` Ben Dooks
2009-12-03 22:57 ` Mark Brown
2 siblings, 1 reply; 23+ messages in thread
From: Ben Dooks @ 2009-12-03 22:01 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 27, 2009 at 04:43:53PM +0000, Mark Brown wrote:
> The symbols aren't declared and don't need to be exported, they go
> along with the device structure.
hmm, the platform data configuration patch seems to be missing, is this
based on something earlier that has been missed?
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> arch/arm/plat-s3c64xx/dev-audio.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
> index 9e07344..a21a88f 100644
> --- a/arch/arm/plat-s3c64xx/dev-audio.c
> +++ b/arch/arm/plat-s3c64xx/dev-audio.c
> @@ -118,7 +118,7 @@ static struct resource s3c64xx_pcm0_resource[] = {
> },
> };
>
> -struct s3c_audio_pdata s3c_pcm0_pdata = {
> +static struct s3c_audio_pdata s3c_pcm0_pdata = {
> .cfg_gpio = s3c64xx_pcm_cfg_gpio,
> };
>
> @@ -151,7 +151,7 @@ static struct resource s3c64xx_pcm1_resource[] = {
> },
> };
>
> -struct s3c_audio_pdata s3c_pcm1_pdata = {
> +static struct s3c_audio_pdata s3c_pcm1_pdata = {
> .cfg_gpio = s3c64xx_pcm_cfg_gpio,
> };
>
> --
> 1.6.5.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices
2009-12-03 22:01 ` Ben Dooks
@ 2009-12-03 22:57 ` Mark Brown
0 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2009-12-03 22:57 UTC (permalink / raw)
To: linux-arm-kernel
On 3 Dec 2009, at 22:01, Ben Dooks <ben-linux@fluff.org> wrote:
> On Fri, Nov 27, 2009 at 04:43:53PM +0000, Mark Brown wrote:
>> The symbols aren't declared and don't need to be exported, they go
>> along with the device structure.
>
> hmm, the platform data configuration patch seems to be missing, is
> this
> based on something earlier that has been missed?
Doh, that's in the ASoC tree. I'll apply this myself. Sorry.
>
>> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>> ---
>> arch/arm/plat-s3c64xx/dev-audio.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-
>> s3c64xx/dev-audio.c
>> index 9e07344..a21a88f 100644
>> --- a/arch/arm/plat-s3c64xx/dev-audio.c
>> +++ b/arch/arm/plat-s3c64xx/dev-audio.c
>> @@ -118,7 +118,7 @@ static struct resource s3c64xx_pcm0_resource[]
>> = {
>> },
>> };
>>
>> -struct s3c_audio_pdata s3c_pcm0_pdata = {
>> +static struct s3c_audio_pdata s3c_pcm0_pdata = {
>> .cfg_gpio = s3c64xx_pcm_cfg_gpio,
>> };
>>
>> @@ -151,7 +151,7 @@ static struct resource s3c64xx_pcm1_resource[]
>> = {
>> },
>> };
>>
>> -struct s3c_audio_pdata s3c_pcm1_pdata = {
>> +static struct s3c_audio_pdata s3c_pcm1_pdata = {
>> .cfg_gpio = s3c64xx_pcm_cfg_gpio,
>> };
>>
>> --
>> 1.6.5.3
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> --
> --
> Ben
>
> Q: What's a light-year?
> A: One-third less calories than a regular year.
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410
2009-12-02 12:10 ` Mark Brown
@ 2009-12-04 13:17 ` jassi brar
0 siblings, 0 replies; 23+ messages in thread
From: jassi brar @ 2009-12-04 13:17 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 2, 2009 at 9:10 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Wed, Dec 02, 2009 at 09:50:15AM +0900, jassi brar wrote:
>> On Wed, Dec 2, 2009 at 6:42 AM, Ben Dooks <ben-linux@fluff.org> wrote:
>
>> > 1) If changing the .id field of the iisv4 device really a good idea,
>> > ? especially if there might be more than one of them in the future?
>
>> Also, changing indices of devices with disregard to their respective clock
>> might force further adhoc changes in system resources.
>
> Well, from that point of view we'd be much better off with clkdev which
> completely avoids the need to fiddle with id numbers to match clocks and
> devices; the fact that this is a concern is really a limitation of the
> clock API and open to fragility. ?There would also be issues if someone
> decided to do something like hang the PCM controllers off CLKAUDIO1 and
> 2 instead of 0 and 1, for example. ?It's only a concern because there is
> insufficient abstracton between the devices and clocks.
>
>> I think, best wud be to modify s3c64xx_i2s.c to support 2 channel, 6
>> channel, h/w mixing(maybe LP-Audio feature too) and pass flag for each
>> feature via platform data
>> by something like:- ?.has_6_channels, .has_hw_mixer, .has_lp_audio etc
>
>> The point to note here is to write drivers around functionality, rather than
>> version, of the controller.
>
> This can also be addressed via use of library code (which is what's
> happening at the minute for the stuff that's shared between the 24xx and
> 64xx series).
yes ofcourse.
> ?You can also look at this from the point of view of
> saying that IP blocks that are documented as having separate programming
> interfaces should be presented in a similar way to the user so that it's
> easier for them to find the functionality they need.
>
> None of the approach I'm suggesting means that we can't have a single
> driver file which handles more than one revision of the controller, we
> can always move the registration of multiple variants into a single
> source file. ?The benefit is that we're not forced to do that so if the
> conditional code gets to be too much which does seem likely - there's
> already differences going from 24xx to 64xx, and I seem to recall that
> there are some incompatibilities between IISv2 and IISv4 on the 6410 too.
>
> Since Samsung have not been willing to share documentation (I do have
> access to some but not all) it's hard to comment in detail on the most
> tasteful way of handling all these things
If I am aware of what things u miss, i can try to reply in some permissible way.
> but I have particular concerns
> about trying to fit more substantial functionality like hardware mixing
> support into the existing driver.
that was just to make the point. I understand h/w mixing needs to be
implemented as a 'secondary' playback stream. I have not got down to
implement more features as yet.
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2009-12-04 13:17 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
2009-11-27 16:43 ` [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices Mark Brown
2009-11-28 1:40 ` jassi brar
2009-12-01 18:08 ` Ben Dooks
2009-12-02 0:22 ` jassi brar
2009-12-03 22:01 ` Ben Dooks
2009-12-03 22:57 ` Mark Brown
2009-11-27 16:43 ` [PATCH 2/7] S3C6410: Correct names of IISv4 data output pin definitions Mark Brown
2009-12-01 18:16 ` Ben Dooks
2009-11-27 16:43 ` [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks Mark Brown
2009-11-28 1:46 ` jassi brar
2009-12-01 18:17 ` Ben Dooks
2009-11-27 16:43 ` [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410 Mark Brown
2009-12-01 21:42 ` Ben Dooks
2009-12-02 0:50 ` jassi brar
2009-12-02 12:10 ` Mark Brown
2009-12-04 13:17 ` jassi brar
2009-12-02 11:20 ` Mark Brown
2009-11-27 16:43 ` [PATCH 5/7] S3C6410: Define CLK_AUDIO2 for IISv4 block Mark Brown
2009-11-27 16:43 ` [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4 Mark Brown
2009-11-28 1:31 ` jassi brar
2009-12-01 18:24 ` Ben Dooks
2009-11-27 16:43 ` [PATCH 7/7] SMDK6410: Register IISv4 device 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).