4d7dc77bab
The Krait clocks are made up of a series of muxes and a divider that choose between a fixed rate clock and dedicated HFPLLs for each CPU. Instead of using mmio accesses to remux parents, the Krait implementation exposes the remux control via cp15 registers. Support these clocks. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Sricharan R <sricharan@codeaurora.org> Tested-by: Craig Tatlor <ctatlor97@gmail.com> [sboyd@kernel.org: Move hidden config to top outside of the visible qcom config zone so that menuconfig looks nice] Signed-off-by: Stephen Boyd <sboyd@kernel.org>
38 lines
656 B
C
38 lines
656 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;
|
|
|
|
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
|