linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH v2] ARM: mach-shmobile: ap4evb: add fsib 44100Hz rate fixup
Date: Tue, 16 Nov 2010 07:34:34 +0000	[thread overview]
Message-ID: <w3p62vxraba.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <w3pd3wmt65q.wl%kuninori.morimoto.gx@renesas.com>

FSIDIVB is used when HDMI sound is 48kHz,
but it should be disabled when 44.1kHz.
And fsidiv_set_rate do that if selected rate is same as parent rate.
This patch select parent rate to fdiv_clk when 44.1kHz

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2
- add new_rate
- add long explan

 arch/arm/mach-shmobile/board-ap4evb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index b63010f..09a9481 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -569,6 +569,7 @@ static int fsi_set_rate(int is_porta, int rate)
 {
 	struct clk *fsib_clk;
 	struct clk *fdiv_clk = &sh7372_fsidivb_clk;
+	unsigned long new_rate;
 	int ret;
 
 	/* set_rate is not needed if port A */
@@ -581,7 +582,9 @@ static int fsi_set_rate(int is_porta, int rate)
 
 	switch (rate) {
 	case 44100:
-		clk_set_rate(fsib_clk, clk_round_rate(fsib_clk, 11283000));
+		new_rate = clk_round_rate(fsib_clk, 11283000);
+		clk_set_rate(fsib_clk, new_rate);
+		clk_set_rate(fdiv_clk, new_rate);
 		ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64;
 		break;
 	case 48000:
-- 
1.7.0.4


  parent reply	other threads:[~2010-11-16  7:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24  1:55 [PATCH v2] ARM: mach-shmobile: ap4evb: Add FSI2 support Kuninori Morimoto
2010-05-24  3:49 ` Magnus Damm
2010-05-24  5:32 ` Kuninori Morimoto
2010-11-16  7:34 ` Kuninori Morimoto [this message]
2010-11-16  8:48 ` [PATCH v2] ARM: mach-shmobile: ap4evb: add fsib 44100Hz rate fixup Paul Mundt

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=w3p62vxraba.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=linux-sh@vger.kernel.org \
    /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 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).