From 6e33eba59f2e695b6549a42507218f04575859fa Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Fri, 11 Jun 2021 00:16:07 -0400 Subject: clk: Allow force setting clock defaults before relocation Since 291da96b8e ("clk: Allow clock defaults to be set during re-reloc state for SPL only") it has been impossible to set clock defaults before relocation. This is annoying on boards without SPL, since there is no way to set clock defaults before U-Boot proper. In particular, the aisram rate must be changed before relocation on the K210, since U-Boot will hang if we try and change the rate while we are using aisram. To get around this, extend the stage parameter to allow force setting defaults, even if they would be otherwise postponed for later. A device tree property was decided against because of the concerns in the original commit thread about the overhead of repeatedly parsing the device tree. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- drivers/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/core') diff --git a/drivers/core/device.c b/drivers/core/device.c index cb960f8ec44..9f1400768de 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -561,7 +561,7 @@ int device_probe(struct udevice *dev) * Process 'assigned-{clocks/clock-parents/clock-rates}' * properties */ - ret = clk_set_defaults(dev, 0); + ret = clk_set_defaults(dev, CLK_DEFAULTS_PRE); if (ret) goto fail; } -- cgit v1.2.3