All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: devicetree@vger.kernel.org, linux-aspeed@lists.ozlabs.org,
	linux-clk@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
	Dylan Hung <dylan_hung@aspeedtech.com>,
	Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [PATCH v5 5/6] clk: ast2600: Add comment about combined clock + reset handling
Date: Thu, 2 Mar 2023 03:30:31 +0000	[thread overview]
Message-ID: <CACPK8Xd7pFjc94Pf9pzedH3kkckeBBjh1TNaGGvfD=7+aMB2MA@mail.gmail.com> (raw)
In-Reply-To: <20230302005834.13171-6-jk@codeconstruct.com.au>

On Thu, 2 Mar 2023 at 00:58, Jeremy Kerr <jk@codeconstruct.com.au> wrote:
>
> Add a little description about how reset lines can be implicit with
> clock enable/disable. This is mostly based on the commit message
> from the original submission in 15ed8ce5f8.

Excellent, thank you.

Reviewed-by: Joel Stanley <joel@jms.id.au>

>
> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
> ---
>  drivers/clk/clk-ast2600.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/drivers/clk/clk-ast2600.c b/drivers/clk/clk-ast2600.c
> index 09f26ab5f9af..a094a2601a37 100644
> --- a/drivers/clk/clk-ast2600.c
> +++ b/drivers/clk/clk-ast2600.c
> @@ -73,6 +73,27 @@ static void __iomem *scu_g6_base;
>  static u8 soc_rev;
>
>  /*
> + * The majority of the clocks in the system are gates paired with a reset
> + * controller that holds the IP in reset; this is represented by the @reset_idx
> + * member of entries here.
> + *
> + * This borrows from clk_hw_register_gate, but registers two 'gates', one
> + * to control the clock enable register and the other to control the reset
> + * IP. This allows us to enforce the ordering:
> + *
> + * 1. Place IP in reset
> + * 2. Enable clock
> + * 3. Delay
> + * 4. Release reset
> + *
> + * Consequently, if reset_idx is set, reset control is implicit: the clock
> + * consumer does not need its own reset handling, as enabling the clock will
> + * also deassert reset.
> + *
> + * There are some gates that do not have an associated reset; these are
> + * handled by using -1 as the index for the reset, and the consumer must
> + * explictly assert/deassert reset lines as required.
> + *
>   * Clocks marked with CLK_IS_CRITICAL:
>   *
>   *  ref0 and ref1 are essential for the SoC to operate
> --
> 2.39.1
>

  reply	other threads:[~2023-03-02  3:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02  0:58 [PATCH v5 0/6] Add definitions for AST2600 i3c clocks Jeremy Kerr
2023-03-02  0:58 ` [PATCH v5 1/6] clk: ast2600: allow empty entries in aspeed_g6_gates Jeremy Kerr
2023-03-06 22:18   ` Stephen Boyd
2023-03-02  0:58 ` [PATCH v5 2/6] dt-bindings: clock: ast2600: Add top-level I3C clock Jeremy Kerr
2023-03-06 22:18   ` Stephen Boyd
2023-03-02  0:58 ` [PATCH v5 3/6] clk: ast2600: Add full configs for I3C clocks Jeremy Kerr
2023-03-02  3:23   ` Joel Stanley
2023-03-06 22:18   ` Stephen Boyd
2023-03-02  0:58 ` [PATCH v5 4/6] dt-bindings: clock: ast2600: remove IC36 & I3C7 clock definitions Jeremy Kerr
2023-03-06 22:18   ` Stephen Boyd
2023-03-02  0:58 ` [PATCH v5 5/6] clk: ast2600: Add comment about combined clock + reset handling Jeremy Kerr
2023-03-02  3:30   ` Joel Stanley [this message]
2023-03-06 22:18   ` Stephen Boyd
2023-03-02  0:58 ` [PATCH v5 6/6] dt-bindings: clock: ast2600: Expand comment on reset definitions Jeremy Kerr
2023-03-02  3:27   ` Joel Stanley
2023-03-02  7:35   ` Krzysztof Kozlowski
2023-03-06 22:19   ` Stephen Boyd
2023-03-02  4:37 ` [PATCH v5 0/6] Add definitions for AST2600 i3c clocks Joel Stanley

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='CACPK8Xd7pFjc94Pf9pzedH3kkckeBBjh1TNaGGvfD=7+aMB2MA@mail.gmail.com' \
    --to=joel@jms.id.au \
    --cc=andrew@aj.id.au \
    --cc=devicetree@vger.kernel.org \
    --cc=dylan_hung@aspeedtech.com \
    --cc=jk@codeconstruct.com.au \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@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.