diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-01-31 08:57:25 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-02-01 09:03:46 +0100 |
commit | 27923adcd1b7f5aa42a5ee8b797ddfa8c2e8e5a9 (patch) | |
tree | ab35784361d284b49486dcf9cc5ab7a32f09d2d6 /include | |
parent | 314dcbc09ae7f3274583b55df1a61a0f8f830417 (diff) | |
download | barebox-27923adcd1b7f5aa42a5ee8b797ddfa8c2e8e5a9.tar.gz barebox-27923adcd1b7f5aa42a5ee8b797ddfa8c2e8e5a9.tar.xz |
clk: add clock driver for stm32f4 and stm32f7
Port over the Linux v5.16 state of the clock driver.
Tested on a STM32F429.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220131075725.1873026-13-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/bitsperlong.h | 4 | ||||
-rw-r--r-- | include/linux/clk.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-generic/bitsperlong.h b/include/asm-generic/bitsperlong.h index 836a1d4c83..20c055c6bd 100644 --- a/include/asm-generic/bitsperlong.h +++ b/include/asm-generic/bitsperlong.h @@ -9,4 +9,8 @@ #define BITS_PER_LONG 32 #endif /* CONFIG_64BIT */ +#ifndef BITS_PER_LONG_LONG +#define BITS_PER_LONG_LONG 64 +#endif + #endif /* __ASM_GENERIC_BITS_PER_LONG */ diff --git a/include/linux/clk.h b/include/linux/clk.h index 887cd79009..9bee204652 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -759,6 +759,11 @@ static inline unsigned int clk_hw_get_num_parents(const struct clk_hw *hw) return hw->clk.num_parents; } +static inline unsigned long clk_hw_get_flags(const struct clk_hw *hw) +{ + return hw->clk.flags; +} + int clk_name_set_parent(const char *clkname, const char *clkparentname); int clk_name_set_rate(const char *clkname, unsigned long rate); |