mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 12:05:06 +07:00
969003152a
Add clock support for bf60x. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
28 lines
572 B
C
28 lines
572 B
C
#ifndef __MACH_COMMON_CLKDEV_H
|
|
#define __MACH_COMMON_CLKDEV_H
|
|
|
|
#include <linux/clk.h>
|
|
|
|
struct clk_ops {
|
|
unsigned long (*get_rate)(struct clk *clk);
|
|
unsigned long (*round_rate)(struct clk *clk, unsigned long rate);
|
|
int (*set_rate)(struct clk *clk, unsigned long rate);
|
|
int (*enable)(struct clk *clk);
|
|
int (*disable)(struct clk *clk);
|
|
};
|
|
|
|
struct clk {
|
|
const char *name;
|
|
unsigned long rate;
|
|
spinlock_t lock;
|
|
u32 flags;
|
|
const struct clk_ops *ops;
|
|
const struct params *params;
|
|
void __iomem *reg;
|
|
u32 mask;
|
|
u32 shift;
|
|
};
|
|
|
|
#endif
|
|
|