diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-11-27 07:49:38 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-12-05 08:45:32 +0100 |
commit | 1484a59ee7feff318aca6e5ff294ac7ce9a86d7f (patch) | |
tree | 4b365f297a1cbc41da9ffb3a166e6a8063e9cd94 /include/linux | |
parent | 9853266ce27b7f2ea7722c17749aa17d01f4b4bd (diff) | |
download | barebox-1484a59ee7feff318aca6e5ff294ac7ce9a86d7f.tar.gz barebox-1484a59ee7feff318aca6e5ff294ac7ce9a86d7f.tar.xz |
clk: divider: implement CLK_DIVIDER_ALLOW_ZERO
We already support CLK_DIVIDER_ONE_BASED and incoming STM32MP13 clock
support can have clock dividers evaluate to zero. Add support for
CLK_DIVIDER_ALLOW_ZERO analogously to Linux.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20231127064947.2207726-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/clk.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index 9975c1a601..269664b0ba 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -417,6 +417,7 @@ struct clk_divider { #define clk_div_mask(width) ((1 << (width)) - 1) #define CLK_DIVIDER_POWER_OF_TWO (1 << 1) +#define CLK_DIVIDER_ALLOW_ZERO (1 << 2) #define CLK_DIVIDER_HIWORD_MASK (1 << 3) #define CLK_DIVIDER_READ_ONLY (1 << 5) |