From: Tomasz Figa <tomasz.figa@gmail.com>
To: Soren Brinkmann <soren.brinkmann@xilinx.com>
Cc: Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Rob Landley <rob@landley.net>,
Russell King <linux@arm.linux.org.uk>,
Mike Turquette <mturquette@linaro.org>,
Michal Simek <michal.simek@xilinx.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/2] clk/zynq/clkc: Add 'fclk-enable' feature
Date: Mon, 28 Oct 2013 22:13:28 +0100 [thread overview]
Message-ID: <1592656.1ojHcSlzVh@flatron> (raw)
In-Reply-To: <1381425018-5653-1-git-send-email-soren.brinkmann@xilinx.com>
Hi Soren,
On Thursday 10 of October 2013 10:10:17 Soren Brinkmann wrote:
> In some use cases Zynq's FPGA clocks are used as static clock
> generators for IP in the FPGA part of the SOC for which no Linux driver
> exists and would control those clocks. To avoid automatic
> gating of these clocks in such cases a new property - fclk-enable - is
> added to the clock controller's DT description to accomodate such use
> cases. It's value is a bitmask, where a set bit results in enabling
> the corresponding FCLK through the clkc.
>
> FPGA clocks are handled following the rules below:
>
> If an FCLK is not enabled by bootloaders, that FCLK will be disabled in
> Linux. Drivers can enable and control it through the CCF as usual.
>
> If an FCLK is enabled by bootloaders AND the corresponding bit in the
> 'fclk-enable' DT property is set, that FCLK will be enabled by the clkc,
> resulting in an off by one reference count for that clock. Ensuring it
> will always be running.
>
> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> ---
> v2:
> - change default value for fclk-enable to '0'
> ---
> Documentation/devicetree/bindings/clock/zynq-7000.txt | 4 ++++
> drivers/clk/zynq/clkc.c | 18
> +++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/zynq-7000.txt
> b/Documentation/devicetree/bindings/clock/zynq-7000.txt index
> d99af878f5d7..11fdd146ec83 100644
> --- a/Documentation/devicetree/bindings/clock/zynq-7000.txt
> +++ b/Documentation/devicetree/bindings/clock/zynq-7000.txt
> @@ -22,6 +22,10 @@ Required properties:
> Optional properties:
> - clocks : as described in the clock bindings
> - clock-names : as described in the clock bindings
> + - fclk-enable : Bit mask to enable FCLKs in cases no proper CCF
Since it's a vendor specific property, it should include vendor prefix.
Also CCF is a Linux-specific implementation detail, which DT bindings
should not be involved into. If you really need to implement this using
this way, then at least property description should say something like
this:
xlnx,fclk-enable : Bit mask of bits of fclk enable register that must
be statically enabled at boot-up time.
However, I wonder why you can't simply define an FPGA block using a single
node, which would be a consumer to all the fclk clocks you need to enable
and then make a driver for it that would simply enable all clocks
specified in clocks property.
Best regards,
Tomasz
next prev parent reply other threads:[~2013-10-28 21:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-10 17:10 [PATCH v2 1/2] clk/zynq/clkc: Add 'fclk-enable' feature Soren Brinkmann
2013-10-10 17:10 ` [PATCH v2 2/2] arm: dt: zynq: Add fclk-enable property to clkc node Soren Brinkmann
2013-10-14 9:04 ` [PATCH v2 1/2] clk/zynq/clkc: Add 'fclk-enable' feature Michal Simek
2013-10-28 20:59 ` Sören Brinkmann
2013-10-28 21:13 ` Tomasz Figa [this message]
2013-10-28 21:43 ` Sören Brinkmann
2013-10-28 22:17 ` Tomasz Figa
2013-10-29 8:26 ` Kumar Gala
2013-10-29 13:04 ` Michal Simek
2013-10-30 18:44 ` Sören Brinkmann
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=1592656.1ojHcSlzVh@flatron \
--to=tomasz.figa@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=michal.simek@xilinx.com \
--cc=mturquette@linaro.org \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=soren.brinkmann@xilinx.com \
--cc=swarren@wwwdotorg.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).