mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-10 03:20:49 +00:00
clk: imx: add imx8m_clk_hw_composite_bus
Introduce imx8m_clk_hw_composite_bus api for bus clk root slice usage. Because the mux switch sequence issue, we could not reuse Peripheral Clock Slice code, need use composite specific mux operation. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
This commit is contained in:
parent
f90b68d6c8
commit
0e40198dc2
@ -205,6 +205,11 @@ struct clk_hw *imx8m_clk_hw_composite_flags(const char *name,
|
|||||||
div->width = PCG_CORE_DIV_WIDTH;
|
div->width = PCG_CORE_DIV_WIDTH;
|
||||||
divider_ops = &clk_divider_ops;
|
divider_ops = &clk_divider_ops;
|
||||||
mux_ops = &imx8m_clk_composite_mux_ops;
|
mux_ops = &imx8m_clk_composite_mux_ops;
|
||||||
|
} else if (composite_flags & IMX_COMPOSITE_BUS) {
|
||||||
|
div->shift = PCG_PREDIV_SHIFT;
|
||||||
|
div->width = PCG_PREDIV_WIDTH;
|
||||||
|
divider_ops = &imx8m_clk_composite_divider_ops;
|
||||||
|
mux_ops = &imx8m_clk_composite_mux_ops;
|
||||||
} else {
|
} else {
|
||||||
div->shift = PCG_PREDIV_SHIFT;
|
div->shift = PCG_PREDIV_SHIFT;
|
||||||
div->width = PCG_PREDIV_WIDTH;
|
div->width = PCG_PREDIV_WIDTH;
|
||||||
|
@ -527,6 +527,7 @@ struct clk_hw *imx_clk_hw_cpu(const char *name, const char *parent_name,
|
|||||||
struct clk *step);
|
struct clk *step);
|
||||||
|
|
||||||
#define IMX_COMPOSITE_CORE BIT(0)
|
#define IMX_COMPOSITE_CORE BIT(0)
|
||||||
|
#define IMX_COMPOSITE_BUS BIT(1)
|
||||||
|
|
||||||
struct clk_hw *imx8m_clk_hw_composite_flags(const char *name,
|
struct clk_hw *imx8m_clk_hw_composite_flags(const char *name,
|
||||||
const char * const *parent_names,
|
const char * const *parent_names,
|
||||||
@ -535,6 +536,12 @@ struct clk_hw *imx8m_clk_hw_composite_flags(const char *name,
|
|||||||
u32 composite_flags,
|
u32 composite_flags,
|
||||||
unsigned long flags);
|
unsigned long flags);
|
||||||
|
|
||||||
|
#define imx8m_clk_hw_composite_bus(name, parent_names, reg) \
|
||||||
|
imx8m_clk_hw_composite_flags(name, parent_names, \
|
||||||
|
ARRAY_SIZE(parent_names), reg, \
|
||||||
|
IMX_COMPOSITE_BUS, \
|
||||||
|
CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE)
|
||||||
|
|
||||||
#define imx8m_clk_hw_composite_core(name, parent_names, reg) \
|
#define imx8m_clk_hw_composite_core(name, parent_names, reg) \
|
||||||
imx8m_clk_hw_composite_flags(name, parent_names, \
|
imx8m_clk_hw_composite_flags(name, parent_names, \
|
||||||
ARRAY_SIZE(parent_names), reg, \
|
ARRAY_SIZE(parent_names), reg, \
|
||||||
|
Loading…
Reference in New Issue
Block a user