Linux clock framework development
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Conor Dooley <conor+dt@kernel.org>,
	Gabriel FERNANDEZ <gabriel.fernandez@foss.st.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Rob Herring <robh+dt@kernel.org>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/2] clk: stm32: introduce clocks for STM32MP257 platform
Date: Thu, 21 Dec 2023 16:48:59 -0800	[thread overview]
Message-ID: <a2d96b8259eed101c649fd71f7c1e453.sboyd@kernel.org> (raw)
In-Reply-To: <21f758cb-ae25-4d74-905c-0d4820f00070@foss.st.com>

Quoting Gabriel FERNANDEZ (2023-12-21 02:31:53)
> 
> On 12/20/23 23:16, Stephen Boyd wrote:
> > Quoting gabriel.fernandez@foss.st.com (2023-12-19 05:09:08)
> >> diff --git a/drivers/clk/stm32/clk-stm32mp25.c b/drivers/clk/stm32/clk-stm32mp25.c
> >> new file mode 100644
> >> index 000000000000..313e022c6142
> >> --- /dev/null
> >> +++ b/drivers/clk/stm32/clk-stm32mp25.c
> >> @@ -0,0 +1,1826 @@
> >> +// SPDX-License-Identifier: GPL-2.0-only
> >> +/*
> >> + * Copyright (C) STMicroelectronics 2023 - All Rights Reserved
> >> + * Author: Gabriel Fernandez <gabriel.fernandez@foss.st.com> for STMicroelectronics.
> >> + */
> >> +
> >> +#include <linux/clk.h>
> >> +#include <linux/of_address.h>
> >> +#include <linux/platform_device.h>
> >> +
> >> +#include "clk-stm32-core.h"
> >> +#include "reset-stm32.h"
> >> +#include "stm32mp25_rcc.h"
> >> +
> >> +#include <dt-bindings/clock/st,stm32mp25-rcc.h>
> >> +#include <dt-bindings/reset/st,stm32mp25-rcc.h>
> >> +
> >> +static const struct clk_parent_data adc12_src[] = {
> >> +       { .name = "ck_flexgen_46" },
> > This is a new driver. Don't use .name here. Instead use .index or .hw
> > and if that can't work then use .fw_name.
> 
> These parent clocks are managed by a secure world and exposed through SCMI.
> 
> If I use .index or .fw_name, do I have to expose 122 clocks in my DT node ?
> 
> This will significantly increase the size of the DT file
> 
>              clock-names = "hse", "hsi", ..., "ck_scmi_stm500";
>              clocks = <&scmi_clk CK_SCMI_HSE>, <&scmi_clk CK_SCMI_HSI>,  
> ... ,   <&scmi_clk CK_SCMI_STM500>;
> 

Yes? We want DT to express the connections between device nodes, and if
the clks managed by SCMI are consumed here then they need to be
specified via the clocks property.

> 
> >
> >> +       { }
> >> +};
> >> +MODULE_DEVICE_TABLE(of, stm32mp25_match_data);
> >> +
> >> +static int get_clock_deps(struct device *dev)
> > What is the explanation for this function?
> 
> It 's to manage the dependency with the SCMI clock driver.

Please elaborate. Are you making sure the SCMI clk driver has probed
before this driver? Why? What's wrong with probing this driver first?

  reply	other threads:[~2023-12-22  0:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 13:09 [PATCH v7 0/2] Introduce STM32MP257 clock driver gabriel.fernandez
2023-12-19 13:09 ` [PATCH v7 1/2] clk: stm32: introduce clocks for STM32MP257 platform gabriel.fernandez
2023-12-20  9:40   ` Gabriel FERNANDEZ
2023-12-20 22:16   ` Stephen Boyd
2023-12-21 10:31     ` Gabriel FERNANDEZ
2023-12-22  0:48       ` Stephen Boyd [this message]
2023-12-19 13:09 ` [PATCH v7 2/2] arm64: dts: st: add rcc support in stm32mp251 gabriel.fernandez

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=a2d96b8259eed101c649fd71f7c1e453.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gabriel.fernandez@foss.st.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@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