| #ifndef __CAL_IF_H__ |
| #define __CAL_IF_H__ |
| |
| #ifdef CONFIG_PWRCAL |
| #include "../../../drivers/soc/samsung/pwrcal/pwrcal.h" |
| |
| static inline int cal_qch_init(unsigned int vclkid, unsigned int use_qch) |
| { |
| return 0; |
| } |
| |
| static inline int cal_if_init(void) |
| { |
| return 0; |
| } |
| #else |
| #include "../../../drivers/soc/samsung/cal-if/pmucal_system.h" |
| |
| #define BLKPWR_MAGIC 0xB1380000 |
| |
| extern unsigned int cal_clk_get(char *name); |
| extern unsigned int cal_clk_is_enabled(unsigned int vclkid); |
| extern int cal_clk_setrate(unsigned int vclkid, unsigned long rate); |
| extern unsigned long cal_clk_getrate(unsigned int vclkid); |
| extern int cal_clk_enable(unsigned int vclkid); |
| extern int cal_clk_disable(unsigned int vclkid); |
| extern int cal_qch_init(unsigned int vclkid, unsigned int use_qch); |
| |
| extern int cal_pd_control(unsigned int id, int on); |
| extern int cal_pd_status(unsigned int id); |
| |
| |
| extern int cal_pm_enter(int mode); |
| extern int cal_pm_exit(int mode); |
| extern int cal_pm_earlywakeup(int mode); |
| |
| extern int cal_cpu_enable(unsigned int cpu); |
| extern int cal_cpu_disable(unsigned int cpu); |
| extern int cal_cpu_status(unsigned int cpu); |
| extern int cal_cluster_enable(unsigned int cluster); |
| extern int cal_cluster_disable(unsigned int cluster); |
| extern int cal_cluster_status(unsigned int cluster); |
| |
| extern unsigned int cal_dfs_get(char *name); |
| extern unsigned long cal_dfs_get_max_freq(unsigned int id); |
| extern unsigned long cal_dfs_get_min_freq(unsigned int id); |
| extern int cal_dfs_set_rate(unsigned int id, unsigned long rate); |
| extern int cal_dfs_set_rate_switch(unsigned int id, unsigned long switch_rate); |
| extern unsigned long cal_dfs_cached_get_rate(unsigned int id); |
| extern unsigned long cal_dfs_get_rate(unsigned int id); |
| extern int cal_dfs_get_rate_table(unsigned int id, unsigned long *table); |
| extern int cal_dfs_get_asv_table(unsigned int id, unsigned int *table); |
| extern int cal_dfs_get_bigturbo_max_freq(unsigned int *table); |
| extern unsigned int cal_dfs_get_boot_freq(unsigned int id); |
| extern unsigned int cal_dfs_get_resume_freq(unsigned int id); |
| extern unsigned int cal_dfs_get_lv_num(unsigned int id); |
| extern unsigned int cal_asv_pmic_info(void); |
| |
| |
| struct dvfs_rate_volt { |
| unsigned long rate; |
| unsigned int volt; |
| }; |
| int cal_dfs_get_rate_asv_table(unsigned int id, |
| struct dvfs_rate_volt *table); |
| extern void cal_dfs_set_volt_margin(unsigned int id, int volt); |
| extern unsigned long cal_dfs_get_rate_by_member(unsigned int id, |
| char *member, |
| unsigned long rate); |
| extern int cal_dfs_set_ema(unsigned int id, unsigned int volt); |
| |
| enum cal_dfs_ext_ops { |
| cal_dfs_initsmpl = 0, |
| cal_dfs_setsmpl = 1, |
| cal_dfs_get_smplstatus = 2, |
| cal_dfs_deinitsmpl = 3, |
| |
| cal_dfs_dvs = 30, |
| |
| /* Add new ops at below */ |
| cal_dfs_mif_is_dll_on = 50, |
| |
| cal_dfs_cpu_idle_clock_down = 60, |
| |
| cal_dfs_ctrl_clk_gate = 70, |
| }; |
| |
| extern int cal_dfs_ext_ctrl(unsigned int id, |
| enum cal_dfs_ext_ops ops, |
| int para); |
| |
| extern int cal_asv_get_ids_info(unsigned int id); |
| extern int cal_asv_get_grp(unsigned int id); |
| extern int cal_asv_get_tablever(void); |
| |
| extern void cal_cp_init(void); |
| extern int cal_cp_status(void); |
| extern void cal_cp_reset_assert(void); |
| extern void cal_cp_reset_release(void); |
| extern void cal_cp_active_clear(void); |
| extern void cal_cp_reset_req_clear(void); |
| |
| extern void cal_gnss_init(void); |
| extern int cal_gnss_status(void); |
| extern void cal_gnss_reset_assert(void); |
| extern void cal_gnss_reset_release(void); |
| extern void cal_gnss_active_clear(void); |
| extern void cal_gnss_reset_req_clear(void); |
| |
| extern int cal_init(void); |
| extern int cal_if_init(void *); |
| |
| /* It is for debugging. */ |
| #define cal_vclk_dbg_info(a) do{} while(0); |
| //extern void cal_vclk_dbg_info(unsigned int id); |
| #endif |
| #endif |