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, kernel@stlinux.com,
vincent.abriou@st.com, arnaud.pouliquen@st.com,
linux-kernel@vger.kernel.org, gabriel.fernandez@st.com,
Peter Griffin <peter.griffin@linaro.org>,
Lee Jones <lee.jones@linaro.org>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
benjamin.gaignard@st.com
Subject: [RESEND PATCH v2 04/13] drivers: clk: st: Add clock propagation for audio clocks
Date: Thu, 16 Jun 2016 11:20:24 +0200 [thread overview]
Message-ID: <1466068833-5055-5-git-send-email-gabriel.fernandez@linaro.org> (raw)
In-Reply-To: <1466068833-5055-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 | 2 ++
drivers/clk/st/clk-flexgen.c | 24 ++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
index b7ee5c7..d68f6a5f 100644
--- a/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,flexgen.txt
@@ -60,6 +60,8 @@ This binding uses the common clock binding[2].
Required properties:
- compatible : shall be:
"st,flexgen"
+ "st,flexgen-audio", "st,flexgen" (enable clock propagation on parent for
+ audio use case)
- #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..33d6ced 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_audio = {
+ .flags = CLK_SET_RATE_PARENT,
+};
+
+static const struct of_device_id flexgen_of_match[] = {
+ {
+ .compatible = "st,flexgen-audio",
+ .data = &clkgen_audio,
+ },
+ {}
+};
+
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
next prev parent reply other threads:[~2016-06-16 9:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 9:20 [RESEND PATCH v2 00/13] Clock improvement for video playback Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 01/13] drivers: clk: st: Remove stih415-416 clock support Gabriel Fernandez
2016-06-19 14:57 ` Rob Herring
2016-06-16 9:20 ` [RESEND PATCH v2 02/13] drivers: clk: st: Simplify clock binding of STiH4xx platforms Gabriel Fernandez
2016-06-19 15:04 ` Rob Herring
2016-06-20 7:29 ` Gabriel Fernandez
2016-07-08 1:43 ` Michael Turquette
2016-07-08 9:12 ` Gabriel Fernandez
2016-07-08 16:08 ` Michael Turquette
2016-07-11 6:58 ` Gabriel Fernandez
2016-08-22 16:06 ` Gabriel Fernandez
2016-08-25 0:11 ` Michael Turquette
2016-08-25 14:51 ` Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 03/13] drivers: clk: st: Add fs660c32 synthesizer algorithm Gabriel Fernandez
2016-06-16 9:20 ` Gabriel Fernandez [this message]
2016-06-16 9:20 ` [RESEND PATCH v2 05/13] drivers: clk: st: Handle clk synchronous mode for video clocks Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 06/13] ARM: DT: STiH407: Enable clock propagation for audio clocks Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 07/13] ARM: DT: STiH410: " Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 08/13] ARM: DT: STiH418: " Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 09/13] ARM: DT: STiH407: Enable synchronous clock mode for video clocks Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 10/13] ARM: DT: STiH410: " Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 11/13] ARM: DT: STiH418: " Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 12/13] ARM: DT: STi: STiH407: clock configuration to address 720p and 1080p Gabriel Fernandez
2016-06-16 9:20 ` [RESEND PATCH v2 13/13] ARM: DT: STi: STiH410: " Gabriel Fernandez
2016-08-05 8:11 ` [RESEND PATCH v2 00/13] Clock improvement for video playback Patrice Chotard
2016-08-25 11:44 ` Peter Griffin
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=1466068833-5055-5-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=gabriel.fernandez@st.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 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).