From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/6 V2] Sound: I2S: Replacing I2S1 with I2S0 channel.
Date: Wed, 28 Aug 2013 11:36:53 +0900 [thread overview]
Message-ID: <521D6245.3030409@samsung.com> (raw)
In-Reply-To: <1375598683-3174-5-git-send-email-krishna.md@samsung.com>
On 04/08/13 15:44, Dani Krishna Mohan wrote:
> This patch makes required changes to make use
> of I2S0 channel instead of I2S1 channel on exynos5250.
>
> Signed-off-by: Dani Krishna Mohan <krishna.md@samsung.com>
> ---
> changes in V2:
> - None
> arch/arm/include/asm/arch-exynos/i2s-regs.h | 6 ++++++
> drivers/sound/samsung-i2s.c | 16 ++++++++++------
> 2 files changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-exynos/i2s-regs.h b/arch/arm/include/asm/arch-exynos/i2s-regs.h
> index 613b9b7..4a4a7a0 100644
> --- a/arch/arm/include/asm/arch-exynos/i2s-regs.h
> +++ b/arch/arm/include/asm/arch-exynos/i2s-regs.h
> @@ -8,10 +8,12 @@
> #ifndef __I2S_REGS_H__
> #define __I2S_REGS_H__
>
> +#define CON_RESET (1 << 31)
> #define CON_TXFIFO_FULL (1 << 8)
> #define CON_TXCH_PAUSE (1 << 4)
> #define CON_ACTIVE (1 << 0)
>
> +#define MOD_OP_CLK (3 << 30)
> #define MOD_BLCP_SHIFT 24
> #define MOD_BLCP_16BIT (0 << MOD_BLCP_SHIFT)
> #define MOD_BLCP_8BIT (1 << MOD_BLCP_SHIFT)
> @@ -24,6 +26,7 @@
> #define MOD_BLC_MASK (3 << 13)
>
> #define MOD_SLAVE (1 << 11)
> +#define MOD_RCLKSRC (0 << 10)
> #define MOD_MASK (3 << 8)
> #define MOD_LR_LLOW (0 << 7)
> #define MOD_LR_RLOW (1 << 7)
> @@ -47,4 +50,7 @@
> #define FIC_TXFLUSH (1 << 15)
> #define FIC_RXFLUSH (1 << 7)
>
> +#define PSREN (1 << 15)
> +#define PSVAL (3 << 8)
> +
> #endif /* __I2S_REGS_H__ */
> diff --git a/drivers/sound/samsung-i2s.c b/drivers/sound/samsung-i2s.c
> index 49921e5..8e8a2bc 100644
> --- a/drivers/sound/samsung-i2s.c
> +++ b/drivers/sound/samsung-i2s.c
> @@ -303,21 +303,25 @@ int i2s_tx_init(struct i2stx_info *pi2s_tx)
> (struct i2s_reg *)pi2s_tx->base_address;
>
> /* Initialize GPIO for I2s */
> - exynos_pinmux_config(PERIPH_ID_I2S1, 0);
> + exynos_pinmux_config(PERIPH_ID_I2S0, 0);
please don't replacing.
please adds support i2c0.
>
> /* Set EPLL Clock */
> - ret = set_epll_clk(pi2s_tx->audio_pll_clk);
> + ret = set_epll_clk(pi2s_tx->samplingrate * pi2s_tx->rfs * 4);
> if (ret != 0) {
> debug("%s: epll clock set rate falied\n", __func__);
> return -1;
> }
>
> - /* Select Clk Source for Audio1 */
> + /* Select Clk Source for Audio0 */
> set_i2s_clk_source();
>
> - /* Set Prescaler to get MCLK */
> - set_i2s_clk_prescaler(pi2s_tx->audio_pll_clk,
> - (pi2s_tx->samplingrate * (pi2s_tx->rfs)));
> + /*Reset the i2s module */
> + writel(CON_RESET, &i2s_reg->con);
> +
> + writel(MOD_OP_CLK | MOD_RCLKSRC, &i2s_reg->mod);
> +
> + /* set i2s prescaler */
> + writel(PSREN | PSVAL, &i2s_reg->psr);
>
> /* Configure I2s format */
> ret = i2s_set_fmt(i2s_reg, (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
>
Thanks,
Minkyu Kang.
next prev parent reply other threads:[~2013-08-28 2:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-04 6:44 [U-Boot] [PATCH 0/6 V2] EXYNOS: I2S: Enable I2S0 channel Dani Krishna Mohan
2013-08-04 6:44 ` [U-Boot] [PATCH 1/6 V2] Sound: WM8994: Support " Dani Krishna Mohan
2013-08-28 1:56 ` Minkyu Kang
2013-08-04 6:44 ` [U-Boot] [PATCH 2/6 V2] DTS: Addition of I2S0 channel and replacing I2S1 Dani Krishna Mohan
2013-08-04 6:44 ` [U-Boot] [PATCH 3/6 V2] ARM: Change from I2S1 to I2S0 for audio on SMDK5250 Dani Krishna Mohan
2013-08-28 2:34 ` Minkyu Kang
2013-08-04 6:44 ` [U-Boot] [PATCH 4/6 V2] Sound: I2S: Replacing I2S1 with I2S0 channel Dani Krishna Mohan
2013-08-28 2:36 ` Minkyu Kang [this message]
2013-08-04 6:44 ` [U-Boot] [PATCH 5/6 V2] DTS: Addition of GPIO chipselect for MAX98095 Dani Krishna Mohan
2013-08-04 6:44 ` [U-Boot] [PATCH 6/6 V2] Sound: MAX98095: Support I2S0 channel Dani Krishna Mohan
2013-08-28 2:39 ` Minkyu Kang
2013-08-19 8:27 ` [U-Boot] [PATCH 0/6 V2] EXYNOS: I2S: Enable " Rajeshwari Birje
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=521D6245.3030409@samsung.com \
--to=mk7.kang@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.