2012-08-20 10:55:11 +08:00
|
|
|
#ifndef __MACH_MMP_CLK_H
|
|
|
|
#define __MACH_MMP_CLK_H
|
|
|
|
|
|
|
|
#include <linux/clk-provider.h>
|
|
|
|
#include <linux/clkdev.h>
|
|
|
|
|
|
|
|
#define APBC_NO_BUS_CTRL BIT(0)
|
|
|
|
#define APBC_POWER_CTRL BIT(1)
|
|
|
|
|
2014-10-31 10:13:41 +08:00
|
|
|
struct mmp_clk_factor_masks {
|
2012-08-20 10:55:11 +08:00
|
|
|
unsigned int factor;
|
|
|
|
unsigned int num_mask;
|
|
|
|
unsigned int den_mask;
|
|
|
|
unsigned int num_shift;
|
|
|
|
unsigned int den_shift;
|
|
|
|
};
|
|
|
|
|
2014-10-31 10:13:41 +08:00
|
|
|
struct mmp_clk_factor_tbl {
|
2012-08-20 10:55:11 +08:00
|
|
|
unsigned int num;
|
|
|
|
unsigned int den;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct clk *mmp_clk_register_pll2(const char *name,
|
|
|
|
const char *parent_name, unsigned long flags);
|
|
|
|
extern struct clk *mmp_clk_register_apbc(const char *name,
|
|
|
|
const char *parent_name, void __iomem *base,
|
|
|
|
unsigned int delay, unsigned int apbc_flags, spinlock_t *lock);
|
|
|
|
extern struct clk *mmp_clk_register_apmu(const char *name,
|
|
|
|
const char *parent_name, void __iomem *base, u32 enable_mask,
|
|
|
|
spinlock_t *lock);
|
|
|
|
extern struct clk *mmp_clk_register_factor(const char *name,
|
|
|
|
const char *parent_name, unsigned long flags,
|
2014-10-31 10:13:41 +08:00
|
|
|
void __iomem *base, struct mmp_clk_factor_masks *masks,
|
2014-10-31 10:13:42 +08:00
|
|
|
struct mmp_clk_factor_tbl *ftbl, unsigned int ftbl_cnt,
|
|
|
|
spinlock_t *lock);
|
2012-08-20 10:55:11 +08:00
|
|
|
#endif
|