39 lines
844 B
C
39 lines
844 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2019 BayLibre, SAS.
|
|
* Author: Neil Armstrong <[email protected]>
|
|
*/
|
|
|
|
#ifndef __MESON_CLK_CPU_DYNDIV_H
|
|
#define __MESON_CLK_CPU_DYNDIV_H
|
|
|
|
struct cpu_dyn_table {
|
|
unsigned long rate;
|
|
u16 dyn_pre_mux;
|
|
u16 dyn_post_mux;
|
|
u16 dyn_div;
|
|
};
|
|
|
|
struct meson_clk_cpu_dyn_data {
|
|
const struct cpu_dyn_table *table;
|
|
unsigned int offset;
|
|
u32 smc_id;
|
|
u8 table_cnt;
|
|
u8 secid_dyn_rd;
|
|
u8 secid_dyn;
|
|
unsigned long saved_rate;
|
|
};
|
|
|
|
#define CPU_LOW_PARAMS(_rate, _dyn_pre_mux, _dyn_post_mux, _dyn_div) \
|
|
{ \
|
|
.rate = (_rate), \
|
|
.dyn_pre_mux = (_dyn_pre_mux), \
|
|
.dyn_post_mux = (_dyn_post_mux), \
|
|
.dyn_div = (_dyn_div) \
|
|
}
|
|
|
|
extern const struct clk_ops meson_clk_cpu_dyn_ops;
|
|
extern const struct clk_ops meson_sec_sys_clk_ops;
|
|
|
|
#endif /* __MESON_CLK_CPU_DYNDIV_H */
|