aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210/include/mach
diff options
context:
space:
mode:
authorMinsu, Kim <minsu78.kim@samsung.com>2011-01-19 17:13:23 +0900
committerArve Hjønnevåg <arve@android.com>2011-11-17 17:52:54 -0800
commite5615b56fb489c004ddaa097484d169a16a54d1a (patch)
treed45fee6e06a2dc97bc7f9139a7dc42e4a42f35f3 /arch/arm/mach-s5pv210/include/mach
parent663cb5be2808d19636da500773a5d230e25918a2 (diff)
downloadkernel_samsung_crespo-e5615b56fb489c004ddaa097484d169a16a54d1a.zip
kernel_samsung_crespo-e5615b56fb489c004ddaa097484d169a16a54d1a.tar.gz
kernel_samsung_crespo-e5615b56fb489c004ddaa097484d169a16a54d1a.tar.bz2
S5PC11X : CPUFREQ : add platform data interface to dvfs
In case of board voltage drop, voltage table should be changed. voltage table can be updated by platform data Change-Id: I4147d1599fd4f91e398dad713a145ad44db77620 Signed-off-by: Minsu Kim <minsu78.kim@samsung.com> Also removes unused code from arch/arm/mach-s5pv210/include/mach/cpu-freq-v210.h
Diffstat (limited to 'arch/arm/mach-s5pv210/include/mach')
-rw-r--r--arch/arm/mach-s5pv210/include/mach/cpu-freq-v210.h114
1 files changed, 16 insertions, 98 deletions
diff --git a/arch/arm/mach-s5pv210/include/mach/cpu-freq-v210.h b/arch/arm/mach-s5pv210/include/mach/cpu-freq-v210.h
index fb44000..8274a01 100644
--- a/arch/arm/mach-s5pv210/include/mach/cpu-freq-v210.h
+++ b/arch/arm/mach-s5pv210/include/mach/cpu-freq-v210.h
@@ -2,112 +2,30 @@
*
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
*
+ * S5PV210/S5PC110 CPU frequency scaling support
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
- */
-
-#include <linux/cpufreq.h>
-
-//extern void s5pc110_lock_power_domain(unsigned int nToken);
-
-#define MAXIMUM_FREQ 1000000
-#define USE_FREQ_TABLE
-//#undef USE_DVS
-#define USE_DVS
-#define VERY_HI_RATE 800*1000*1000
-#define APLL_GEN_CLK 800*1000
-#define KHZ_T 1000
-
-#define MPU_CLK "armclk"
-
-#define INDX_ERROR 65535
-
-enum perf_level {
- L0,
- L1,
- L2,
- L3,
- L4,
- L5,
- L6,
- L7,
-};
-
-enum freq_level_states {
- LEV_1200MHZ,
- LEV_1000MHZ,
- LEV_800MHZ,
- LEV_400MHZ,
- LEV_200MHZ,
- LEV_100MHZ,
-};
+*/
-extern unsigned int s5pc11x_cpufreq_index;
-extern unsigned int S5PC11X_FREQ_TAB;
-extern unsigned int S5PC11X_MAXFREQLEVEL;
+#ifndef __ASM_ARCH_CPU_FREQ_H
+#define __ASM_ARCH_CPU_FREQ_H
-extern unsigned int s5pc11x_target_frq(unsigned int pred_freq, int flag);
-extern int s5pc110_pm_target(unsigned int target_freq);
-extern int is_conservative_gov(void);
-extern int is_userspace_gov(void);
-extern void set_dvfs_target_level(enum freq_level_states freq_level);
-extern int set_voltage(enum perf_level p_lv);
-extern int set_voltage_dvs(enum perf_level p_lv);
-
-extern int s5pc110_dvfs_lock_high_hclk(unsigned int dToken);
-extern int s5pc110_dvfs_unlock_high_hclk(unsigned int dToken);
-
-#define NUMBER_OF_LOCKTOKEN 9
-
-#define DVFS_LOCK_TOKEN_1 0
-#define DVFS_LOCK_TOKEN_2 1
-#define DVFS_LOCK_TOKEN_3 2
-#define DVFS_LOCK_TOKEN_4 3
-#define DVFS_LOCK_TOKEN_5 4
-#define DVFS_LOCK_TOKEN_6 5
-#define DVFS_LOCK_TOKEN_7 6
-#define DVFS_LOCK_TOKEN_8 7
-#define DVFS_LOCK_TOKEN_9 8
-
-void s5pc110_lock_dvfs_high_level(unsigned int nToken, enum freq_level_states freq_level);
-void s5pc110_unlock_dvfs_high_level(unsigned int nToken);
-
-#define CLK_OUT_PROBING //TP80 on SMDKC100 board
-
-
-#define CLK_DIV0_MASK ((0x7<<0)|(0x7<<8)|(0x7<<12)) // APLL,HCLK_MSYS,PCLK_MSYS mask value
-
-
-/*
- * APLL M,P,S value for target frequency
- **/
-#define APLL_VAL_1664 (1<<31)|(417<<16)|(3<<8)|(0)
-#define APLL_VAL_1332 (1<<31)|(444<<16)|(4<<8)|(0)
-#define APLL_VAL_1000 (1<<31)|(125<<16)|(3<<8)|(1)
-#define APLL_VAL_800 (1<<31)|(100<<16)|(3<<8)|(1)
+#include <linux/cpufreq.h>
-struct s5pv210_domain_freq {
- unsigned long apll_out;
- unsigned long armclk;
- unsigned long hclk_msys;
- unsigned long pclk_msys;
- unsigned long hclk_dsys;
- unsigned long pclk_dsys;
- unsigned long hclk_psys;
- unsigned long pclk_psys;
+/* For cpu-freq driver */
+struct s5pv210_cpufreq_voltage {
+ unsigned int freq; /* kHz */
+ unsigned long varm; /* uV */
+ unsigned long vint; /* uV */
};
-struct s5pv210_cpufreq_freqs {
- struct cpufreq_freqs freqs;
- struct s5pv210_domain_freq old;
- struct s5pv210_domain_freq new;
+struct s5pv210_cpufreq_data {
+ struct s5pv210_cpufreq_voltage *volt;
+ unsigned int size;
};
-struct s5pv210_dvs_conf {
- const unsigned long lvl; /* DVFS level : L0,L1,L2,L3.*/
- unsigned long arm_volt; /* uV */
- unsigned long int_volt; /* uV */
-};
+extern void s5pv210_cpufreq_set_platdata(struct s5pv210_cpufreq_data *pdata);
-extern void s5pv210_set_cpufreq_level(unsigned int flag);
+#endif /* __ASM_ARCH_CPU_FREQ_H */