All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH 2/4] ARM: shmobile: r8a7790: add audio clock
Date: Tue, 14 Jan 2014 02:25:39 +0000	[thread overview]
Message-ID: <878uujguzj.wl%kuninori.morimoto.gx@gmail.com> (raw)
In-Reply-To: <1389121036-3555-3-git-send-email-geert@linux-m68k.org>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current audio clock doesn't have dependency to device/driver,
but, it is not good design for DT support.
To avoid branch merge conflict issue,
it uses this load map, and this patch is 1) part.
 1) add old/new style clock in platform
 2) add new style clock method in driver
 3) remove old tyle clock from platform

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/boot/dts/r8a7790.dtsi         |   23 +++++++++++++++++++++++
 arch/arm/mach-shmobile/clock-r8a7790.c |   20 ++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 3cc834b..b4f0cd5 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -414,6 +414,29 @@
 			clock-output-names = "extal";
 		};
 
+		/*
+		 * The external audio clocks are configured as 0 Hz fixed frequency clocks by
+		 * default. Boards that provide audio clocks should override them.
+		 */
+		audio_clk_a: audio_clk_a {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+			clock-output-names = "audio_clk_a";
+		};
+		audio_clk_b: audio_clk_b {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+			clock-output-names = "audio_clk_b";
+		};
+		audio_clk_c: audio_clk_c {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+			clock-output-names = "audio_clk_c";
+		};
+
 		/* Special CPG clocks */
 		cpg_clocks: cpg_clocks@e6150000 {
 			compatible = "renesas,r8a7790-cpg-clocks",
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
index f25b43a..77fd456 100644
--- a/arch/arm/mach-shmobile/clock-r8a7790.c
+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
@@ -91,6 +91,15 @@ static struct clk main_clk = {
 	.ops	= &followparent_clk_ops,
 };
 
+static struct clk audio_clk_a = {
+};
+
+static struct clk audio_clk_b = {
+};
+
+static struct clk audio_clk_c = {
+};
+
 /*
  * clock ratio of these clock will be updated
  * on r8a7790_clock_init()
@@ -124,6 +133,9 @@ SH_FIXED_RATIO_CLK_SET(ddr_clk,			pll3_clk,	1, 8);
 SH_FIXED_RATIO_CLK_SET(mp_clk,			pll1_div2_clk,	1, 15);
 
 static struct clk *main_clks[] = {
+	&audio_clk_a,
+	&audio_clk_b,
+	&audio_clk_c,
 	&extal_clk,
 	&extal_div2_clk,
 	&main_clk,
@@ -266,6 +278,10 @@ static struct clk mstp_clks[MSTP_NR] = {
 static struct clk_lookup lookups[] = {
 
 	/* main clocks */
+	CLKDEV_CON_ID("audio_clk_a",	&audio_clk_a),
+	CLKDEV_CON_ID("audio_clk_b",	&audio_clk_b),
+	CLKDEV_CON_ID("audio_clk_c",	&audio_clk_c),
+	CLKDEV_CON_ID("audio_clk_internal",	&m2_clk),
 	CLKDEV_CON_ID("extal",		&extal_clk),
 	CLKDEV_CON_ID("extal_div2",	&extal_div2_clk),
 	CLKDEV_CON_ID("main",		&main_clk),
@@ -353,6 +369,10 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_ICK_ID("du.0", "rcar-du-r8a7790", &mstp_clks[MSTP724]),
 	CLKDEV_ICK_ID("du.1", "rcar-du-r8a7790", &mstp_clks[MSTP723]),
 	CLKDEV_ICK_ID("du.2", "rcar-du-r8a7790", &mstp_clks[MSTP722]),
+	CLKDEV_ICK_ID("clk_a", "rcar_sound", &audio_clk_a),
+	CLKDEV_ICK_ID("clk_b", "rcar_sound", &audio_clk_b),
+	CLKDEV_ICK_ID("clk_c", "rcar_sound", &audio_clk_c),
+	CLKDEV_ICK_ID("clk_i", "rcar_sound", &m2_clk),
 	CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP1015]),
 	CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP1014]),
 	CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP1013]),
-- 
1.7.9.5


  parent reply	other threads:[~2014-01-14  2:25 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 18:57 [PATCH 0/4] thermal: rcar: Add missing clock handling Geert Uytterhoeven
2014-01-07 18:57 ` Geert Uytterhoeven
2014-01-07 18:57 ` Geert Uytterhoeven
2014-01-07 18:57 ` [PATCH 1/4] ARM: shmobile: r8a7791: Add thermal clock in device tree Geert Uytterhoeven
2014-01-07 18:57   ` Geert Uytterhoeven
2014-01-07 18:57   ` Geert Uytterhoeven
2014-01-08  0:20   ` Laurent Pinchart
2014-01-08  0:20     ` Laurent Pinchart
2014-01-08  0:20     ` Laurent Pinchart
2014-01-08  0:52     ` Simon Horman
2014-01-08  0:52       ` Simon Horman
2014-01-08  0:52       ` Simon Horman
2014-02-23 12:40   ` [PATCH 1/4] ARM: shmobile: r8a7791: add IIC0/1 clock macros Wolfram Sang
2014-02-23 22:13   ` Laurent Pinchart
2014-02-24 10:33   ` Wolfram Sang
2014-01-07 18:57 ` [PATCH 2/4] ARM: shmobile: r8a7790: Add thermal clock in device tree Geert Uytterhoeven
2014-01-07 18:57   ` Geert Uytterhoeven
2014-01-07 18:57   ` Geert Uytterhoeven
2014-01-08  0:20   ` Laurent Pinchart
2014-01-08  0:20     ` Laurent Pinchart
2014-01-08  0:20     ` Laurent Pinchart
2014-01-08  0:52     ` Simon Horman
2014-01-08  0:52       ` Simon Horman
2014-01-08  0:52       ` Simon Horman
2014-01-14  2:25   ` Kuninori Morimoto [this message]
2014-01-07 18:57 ` [PATCH 3/4] thermal: rcar: Add missing clock handling Geert Uytterhoeven
2014-01-07 18:57   ` Geert Uytterhoeven
2014-01-07 18:57   ` Geert Uytterhoeven
2014-01-07 20:04   ` Sergei Shtylyov
2014-01-07 20:04     ` Sergei Shtylyov
2014-01-07 20:04     ` Sergei Shtylyov
2014-01-07 20:57   ` Gerhard Sittig
2014-01-07 20:57     ` Gerhard Sittig
2014-01-07 20:57     ` Gerhard Sittig
2014-01-08 12:20     ` Ben Dooks
2014-01-08 12:20       ` Ben Dooks
2014-01-08 12:20       ` Ben Dooks
2014-01-08  1:08   ` Kuninori Morimoto
2014-01-08  1:08     ` Kuninori Morimoto
2014-01-08  1:08     ` Kuninori Morimoto
2014-01-08 10:23     ` Geert Uytterhoeven
2014-01-08 10:23       ` Geert Uytterhoeven
2014-01-08 10:23       ` Geert Uytterhoeven
2014-01-13  8:57       ` Geert Uytterhoeven
2014-01-13  8:57         ` Geert Uytterhoeven
2014-01-13  8:57         ` Geert Uytterhoeven
2014-01-14  0:20         ` Kuninori Morimoto
2014-01-14  0:20           ` Kuninori Morimoto
2014-01-14  0:20           ` Kuninori Morimoto
2014-01-14  1:27         ` Simon Horman
2014-01-14  1:27           ` Simon Horman
2014-01-14  1:27           ` Simon Horman
2014-01-08 12:23   ` Ben Dooks
2014-01-08 12:23     ` Ben Dooks
2014-01-08 12:23     ` Ben Dooks
2014-01-08 12:58     ` Geert Uytterhoeven
2014-01-08 12:58       ` Geert Uytterhoeven
2014-01-08 12:58       ` Geert Uytterhoeven
2014-01-07 18:57 ` [PATCH -trivial 4/4] thermal: rcar: Spelling s/delaye/delay/g Geert Uytterhoeven
2014-01-07 18:57   ` Geert Uytterhoeven
2014-01-07 18:57   ` Geert Uytterhoeven
2014-01-08  0:12   ` Simon Horman
2014-01-08  0:12     ` Simon Horman
2014-01-08  0:12     ` Simon Horman
2014-01-17  8:23   ` Zhang Rui
2014-01-17  8:23     ` Zhang Rui
2014-01-17  8:23     ` Zhang Rui
2014-01-07 21:52 ` [PATCH 0/4] thermal: rcar: Add missing clock handling Valentine
2014-01-07 21:52   ` Valentine
2014-01-07 21:52   ` Valentine
2014-01-07 22:13   ` Geert Uytterhoeven
2014-01-07 22:13     ` Geert Uytterhoeven
2014-01-07 22:13     ` Geert Uytterhoeven

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=878uujguzj.wl%kuninori.morimoto.gx@gmail.com \
    --to=kuninori.morimoto.gx@gmail.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 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.