From: <Conor.Dooley@microchip.com>
To: <Claudiu.Beznea@microchip.com>, <mturquette@baylibre.com>,
<sboyd@kernel.org>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>, <palmer@dabbelt.com>,
<Daire.McNamara@microchip.com>, <Hugh.Breslin@microchip.com>
Cc: <paul.walmsley@sifive.com>, <aou@eecs.berkeley.edu>,
<linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>
Subject: Re: [PATCH v4 4/5] clk: microchip: add PolarFire SoC fabric clock support
Date: Tue, 6 Sep 2022 07:54:53 +0000 [thread overview]
Message-ID: <119689dc-f264-4a33-cef3-400e07fc7517@microchip.com> (raw)
In-Reply-To: <e3477cef-dc8f-3c20-126b-cbd514233867@microchip.com>
On 06/09/2022 08:28, Claudiu Beznea - M18063 wrote:
> On 30.08.2022 15:28, Conor Dooley wrote:
>> Add a driver to support the PLLs in PolarFire SoC's Clock Conditioning
>> Circuitry, an instance of which is located in each ordinal corner of
>> the FPGA. Only get_rate() is supported as these clocks are intended to
>> be statically configured by the FPGA design. Currently, the DLLs are
>> not supported by this driver. For more information on the hardware, see
>> "PolarFire SoC FPGA Clocking Resources" in the link below.
>>
>> Link: https://onlinedocs.microchip.com/pr/GUID-8F0CC4C0-0317-4262-89CA-CE7773ED1931-en-US-1/index.html
>> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
>> +
>> +#define CLK_CCC_PLL(_id, _parents, _shift, _width, _flags, _offset) { \
>> + .id = _id, \
>> + .shift = _shift, \
>> + .width = _width, \
>> + .reg_offset = _offset, \
>> + .flags = _flags, \
>> + .parents = _parents,\
>
> There is a bit of missalignment of \ in this macro.
>
Eww, there is...
>> +static int mpfs_ccc_register_plls(struct device *dev, struct mpfs_ccc_pll_hw_clock *pll_hws,
>> + unsigned int num_clks, struct mpfs_ccc_data *data)
>> +{
>> + int ret;
>> +
>> + for (unsigned int i = 0; i < num_clks; i++) {
>> + struct mpfs_ccc_pll_hw_clock *pll_hw = &pll_hws[i];
>> + char *name = devm_kzalloc(dev, 18, GFP_KERNEL);
>> +
>> + pll_hw->base = data->pll_base[i];
>> + snprintf(name, 18, "ccc%s_pll%u", strchrnul(dev->of_node->full_name, '@'), i);
>> + pll_hw->name = (const char *)name;
>> + pll_hw->hw.init = CLK_HW_INIT_PARENTS_DATA_FIXED_SIZE(pll_hw->name,
>> + pll_hw->parents,
>> + &mpfs_ccc_pll_ops, 0);
>> +
>> + ret = devm_clk_hw_register(dev, &pll_hw->hw);
>> + if (ret)
>> + return dev_err_probe(dev, ret, "failed to register ccc id: %d\n",
>> + pll_hw->id);
>> +
>> + data->hw_data.hws[pll_hw->id] = &pll_hw->hw;
>> +
>> + ret = mpfs_ccc_register_outputs(dev, mpfs_ccc_pllout_clks[i],
>> + MPFS_CCC_OUTPUTS_PER_PLL, data, pll_hw);
>> + if (ret)
>> + return ret;
>> + }
>> +
>> + return 0;
>> +}
>> +
>> +static int mpfs_ccc_probe(struct platform_device *pdev)
>> +{
>> + struct mpfs_ccc_data *clk_data;
>> + void __iomem *pll_base[ARRAY_SIZE(mpfs_ccc_pll_clks)];
>> + unsigned int num_clks;
>> + int ret;
>> +
>> + num_clks = ARRAY_SIZE(mpfs_ccc_pll_clks) + ARRAY_SIZE(mpfs_ccc_pll0out_clks)
>> + + ARRAY_SIZE(mpfs_ccc_pll1out_clks);
>
> Usually, as far as I can tell, there are no (or not too much) lines
> starting with arithmetic signs, but these goes at the end of the previous
> lines. This allows you to also align the ARRAY_SIZE() macros to each others.
>
> Other than that:
>
> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>
I think I just started the line with the operator as I find it
easier to read that way around, but not a big deal.
Thanks,
Conor.
next prev parent reply other threads:[~2022-09-06 7:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 12:28 [PATCH v4 0/5] Add PolarFire SoC Fabric Clock Conditioning Circuitry Support Conor Dooley
2022-08-30 12:28 ` [PATCH v4 1/5] dt-bindings: clk: rename mpfs-clkcfg binding Conor Dooley
2022-08-30 12:28 ` [PATCH v4 2/5] dt-bindings: clk: document PolarFire SoC fabric clocks Conor Dooley
2022-08-30 12:28 ` [PATCH v4 3/5] dt-bindings: clk: add PolarFire SoC fabric clock ids Conor Dooley
2022-08-30 12:28 ` [PATCH v4 4/5] clk: microchip: add PolarFire SoC fabric clock support Conor Dooley
2022-09-06 7:28 ` Claudiu.Beznea
2022-09-06 7:54 ` Conor.Dooley [this message]
2022-08-30 12:28 ` [PATCH v4 5/5] riscv: dts: microchip: add the mpfs' fabric clock control Conor Dooley
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=119689dc-f264-4a33-cef3-400e07fc7517@microchip.com \
--to=conor.dooley@microchip.com \
--cc=Claudiu.Beznea@microchip.com \
--cc=Daire.McNamara@microchip.com \
--cc=Hugh.Breslin@microchip.com \
--cc=aou@eecs.berkeley.edu \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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
all inboxes | Powered by JetHome®