mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 14:12:51 +00:00
77612720a2
When the Hfplls are reprogrammed during the rate change, the primary muxes which are sourced from the same hfpll for higher frequencies, needs to be switched to the 'safe secondary mux' as the parent for that small window. This is done by registering a clk notifier for the muxes and switching to the safe parent in the PRE_RATE_CHANGE notifier and back to the original parent in the POST_RATE_CHANGE notifier. Signed-off-by: Sricharan R <sricharan@codeaurora.org> Tested-by: Craig Tatlor <ctatlor97@gmail.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
41 lines
704 B
C
41 lines
704 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __QCOM_CLK_KRAIT_H
|
|
#define __QCOM_CLK_KRAIT_H
|
|
|
|
#include <linux/clk-provider.h>
|
|
|
|
struct krait_mux_clk {
|
|
unsigned int *parent_map;
|
|
u32 offset;
|
|
u32 mask;
|
|
u32 shift;
|
|
u32 en_mask;
|
|
bool lpl;
|
|
u8 safe_sel;
|
|
u8 old_index;
|
|
bool reparent;
|
|
|
|
struct clk_hw hw;
|
|
struct notifier_block clk_nb;
|
|
};
|
|
|
|
#define to_krait_mux_clk(_hw) container_of(_hw, struct krait_mux_clk, hw)
|
|
|
|
extern const struct clk_ops krait_mux_clk_ops;
|
|
|
|
struct krait_div2_clk {
|
|
u32 offset;
|
|
u8 width;
|
|
u32 shift;
|
|
bool lpl;
|
|
|
|
struct clk_hw hw;
|
|
};
|
|
|
|
#define to_krait_div2_clk(_hw) container_of(_hw, struct krait_div2_clk, hw)
|
|
|
|
extern const struct clk_ops krait_div2_clk_ops;
|
|
|
|
#endif
|