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