From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Joel Stanley <joel@jms.id.au>
Cc: linux-aspeed@lists.ozlabs.org, linux-clk@vger.kernel.org,
devicetree@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 v4 3/5] clk: ast2600: Add full configs for I3C clocks
Date: Wed, 01 Mar 2023 08:58:43 +0800 [thread overview]
Message-ID: <1024ddf2c4047e5a6cd516809d4d15ea5e0349b6.camel@codeconstruct.com.au> (raw)
In-Reply-To: <CACPK8XfZCaLK+1kRkHa+wvGyt3YCwiZDR7CKRPKxdjuBFH+01Q@mail.gmail.com>
Hi Joel,
Thanks for the review. Some replies inline:
> > @@ -15,7 +16,7 @@
> >
> > #include "clk-aspeed.h"
> >
> > -#define ASPEED_G6_NUM_CLKS 71
> > +#define ASPEED_G6_NUM_CLKS 72
>
> NUM_CLKS seems dangerous. Should we instead use
> ARRAY_SIZE(aspeed_g6_gates)?
Yep, that would have saved me some time debugging. That would suit as a
separate change though, would you like it in the same series?
> > /* USB 2.0 port1 phy 40MHz clock */
> > hw = clk_hw_register_fixed_rate(NULL, "usb-phy-40m", NULL,
> > 0, 40000000);
> > aspeed_g6_clk_data->hws[ASPEED_CLK_USBPHY_40M] = hw;
> > +
> > + /* i3c clock: source from apll, divide by 8 */
> > + regmap_read(map, ASPEED_G6_CLK_SELECTION5, &val);
> > + val &= ~(I3C_CLK_SELECTION | APLL_DIV_SELECTION);
>
> Is there any value in registering a mux device here? See the emmc
> extclk device.
We won't be doing any mux configuration here, so I figure the static
setup is fine.
> > + val |= FIELD_PREP(I3C_CLK_SELECTION,
> > I3C_CLK_SELECT_APLL_DIV);
> > + val |= FIELD_PREP(APLL_DIV_SELECTION, APLL_DIV_8);
> > + regmap_write(map, ASPEED_G6_CLK_SELECTION5, val);
>
> This is a departure in style from the existing code. The existing
> code did things like this:
>
> regmap_update_bits(map, ASPEED_G6_CLK_SELECTION1, GENMASK(10, 8), BIT(10));
>
> Which uses the regmap API instead of FIELD_PREP macros.
Yep, that's much nicer, I'll change. The FIELD_PREP parts are just from
the initial ASPEED implementation.
Cheers,
Jeremy
next prev parent reply other threads:[~2023-03-01 0:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 9:16 [PATCH v4 0/5] Add definitions for AST2600 i3c clocks and resets Jeremy Kerr
2023-02-28 9:16 ` [PATCH v4 1/5] clk: ast2600: allow empty entries in aspeed_g6_gates Jeremy Kerr
2023-03-01 0:50 ` Joel Stanley
2023-02-28 9:16 ` [PATCH v4 2/5] dt-bindings: clock: ast2600: Add top-level I3C clock Jeremy Kerr
2023-02-28 10:07 ` Krzysztof Kozlowski
2023-03-01 0:51 ` Joel Stanley
2023-02-28 9:16 ` [PATCH v4 3/5] clk: ast2600: Add full configs for I3C clocks Jeremy Kerr
2023-03-01 0:48 ` Joel Stanley
2023-03-01 0:58 ` Jeremy Kerr [this message]
2023-03-01 1:06 ` Joel Stanley
2023-03-01 8:17 ` Jeremy Kerr
2023-02-28 9:16 ` [PATCH v4 4/5] dt-bindings: clock: ast2600: remove IC36 & I3C7 clock definitions Jeremy Kerr
2023-03-01 0:48 ` Joel Stanley
2023-02-28 9:16 ` [PATCH v4 5/5] dt-bindings: clock: ast2600: Add reset config for I3C Jeremy Kerr
2023-03-01 0:49 ` Joel Stanley
2023-03-01 6:28 ` Jeremy Kerr
2023-03-01 6:48 ` Joel Stanley
2023-03-01 6:54 ` Jeremy Kerr
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=1024ddf2c4047e5a6cd516809d4d15ea5e0349b6.camel@codeconstruct.com.au \
--to=jk@codeconstruct.com.au \
--cc=andrew@aj.id.au \
--cc=devicetree@vger.kernel.org \
--cc=dylan_hung@aspeedtech.com \
--cc=joel@jms.id.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox