All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Fernandez <gabriel.fernandez@linaro.org>
To: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Srinivas Kandagatla <srinivas.kandagatla@gmail.com>,
	Maxime Coquelin <maxime.coquelin@st.com>,
	Patrice Chotard <patrice.chotard@st.com>,
	Russell King <linux@armlinux.org.uk>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Olivier Bideau <olivier.bideau@st.com>,
	Gabriel Fernandez <gabriel.fernandez@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Pankaj Dev <pankaj.dev@st.com>,
	Dinh Nguyen <dinguyen@opensource.altera.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Thierry Reding <treding@nvidia.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kernel@stlinux.com,
	linux-clk@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
	Peter Griffin <peter.griffin@linaro.org>,
	<arnaud.pouliquen@st.com>, <benjamin.gaignard@st.com>,
	<vincent.abriou@st.com>
Subject: [PATCH 02/11] drivers: clk: st: Add clock propagation for audio clocks
Date: Wed, 18 May 2016 10:41:23 +0200	[thread overview]
Message-ID: <1463560892-7209-3-git-send-email-gabriel.fernandez@linaro.org> (raw)
In-Reply-To: <1463560892-7209-1-git-send-email-gabriel.fernandez@linaro.org>

This patch allows fine tuning of the quads FS for audio clocks
accuracy.

Signed-off-by: Olivier Bideau <olivier.bideau@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
---
 .../devicetree/bindings/clock/st/st,flexgen.txt    |  1 +
 drivers/clk/st/clk-flexgen.c                       | 24 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
index b7ee5c7..15b33c7 100644
--- a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
@@ -60,6 +60,7 @@ This binding uses the common clock binding[2].
 Required properties:
 - compatible : shall be:
   "st,flexgen"
+  "st,stih407-clkgend0", "st,flexgen" (enable clock propagation on parent)
 
 - #clock-cells : from common clock binding; shall be set to 1 (multiple clock
   outputs).
diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
index 627267c..3ff51ec 100644
--- a/drivers/clk/st/clk-flexgen.c
+++ b/drivers/clk/st/clk-flexgen.c
@@ -15,6 +15,10 @@
 #include <linux/of.h>
 #include <linux/of_address.h>
 
+struct clkgen_data {
+	unsigned long flags;
+};
+
 struct flexgen {
 	struct clk_hw hw;
 
@@ -259,6 +263,18 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
 	return parents;
 }
 
+static const struct clkgen_data clkgen_d0 = {
+	.flags = CLK_SET_RATE_PARENT,
+};
+
+static const struct of_device_id flexgen_of_match[] = {
+	{
+		.compatible = "st,stih407-clkgend0",
+		.data = &clkgen_d0,
+	},
+	{}
+};
+
 static void __init st_of_flexgen_setup(struct device_node *np)
 {
 	struct device_node *pnode;
@@ -267,6 +283,8 @@ static void __init st_of_flexgen_setup(struct device_node *np)
 	const char **parents;
 	int num_parents, i;
 	spinlock_t *rlock = NULL;
+	const struct of_device_id *match;
+	struct clkgen_data *data = NULL;
 	unsigned long flex_flags = 0;
 	int ret;
 
@@ -282,6 +300,12 @@ static void __init st_of_flexgen_setup(struct device_node *np)
 	if (!parents)
 		return;
 
+	match = of_match_node(flexgen_of_match, np);
+	if (match) {
+		data = (struct clkgen_data *)match->data;
+		flex_flags = data->flags;
+	}
+
 	clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL);
 	if (!clk_data)
 		goto err;
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: Gabriel Fernandez <gabriel.fernandez@linaro.org>
To: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Srinivas Kandagatla <srinivas.kandagatla@gmail.com>,
	Maxime Coquelin <maxime.coquelin@st.com>,
	Patrice Chotard <patrice.chotard@st.com>,
	Russell King <linux@armlinux.org.uk>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Olivier Bideau <olivier.bideau@st.com>,
	Gabriel Fernandez <gabriel.fernandez@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Pankaj Dev <pankaj.dev@st.com>,
	Dinh Nguyen <dinguyen@opensource.altera.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Thierry Reding <treding@nvidia.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kernel@stlinux.com,
	linux-clk@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
	Peter Griffin <peter.griffin@linaro.org>,
	arnaud.pouliquen@st.com, benjamin.gaignard@st.com,
	vincent.abriou@st.com
Subject: [PATCH 02/11] drivers: clk: st: Add clock propagation for audio clocks
Date: Wed, 18 May 2016 10:41:23 +0200	[thread overview]
Message-ID: <1463560892-7209-3-git-send-email-gabriel.fernandez@linaro.org> (raw)
In-Reply-To: <1463560892-7209-1-git-send-email-gabriel.fernandez@linaro.org>

This patch allows fine tuning of the quads FS for audio clocks
accuracy.

Signed-off-by: Olivier Bideau <olivier.bideau@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
---
 .../devicetree/bindings/clock/st/st,flexgen.txt    |  1 +
 drivers/clk/st/clk-flexgen.c                       | 24 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
index b7ee5c7..15b33c7 100644
--- a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
@@ -60,6 +60,7 @@ This binding uses the common clock binding[2].
 Required properties:
 - compatible : shall be:
   "st,flexgen"
+  "st,stih407-clkgend0", "st,flexgen" (enable clock propagation on parent)
 
 - #clock-cells : from common clock binding; shall be set to 1 (multiple clock
   outputs).
diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
index 627267c..3ff51ec 100644
--- a/drivers/clk/st/clk-flexgen.c
+++ b/drivers/clk/st/clk-flexgen.c
@@ -15,6 +15,10 @@
 #include <linux/of.h>
 #include <linux/of_address.h>
 
+struct clkgen_data {
+	unsigned long flags;
+};
+
 struct flexgen {
 	struct clk_hw hw;
 
@@ -259,6 +263,18 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
 	return parents;
 }
 
+static const struct clkgen_data clkgen_d0 = {
+	.flags = CLK_SET_RATE_PARENT,
+};
+
+static const struct of_device_id flexgen_of_match[] = {
+	{
+		.compatible = "st,stih407-clkgend0",
+		.data = &clkgen_d0,
+	},
+	{}
+};
+
 static void __init st_of_flexgen_setup(struct device_node *np)
 {
 	struct device_node *pnode;
@@ -267,6 +283,8 @@ static void __init st_of_flexgen_setup(struct device_node *np)
 	const char **parents;
 	int num_parents, i;
 	spinlock_t *rlock = NULL;
+	const struct of_device_id *match;
+	struct clkgen_data *data = NULL;
 	unsigned long flex_flags = 0;
 	int ret;
 
@@ -282,6 +300,12 @@ static void __init st_of_flexgen_setup(struct device_node *np)
 	if (!parents)
 		return;
 
+	match = of_match_node(flexgen_of_match, np);
+	if (match) {
+		data = (struct clkgen_data *)match->data;
+		flex_flags = data->flags;
+	}
+
 	clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL);
 	if (!clk_data)
 		goto err;
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: gabriel.fernandez@linaro.org (Gabriel Fernandez)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/11] drivers: clk: st: Add clock propagation for audio clocks
Date: Wed, 18 May 2016 10:41:23 +0200	[thread overview]
Message-ID: <1463560892-7209-3-git-send-email-gabriel.fernandez@linaro.org> (raw)
In-Reply-To: <1463560892-7209-1-git-send-email-gabriel.fernandez@linaro.org>

This patch allows fine tuning of the quads FS for audio clocks
accuracy.

Signed-off-by: Olivier Bideau <olivier.bideau@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
---
 .../devicetree/bindings/clock/st/st,flexgen.txt    |  1 +
 drivers/clk/st/clk-flexgen.c                       | 24 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
index b7ee5c7..15b33c7 100644
--- a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
@@ -60,6 +60,7 @@ This binding uses the common clock binding[2].
 Required properties:
 - compatible : shall be:
   "st,flexgen"
+  "st,stih407-clkgend0", "st,flexgen" (enable clock propagation on parent)
 
 - #clock-cells : from common clock binding; shall be set to 1 (multiple clock
   outputs).
diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
index 627267c..3ff51ec 100644
--- a/drivers/clk/st/clk-flexgen.c
+++ b/drivers/clk/st/clk-flexgen.c
@@ -15,6 +15,10 @@
 #include <linux/of.h>
 #include <linux/of_address.h>
 
+struct clkgen_data {
+	unsigned long flags;
+};
+
 struct flexgen {
 	struct clk_hw hw;
 
@@ -259,6 +263,18 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
 	return parents;
 }
 
+static const struct clkgen_data clkgen_d0 = {
+	.flags = CLK_SET_RATE_PARENT,
+};
+
+static const struct of_device_id flexgen_of_match[] = {
+	{
+		.compatible = "st,stih407-clkgend0",
+		.data = &clkgen_d0,
+	},
+	{}
+};
+
 static void __init st_of_flexgen_setup(struct device_node *np)
 {
 	struct device_node *pnode;
@@ -267,6 +283,8 @@ static void __init st_of_flexgen_setup(struct device_node *np)
 	const char **parents;
 	int num_parents, i;
 	spinlock_t *rlock = NULL;
+	const struct of_device_id *match;
+	struct clkgen_data *data = NULL;
 	unsigned long flex_flags = 0;
 	int ret;
 
@@ -282,6 +300,12 @@ static void __init st_of_flexgen_setup(struct device_node *np)
 	if (!parents)
 		return;
 
+	match = of_match_node(flexgen_of_match, np);
+	if (match) {
+		data = (struct clkgen_data *)match->data;
+		flex_flags = data->flags;
+	}
+
 	clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL);
 	if (!clk_data)
 		goto err;
-- 
1.9.1

  parent reply	other threads:[~2016-05-18  8:42 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18  8:41 [PATCH 00/11] Clock improvement for video playback Gabriel Fernandez
2016-05-18  8:41 ` Gabriel Fernandez
2016-05-18  8:41 ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 01/11] drivers: clk: st: Add fs660c32 synthesizer algorithm Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41 ` Gabriel Fernandez [this message]
2016-05-18  8:41   ` [PATCH 02/11] drivers: clk: st: Add clock propagation for audio clocks Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-25 17:24   ` Rob Herring
2016-05-25 17:24     ` Rob Herring
2016-05-25 17:24     ` Rob Herring
2016-05-26  9:35     ` Gabriel Fernandez
2016-05-26  9:49     ` Gabriel Fernandez
2016-05-26  9:49       ` Gabriel Fernandez
2016-05-26  9:49       ` Gabriel Fernandez
2016-05-26  9:49       ` Gabriel Fernandez
2016-05-26 12:46       ` Rob Herring
2016-05-26 12:46         ` Rob Herring
2016-05-26 12:46         ` Rob Herring
2016-05-26 12:46         ` Rob Herring
2016-05-26 13:05         ` [STLinux Kernel] " loic pallardy
2016-05-26 13:05           ` loic pallardy
2016-05-26 13:05           ` loic pallardy
2016-05-26 13:05           ` loic pallardy
2016-05-26 13:20           ` Rob Herring
2016-05-26 13:20             ` Rob Herring
2016-05-26 13:20             ` Rob Herring
2016-05-26 13:20             ` Rob Herring
2016-05-27  7:23             ` loic pallardy
2016-05-27  7:23               ` loic pallardy
2016-05-27  7:23               ` loic pallardy
2016-05-27  7:23               ` loic pallardy
2016-05-27 15:41               ` Rob Herring
2016-05-27 15:41                 ` Rob Herring
2016-05-27 15:41                 ` Rob Herring
2016-05-27 15:41                 ` Rob Herring
2016-05-30  7:30                 ` Gabriel Fernandez
2016-05-30  7:30                   ` Gabriel Fernandez
2016-05-30  7:30                   ` Gabriel Fernandez
2016-05-30  7:30                   ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 03/11] drivers: clk: st: Handle clkgenD2 clk synchronous mode Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 04/11] ARM: DT: STiH407: Add compatibility string on clkgend0 for audio clocks Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 05/11] ARM: DT: STiH410: " Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 06/11] ARM: DT: STiH418: " Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 07/11] ARM: DT: STiH407: Enable synchronous clock mode on clkgend2 Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 08/11] ARM: DT: STiH410: " Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 09/11] ARM: DT: STiH418: " Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 10/11] ARM: DT: STi: STiH407: clock configuration to address 720p and 1080p Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41 ` [PATCH 11/11] ARM: DT: STi: STiH410: " Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-18  8:41   ` Gabriel Fernandez
2016-05-24  7:40 ` [PATCH 00/11] Clock improvement for video playback Arnaud Pouliquen
2016-05-24  7:40   ` Arnaud Pouliquen
2016-05-24  7:40   ` Arnaud Pouliquen

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=1463560892-7209-3-git-send-email-gabriel.fernandez@linaro.org \
    --to=gabriel.fernandez@linaro.org \
    --cc=a.hajda@samsung.com \
    --cc=arnaud.pouliquen@st.com \
    --cc=arnd@arndb.de \
    --cc=benjamin.gaignard@st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@opensource.altera.com \
    --cc=galak@codeaurora.org \
    --cc=geert+renesas@glider.be \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kernel@stlinux.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=maxime.coquelin@st.com \
    --cc=mturquette@baylibre.com \
    --cc=olivier.bideau@st.com \
    --cc=pankaj.dev@st.com \
    --cc=patrice.chotard@st.com \
    --cc=peter.griffin@linaro.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=srinivas.kandagatla@gmail.com \
    --cc=treding@nvidia.com \
    --cc=vincent.abriou@st.com \
    /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.