diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 5b0f41868b425672e6295ac6b30a52e43cf5730c..0c0124c4eeeb857594157750d4fe8a9ac5f6a428 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1788,6 +1788,9 @@ static void clk_change_rate(struct clk_core *clk) if (clk->notifier_count && old_rate != clk->rate) __clk_notify(clk, POST_RATE_CHANGE, old_rate, clk->rate); + if (clk->flags & CLK_RECALC_NEW_RATES) + (void)clk_calc_new_rates(clk, clk->new_rate); + /* * Use safe iteration, as change_rate can actually swap parents * for certain clock types. diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index df695313f975769b6cfc740760cbc8c33b6a8d5c..82f59ca8188a91de895e4fdaee66bae24b062995 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -31,6 +31,7 @@ #define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */ #define CLK_SET_RATE_NO_REPARENT BIT(7) /* don't re-parent on rate change */ #define CLK_GET_ACCURACY_NOCACHE BIT(8) /* do not use the cached clk accuracy */ +#define CLK_RECALC_NEW_RATES BIT(9) /* recalc rates after notifications */ struct clk_hw; struct clk_core;