openwrt/target/linux/bcm27xx/patches-5.15/950-0440-clk-Always-clamp-the-rounded-rate.patch
Hauke Mehrtens 8f8d5decc9 kernel: bump 5.15 to 5.15.153
Removed because they are upstream:
generic/backport-5.15/704-15-v5.19-net-mtk_eth_soc-move-MAC_MCR-setting-to-mac_finish.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=c5c0760adc260d55265c086b9efb350ea6dda38b

generic/pending-5.15/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=448cc8b5f743985f6d1d98aa4efb386fef4c3bf2

generic/pending-5.15/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=9fcadd125044007351905d40c405fadc2d3bb6d6

Add new configuration symbols for tegra target.

Tested-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit fb2c6e9d4d)
2024-04-01 02:33:05 +02:00

29 lines
889 B
Diff

From 5efe54b26d470785883bec0264d8d5e145715038 Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime@cerno.tech>
Date: Wed, 5 May 2021 15:35:34 +0200
Subject: [PATCH] clk: Always clamp the rounded rate
The current core while setting the min and max rate properly in the
clk_request structure will not make sure that the requested rate is
within these boundaries, leaving it to each and every driver to make
sure it is.
Add a clamp call to make sure it's always done.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/clk/clk.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1360,6 +1360,8 @@ static int clk_core_determine_round_nolo
if (!core)
return 0;
+ req->rate = clamp(req->rate, req->min_rate, req->max_rate);
+
/*
* At this point, core protection will be disabled
* - if the provider is not protected at all