summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2021-06-11 07:16:07 +0300
committerLeo Yu-Chi Liang <ycliang@andestech.com>2021-06-17 04:40:57 +0300
commit6e33eba59f2e695b6549a42507218f04575859fa (patch)
tree857d4a3be4c3afe38eb9f4c4844d8fae4364f106 /drivers/core
parent173c3bcd7dca47f1a8f7371a229681d20c7821cc (diff)
downloadu-boot-6e33eba59f2e695b6549a42507218f04575859fa.tar.xz
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 <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index cb960f8ec4..9f1400768d 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;
}