clk: amlogic: move PCLK definition to clkc-utils
clk-regmap was always meant to stay generic, without any amlogic specifics. The hope was that it could move out of the amlogic directory one day. Even if this may actually not become true, it should remain generic. Move the amlogic peripheral clock definition out of clk-regmap header. Link: https://lore.kernel.org/r/20250825-meson-clk-cleanup-24-v2-5-0f402f01e117@baylibre.com Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
This commit is contained in:
parent
2aeeb649ea
commit
32ee5475f7
|
|
@ -118,24 +118,4 @@ clk_get_regmap_mux_data(struct clk_regmap *clk)
|
|||
extern const struct clk_ops clk_regmap_mux_ops;
|
||||
extern const struct clk_ops clk_regmap_mux_ro_ops;
|
||||
|
||||
#define __MESON_PCLK(_name, _reg, _bit, _ops, _pname) \
|
||||
struct clk_regmap _name = { \
|
||||
.data = &(struct clk_regmap_gate_data){ \
|
||||
.offset = (_reg), \
|
||||
.bit_idx = (_bit), \
|
||||
}, \
|
||||
.hw.init = &(struct clk_init_data) { \
|
||||
.name = #_name, \
|
||||
.ops = _ops, \
|
||||
.parent_hws = (const struct clk_hw *[]) { _pname }, \
|
||||
.num_parents = 1, \
|
||||
.flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define MESON_PCLK(_name, _reg, _bit, _pname) \
|
||||
__MESON_PCLK(_name, _reg, _bit, &clk_regmap_gate_ops, _pname)
|
||||
|
||||
#define MESON_PCLK_RO(_name, _reg, _bit, _pname) \
|
||||
__MESON_PCLK(_name, _reg, _bit, &clk_regmap_gate_ro_ops, _pname)
|
||||
#endif /* __CLK_REGMAP_H */
|
||||
|
|
|
|||
|
|
@ -27,4 +27,25 @@ struct meson_clkc_data {
|
|||
int meson_clkc_syscon_probe(struct platform_device *pdev);
|
||||
int meson_clkc_mmio_probe(struct platform_device *pdev);
|
||||
|
||||
#define __MESON_PCLK(_name, _reg, _bit, _ops, _pname) \
|
||||
struct clk_regmap _name = { \
|
||||
.data = &(struct clk_regmap_gate_data) { \
|
||||
.offset = (_reg), \
|
||||
.bit_idx = (_bit), \
|
||||
}, \
|
||||
.hw.init = &(struct clk_init_data) { \
|
||||
.name = #_name, \
|
||||
.ops = _ops, \
|
||||
.parent_hws = (const struct clk_hw *[]) { _pname }, \
|
||||
.num_parents = 1, \
|
||||
.flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define MESON_PCLK(_name, _reg, _bit, _pname) \
|
||||
__MESON_PCLK(_name, _reg, _bit, &clk_regmap_gate_ops, _pname)
|
||||
|
||||
#define MESON_PCLK_RO(_name, _reg, _bit, _pname) \
|
||||
__MESON_PCLK(_name, _reg, _bit, &clk_regmap_gate_ro_ops, _pname)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue