EXYNOS: Make EXYNOS common cpufreq driver
PATCH 1/2 EXYNOS: Make EXYNOS common cpufreq driver
From: Jaecheol Lee <[email protected]>
To support various EXYNOS series SoCs commonly, added exynos common structure.exynos-cpufreq.c => EXYNOS series common cpufreq driver exynos4210-cpufreq.c => EXYNOS4210 support cpufreq driver
Signed-off-by Jaecheol Lee <[email protected]>
Signed-off-by Kukjin Kim <[email protected]>
---
Hi Dave,
I think you missed updated this patches which has been re-sent to you before. If you're ok, please send this series to upstream during this merge window for v3.3.
arch/arm/mach-exynos/include/mach/cpufreq.h | 34 +++ drivers/cpufreq/Kconfig.arm | 15 +- drivers/cpufreq/Makefile | 1 + drivers/cpufreq/exynos-cpufreq.c | 296 ++++++++++++++++++++ drivers/cpufreq/exynos4210-cpufreq.c | 385 +++++---------------------- 5 files changed, 414 insertions(+), 317 deletions(-) create mode 100644 arch/arm/mach-exynos/include/mach/cpufreq.h create mode 100644 drivers/cpufreq/exynos-cpufreq.c
arch/arm/mach-exynos/include/mach/cpufreq.h new file +34 -0
@@ -0,0 +1,34 @@ +/* linux/arch/arm/mach-exynos/include/mach/cpufreq.h +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* EXYNOS - CPUFreq 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. +*/ + +enum cpufreq_level_index { +L0 ,L1 ,L2 ,L3 ,L4 , +L5 ,L6 ,L7 ,L8 ,L9 , +L10 ,L11 ,L12 ,L13 ,L14 , +L15 ,L16 ,L17 ,L18 ,L19 , +L20 , +}; + +struct exynos_dvfs_info { +unsigned long mpll_freq_khz; +unsigned int pll_safe_idx; +unsigned int pm_lock_idx; +unsigned int max_support_idx; +unsigned int min_support_idx; +struct clk *cpu_clk; +unsigned int *volt_table; +struct cpufreq_frequency_table *freq_table; +void (*set_freq)(unsigned int ,unsigned int ); +bool (*need_apll_change)(unsigned int ,unsigned int ); +}; + +extern int exynos4210_cpufreq_init (struct exynos_dvfs_info *);
drivers/cpufreq/Kconfig.arm +11 -4
@@ -21,12 +21,19 @@ config ARM_S5PV210_CPUFREQ If in doubt, say N. +config ARM_EXYNOS_CPUFREQ + bool "SAMSUNG EXYNOS SoCs" + depends on ARCH_EXYNOS + select ARM_EXYNOS4210_CPUFREQ if CPU_EXYNOS4210 + default y + help + This adds the CPUFreq driver common part for Samsung + EXYNOS SoCs. + + If in doubt, say N. + config ARM_EXYNOS4210_CPUFREQ bool "Samsung EXYNOS4210" - depends on CPU_EXYNOS4210 - default y help This adds the CPUFreq driver for Samsung EXYNOS4210 SoC (S5PV310 or S5PC210). - - If in doubt, say N.
drivers/cpufreq/Makefile +1 -0
@@ -42,6 +42,7 @@ obj-$(CONFIG_X86_CPUFREQ_NFORCE2) += cpufreq-nforce2.o obj-$(CONFIG_UX500_SOC_DB8500) += db8500-cpufreq.o obj-$(CONFIG_ARM_S3C64XX_CPUFREQ) += s3c64xx-cpufreq.o obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o +obj-$(CONFIG_ARM_EXYNOS_CPUFREQ) += exynos-cpufreq.o obj-$(CONFIG_ARM_EXYNOS4210_CPUFREQ) += exynos4210-cpufreq.o obj-$(CONFIG_ARCH_OMAP2PLUS) += omap-cpufreq.o
drivers/cpufreq/exynos-cpufreq.c new file +296 -0
296 lines not on this page · raw message
drivers/cpufreq/exynos4210-cpufreq.c +72 -313
511 lines not on this page · raw message
Signature · 1 line
1.7.1