public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <Ryan.Wanner@microchip.com>
To: <claudiu.beznea@tuxon.dev>, <robh@kernel.org>,
	<krzk+dt@kernel.org>, <conor+dt@kernel.org>,
	<Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
	<mturquette@baylibre.com>, <sboyd@kernel.org>
Cc: <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-clk@vger.kernel.org>
Subject: Re: [PATCH v3 2/4] clk: at91: sama7d65: Add missing clk_hw to parent_data
Date: Mon, 12 May 2025 19:38:20 +0000	[thread overview]
Message-ID: <df84e472-958a-4b68-8932-af7a0e476338@microchip.com> (raw)
In-Reply-To: <bcf3089b-04d3-40ad-8673-db0e727fa72e@tuxon.dev>

Hi Claudiu,

On 5/12/25 07:47, Claudiu Beznea wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Hi, Ryan,
> 
> On 06.05.2025 23:04, Ryan.Wanner@microchip.com wrote:
>> From: Ryan Wanner <Ryan.Wanner@microchip.com>
>>
>> The main_xtal clk_hw struct is not passed into parent_data.hw causing
>> the main_osc to not have a parent causing a corrupted clock tree.
>> Passing the main_xtal struct into the parent_data struct will
>> ensure the correct parent structure for main_osc and a correct clock
>> tree.
>>
>> Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
>> ---
>>  drivers/clk/at91/sama7d65.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/at91/sama7d65.c b/drivers/clk/at91/sama7d65.c
>> index a5d40df8b2f2..1e9d3c393883 100644
>> --- a/drivers/clk/at91/sama7d65.c
>> +++ b/drivers/clk/at91/sama7d65.c
>> @@ -1100,7 +1100,7 @@ static void __init sama7d65_pmc_setup(struct device_node *np)
>>       struct regmap *regmap;
>>       struct clk_hw *hw, *main_rc_hw, *main_osc_hw, *main_xtal_hw;
>>       struct clk_hw *td_slck_hw, *md_slck_hw;
>> -     static struct clk_parent_data parent_data;
>> +     static struct clk_parent_data parent_data = {0};
>>       struct clk_hw *parent_hws[10];
>>       bool bypass;
>>       int i, j;
>> @@ -1138,6 +1138,7 @@ static void __init sama7d65_pmc_setup(struct device_node *np)
>>
>>       parent_data.name = main_xtal_name;
>>       parent_data.fw_name = main_xtal_name;
>> +     parent_data.hw = main_xtal_hw;
> 
> Is this line still needed with the initialization of parent data above:

Yes it is still needed because the clk_hw struct still needs to be
passed into the parent_data struct. If not the wrong parent will be set.
> 
>         static struct clk_parent_data parent_data = {0};
> 
>>       main_osc_hw = at91_clk_register_main_osc(regmap, "main_osc", NULL,
>>                                                &parent_data, bypass);
>>       if (IS_ERR(main_osc_hw))
> 


  reply	other threads:[~2025-05-12 19:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 20:04 [PATCH v3 0/4] AT91 SAMA7 SoC Clock Adjustments Ryan.Wanner
2025-05-06 20:04 ` [PATCH v3 1/4] clk: at91: sckc: Fix parent_data struct for slow osc Ryan.Wanner
2025-05-06 20:04 ` [PATCH v3 2/4] clk: at91: sama7d65: Add missing clk_hw to parent_data Ryan.Wanner
2025-05-12 14:47   ` Claudiu Beznea
2025-05-12 19:38     ` Ryan.Wanner [this message]
2025-05-06 20:04 ` [PATCH v3 3/4] clk: at91: sama7g5: " Ryan.Wanner
2025-05-06 20:04 ` [PATCH v3 4/4] ARM: dts: microchip: sama7g5: Adjust clock xtal phandle Ryan.Wanner

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=df84e472-958a-4b68-8932-af7a0e476338@microchip.com \
    --to=ryan.wanner@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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=mturquette@baylibre.com \
    --cc=robh@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