clk: tegra: Changes for v5.11-rc1
This set consists of two fixes for minor issues that rarely, if ever, happen, so not urgent enough for these to go into v5.10. -----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl/BDJQTHHRyZWRpbmdA bnZpZGlhLmNvbQAKCRDdI6zXfz6zoSZ5D/9mNq1+PuIsCwBlIP+nBUcx1qNid4RH 4jHhwxYxQFsPL6P2BpwS5RRVk4gLvetevcpi6gjPvkj5d5/p7H/3dVvf+lcqWbm1 aIderPTitYLb63HPAEO0bLaACEboCks/NIvsdzlS34bL4e8ovz5yMDQK6bNUm0qU Q0of8O5LT+QulVyqIUuFeFqepcURP2GWAIl7cbqitx8IBI/R6anHC+E66RgSJLbv yjBscS4iRjDksBP02sms+YtwSrOylrJMshbDePeOjjAToFpnr00HSJBGppH/5eQx hblMIULs/hJ4qw57OBqiVUtTxBaYgj0FIzRvE4WgS1H3oLg7iuEwT3IXS3vKne7K ygg2SPXXE/jlwifSyG5dtV63puzcPzBkDxOitB9pn7l9XDu5AhzHXPx6AHf8OuHT 7NipTliy+dO4fDGz71k2WCpadXLP9Gn7qHs3n1d4i38ePOvhqZvOxEVhItTjFpDM 53Np6KgaUj9+ua8rmpp3OJMEjYqiuDDBDORUbR4gYPRpNhwy4rcBmKPklHIpSB+B wkJZDa/2XIU05a83K1hqAPAVLOh8WISjAERJ98pa4zjncXNjx4P7Qh1VXfyHMUSe tVxZ1QIu11HobkNIc/af+f1y406Fsb1BBWO9mKsVexa7arePIIMjlHIgkPqSkb4m Wj/gwl8eHMWzZw== =Uv4o -----END PGP SIGNATURE----- Merge tag 'for-5.11-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-tegra Pull a couple Tegra clk driver updates from Thierry Reding: This set consists of two fixes for minor issues that rarely, if ever, happen, so not urgent enough for these to go into v5.10. * tag 'for-5.11-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra: bpmp: Clamp clock rates on requests clk: tegra: Do not return 0 on failure
This commit is contained in:
commit
55cd03e809
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (C) 2016 NVIDIA Corporation
|
||||
* Copyright (C) 2016-2020 NVIDIA Corporation
|
||||
*/
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
|
@ -174,7 +174,7 @@ static long tegra_bpmp_clk_round_rate(struct clk_hw *hw, unsigned long rate,
|
|||
int err;
|
||||
|
||||
memset(&request, 0, sizeof(request));
|
||||
request.rate = rate;
|
||||
request.rate = min_t(u64, rate, S64_MAX);
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
msg.cmd = CMD_CLK_ROUND_RATE;
|
||||
|
@ -256,7 +256,7 @@ static int tegra_bpmp_clk_set_rate(struct clk_hw *hw, unsigned long rate,
|
|||
struct tegra_bpmp_clk_message msg;
|
||||
|
||||
memset(&request, 0, sizeof(request));
|
||||
request.rate = rate;
|
||||
request.rate = min_t(u64, rate, S64_MAX);
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
msg.cmd = CMD_CLK_SET_RATE;
|
||||
|
|
|
@ -1856,13 +1856,13 @@ static int dfll_fetch_pwm_params(struct tegra_dfll *td)
|
|||
&td->reg_init_uV);
|
||||
if (!ret) {
|
||||
dev_err(td->dev, "couldn't get initialized voltage\n");
|
||||
return ret;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = read_dt_param(td, "nvidia,pwm-period-nanoseconds", &pwm_period);
|
||||
if (!ret) {
|
||||
dev_err(td->dev, "couldn't get PWM period\n");
|
||||
return ret;
|
||||
return -EINVAL;
|
||||
}
|
||||
td->pwm_rate = (NSEC_PER_SEC / pwm_period) * (MAX_DFLL_VOLTAGES - 1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue