devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Abel Vesa <abel.vesa@linaro.org>, Abel Vesa <abelvesa@kernel.org>,
	Ahmad Fatoum <a.fatoum@pengutronix.de>,
	Conor Dooley <conor+dt@kernel.org>,
	Fabio Estevam <festevam@gmail.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Marek Vasut <marex@denx.de>,
	Michael Turquette <mturquette@baylibre.com>,
	Peng Fan <peng.fan@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Rob Herring <robh@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>
Cc: linux-clk@vger.kernel.org, imx@lists.linux.dev,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [PATCH v2 6/6] clk: imx8mp: inform CCF of maximum frequency of clocks
Date: Mon, 06 Jan 2025 15:42:31 -0800	[thread overview]
Message-ID: <104eed995f349b123e633862f68de966.sboyd@kernel.org> (raw)
In-Reply-To: <20250106-imx8m-clk-v2-6-6aaeadac65fe@pengutronix.de>

Quoting Ahmad Fatoum (2025-01-06 06:21:47)
> diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
> index 516dbd170c8a356f293621b371b9ef9b9bec90a4..3b06990b73adcb2e4807f91a8983ad35068572a7 100644
> --- a/drivers/clk/imx/clk-imx8mp.c
> +++ b/drivers/clk/imx/clk-imx8mp.c
> @@ -405,6 +406,145 @@ static const char * const imx8mp_clkout_sels[] = {"audio_pll1_out", "audio_pll2_
>  static struct clk_hw **hws;
>  static struct clk_hw_onecell_data *clk_hw_data;
>  
> +struct imx8mp_clock_constraints {
> +       int clkid;

Is it signed instead of unsigned because the terminal element of the
array has -1 as a clkid? And because clkid 0 is a valid one?

> +       u32 maxrate;
> +};
> +
> +/*
> + * Below tables are taken from IMX8MPCEC Rev. 2.1, 07/2023
> + * Table 13. Maximum frequency of modules.
> + * Probable typos fixed are marked with a comment.
> + */
> +static const struct imx8mp_clock_constraints imx8mp_clock_common_constraints[] = {
[...]
> +       { IMX8MP_CLK_MEDIA_LDB,            595 * HZ_PER_MHZ },
> +       { IMX8MP_CLK_MEDIA_MIPI_TEST_BYTE, 200 * HZ_PER_MHZ },
> +       { IMX8MP_CLK_ECSPI3,                80 * HZ_PER_MHZ },
> +       { IMX8MP_CLK_PDM,                  200 * HZ_PER_MHZ },
> +       { IMX8MP_CLK_SAI7,                  66666667 }, /* Datasheet claims 66MHz */
> +       { IMX8MP_CLK_MAIN_AXI,             400 * HZ_PER_MHZ },
> +       { /* sentinel */ },

See nitpick below.

> +};
> +
> +static const struct imx8mp_clock_constraints imx8mp_clock_nominal_constraints[] = {
[...]
> +       { IMX8MP_CLK_MEDIA_CAM1_PIX,    400 * HZ_PER_MHZ },
> +       { IMX8MP_CLK_VPU_VC8000E,       400 * HZ_PER_MHZ }, /* Datasheet claims 500MHz */
> +       { IMX8MP_CLK_DRAM_CORE,         800 * HZ_PER_MHZ },
> +       { IMX8MP_CLK_GIC,               400 * HZ_PER_MHZ },
> +       { /* sentinel */ },

See nitpick below.

> +};
> +
> +static const struct imx8mp_clock_constraints imx8mp_clock_overdrive_constraints[] = {
[...]
> +       { IMX8MP_CLK_VPU_VC8000E,        500 * HZ_PER_MHZ }, /* Datasheet claims 400MHz */
> +       { IMX8MP_CLK_DRAM_CORE,         1000 * HZ_PER_MHZ },
> +       { IMX8MP_CLK_GIC,                500 * HZ_PER_MHZ },
> +       { /* sentinel */ },

Please remove the comma because nothing can come after this and if
someone were to add something after they would get a compilation error.

  reply	other threads:[~2025-01-06 23:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 14:21 [PATCH v2 0/6] arm64: dts: freescale: imx8mp-skov: switch to nominal drive mode Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 1/6] dt-bindings: clock: imx8m: document nominal/overdrive properties Ahmad Fatoum
2025-01-06 16:41   ` Frank Li
2025-01-06 19:25     ` Ahmad Fatoum
2025-01-06 19:42       ` Frank Li
2025-01-06 19:55         ` Ahmad Fatoum
2025-01-07  6:52           ` Krzysztof Kozlowski
2025-01-13 13:51             ` Ahmad Fatoum
2025-01-13 13:52         ` Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 2/6] arm64: dts: imx8mp: Add optional nominal drive mode DTSI Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 3/6] arm64: dts: imx8mp: add fsl,nominal-mode property into nominal.dtsi Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 4/6] arm64: dts: freescale: imx8mp-skov: fix LDB clock rate configuration Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 5/6] arm64: dts: freescale: imx8mp-skov: operate SoC in nominal mode Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 6/6] clk: imx8mp: inform CCF of maximum frequency of clocks Ahmad Fatoum
2025-01-06 23:42   ` Stephen Boyd [this message]
2025-01-13 13:48     ` Ahmad Fatoum

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=104eed995f349b123e633862f68de966.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=a.fatoum@pengutronix.de \
    --cc=abel.vesa@linaro.org \
    --cc=abelvesa@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mturquette@baylibre.com \
    --cc=peng.fan@nxp.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).