[PATCH v6 4/9] clk: at91: clk-main: drop parent_name check when registering main_rc oscillator
Manikandan.M at microchip.com
Manikandan.M at microchip.com
Fri Jun 6 06:42:21 CEST 2025
Hi Eugen,
On 05/06/25 12:05 pm, Eugen Hristev wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 6/3/25 08:05, Manikandan Muralidharan wrote:
>> The clk_register function logs an error if parent_name is missing from the
>> Device Tree.On the SAM9X7, the main_rc node is omitted to stay aligned with
>> the Linux Device Tree.Remove the parent_name check in at91_clk_main_rc()
>> to allow it to pass NULL when the parent is not specified.
>
> Hello Manikandan,
>
> Can you explain a bit? parent_name is a field inside a struct, not in
> DT, so where is this parent_name taken from ?
> If the main_rc is now gone, which clock fails without this patch ?
>
uclass_get_device_by_name() fails if the main_rc node is omitted from
the Device Tree, resulting in an error message being printed to the
console from clk_register(). This patch suppresses that message.
> Eugen
>>
>> Signed-off-by: Manikandan Muralidharan <manikandan.m at microchip.com>
>> ---
>> drivers/clk/at91/clk-main.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c
>> index 09daae97676..a5186f885f0 100644
>> --- a/drivers/clk/at91/clk-main.c
>> +++ b/drivers/clk/at91/clk-main.c
>> @@ -110,7 +110,7 @@ struct clk *at91_clk_main_rc(void __iomem *reg, const char *name,
>> struct clk *clk;
>> int ret;
>>
>> - if (!reg || !name || !parent_name)
>> + if (!reg || !name)
>> return ERR_PTR(-EINVAL);
>>
>> main_rc = kzalloc(sizeof(*main_rc), GFP_KERNEL);
>
--
Thanks and Regards,
Manikandan M.
More information about the U-Boot
mailing list