clk_set_rate_range() will use the last requested rate for the clock when it calls into the driver set_rate hook. However, if CLK_GET_RATE_NOCACHE is set on that clock, the last requested rate might not be matching the current rate of the clock. In such a case, let's read out ...
clkp = dev_get_clk_ptr(child_dev); clk_clean_rate_cache(clkp); } }ulong clk_set_rate(struct clk *clk, ulong rate) { const struct clk_ops *ops; @@ -580,6 +596,9 @@ ulong clk_set_rate(struct clk *clk, ulong rate)if
> > (CLK_GOUT_MMC_EMBD_SDCLKIN), so the MMC driver won't be able to change > > its rate. But that clock actually has CLK_SET_RATE_PARENT flag set in > > the clock driver [2]. So the right thing to do in this case (and > > that's basically how it's done in Linux kern...
From: Mark Brown <broo...@linaro.org> It is possible that we may fail to set the clock rate, if we do so then log the failure and don't bother reprogramming the IP. Signed-off-by: Mark Brown <broo...@linaro.org> Acked-by: Jaehoon Chung <jh80.ch...@samsung.com> --- driv...
@@ -91,12 +86,7 @@ static int clk_ref_set_rate(struct clk_hw *hw, unsigned long rate,tmp = tmp * 18 + rate / 2; do_div(tmp, rate); frac = tmp;if (frac < 18) frac = 18;else if (frac > 35) frac = 35; frac = clamp(tmp, 18, 35);spin...
return DIV_TO_RATE(parent, div); }static ulong rk1808_crypto_set_clk(struct rk1808_clk_priv *priv, ulong clk_id, ulong hz) { struct rk1808_cru *cru = priv->cru; int src_clk_div;src_clk_div = DIV_ROUND_UP(priv->gpll_hz, hz);...
+ ret = clk_set_rate(host->fclk, mmc->f_max); + if (ret) { + dev_err(&pdev->dev, "failed to set clock to %d\n", mmc->f_max); goto err1; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in ...
failed to set clk rate mali gpu rk3588 dmesg | grep mali [ 4.468650] mali fb000000.gpu: Kernel DDK version g18p0-01eac0 [ 4.468714] mali fb000000.gpu: Looking up mali-supply from device tree [ 4.468791] mali fb000000.gpu: Looking up mem-supply from device tree...
The provider variable is already dereferenced earlier in this function. Drop the check for NULL as it is impossible. Found with smatch drivers/clk/tegra/clk-tegra210-emc.c:131 tegra210_clk_emc_set_rate() warn: variable dereferenced before check 'provider' (see line 124) Cc: Joseph Lo <jo...