[U-Boot] [PATCH 11/25] clk: Allow clock defaults to be set also during re-reloc state
Lokesh Vutla
lokeshvutla at ti.com
Mon Aug 27 06:02:17 UTC 2018
Hi Philipp,
On Friday 24 August 2018 08:12 PM, Dr. Philipp Tomsich wrote:
> +Kever
>
>> On 24 Aug 2018, at 16:12, Tom Rini <trini at konsulko.com> wrote:
>>
>> On Tue, Aug 21, 2018 at 08:01:49PM +0530, Lokesh Vutla wrote:
>>
>>> From: Andreas Dannenberg <dannenberg at ti.com>
>>>
>>> The earlier commit f4fcba5c5ba ("clk: implement clk_set_defaults()")
>>> which introduced the functionality for setting clock defaults such as
>>> rates and parents will skip the processing when executing in a re-reloc
>>> state. This for example can prevent the assigning of clock parents
>>> when running in SPL code. Go ahead and remove this limitation.
>>>
>>> Signed-off-by: Andreas Dannenberg <dannenberg at ti.com>
>>> Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
>>> ---
>>> drivers/clk/clk-uclass.c | 4 ----
>>> 1 file changed, 4 deletions(-)
>>>
>>> diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
>>> index 2b15978e14..04b369aa5a 100644
>>> --- a/drivers/clk/clk-uclass.c
>>> +++ b/drivers/clk/clk-uclass.c
>>> @@ -243,10 +243,6 @@ int clk_set_defaults(struct udevice *dev)
>>> {
>>> int ret;
>>>
>>> - /* If this is running pre-reloc state, don't take any action. */
>>> - if (!(gd->flags & GD_FLG_RELOC))
>>> - return 0;
>>> -
>>> debug("%s(%s)\n", __func__, dev_read_name(dev));
>>>
>>> ret = clk_set_default_parents(dev);
>>
>> Philipp? David? Comments? Thanks!
>
> If I remember correctly, David had a concern regarding an increase in
> boottime if we ran this twice… adding Kever, as he was also involved
> in the discussion.
If you don't want to update clock rates in SPL, why can't
CONFIG_OF_SPL_REMOVE_PROPS be used to delete not needed properties.
>
> I settled on skipping it for pre-reloc, but it’s an imperfect solution: the
> boottime increase comes from the fact that some devices have a large
> number of assigned-clocks, that the device-tree processing has a cost,
> and that we don’t have a way of synchronising between SPL and full
> U-Boot to avoid redoing the complete init-flow.
Right I agree to you point. but we should not restrict everyone to not
update default clock rates in SPL. Can you see if OF_SPL_REMOVE_PROPS
solves your problem or you have already tried it?
Actually I don't mind dropping this patch for now as we are not using
any default clock rates in SPL right now.
Thanks and regards,
Lokesh
More information about the U-Boot
mailing list