diff options
author | Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com> | 2011-06-17 18:46:54 +0530 |
---|---|---|
committer | said m bagheri <ebgheri@steludxu2848.(none)> | 2011-06-29 10:30:35 +0200 |
commit | c2a6e471cfcad3fab3ff5c089acbcbda3c3cb38a (patch) | |
tree | 3d19280000e2055a91e014e1f6a3b6b0762ded6b /arch/arm/mach-ux500/pm/cpufreq-db5500.c | |
parent | 664f9a4c0e43006020295cfd9206f1e561578e82 (diff) |
u5500: add mailbox1 and related function support
Add cpufreq-db5500.c file for db5500 CPUfreq support.
PRCMU mailbox1 and related functions' support is added.
List of functions implemented:
- prcmu_get/set_arm_opp
- read_mailbox_1
ST-Ericsson Linux next: -
ST-Ericsson ID: WP334774
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I6dabc714dac70d4302450a2216644dc63ae88084
Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24956
Reviewed-by: QATEST
Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Reviewed-by: Per-Inge TALLBERG <per-inge.tallberg@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Fix for PRCMU
Diffstat (limited to 'arch/arm/mach-ux500/pm/cpufreq-db5500.c')
-rw-r--r-- | arch/arm/mach-ux500/pm/cpufreq-db5500.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/pm/cpufreq-db5500.c b/arch/arm/mach-ux500/pm/cpufreq-db5500.c new file mode 100644 index 00000000000..c68caa064e1 --- /dev/null +++ b/arch/arm/mach-ux500/pm/cpufreq-db5500.c @@ -0,0 +1,51 @@ +/* + * Copyright (C) ST-Ericsson SA 2011 + * + * License Terms: GNU General Public License v2 + */ + +#include <linux/kernel.h> +#include <linux/cpufreq.h> + +#include <mach/prcmu.h> + +#include "cpufreq.h" + +static struct cpufreq_frequency_table freq_table[] = { + [0] = { + .index = 0, + .frequency = 200000, + }, + [1] = { + .index = 1, + .frequency = 300000, + }, + [2] = { + .index = 2, + .frequency = 600000, + }, + [3] = { + .index = 3, + .frequency = CPUFREQ_TABLE_END, + }, +}; + +static enum arm_opp idx2opp[] = { + ARM_EXTCLK, + ARM_50_OPP, + ARM_100_OPP, +}; + +static int __init u5500_cpufreq_register(void) +{ + int i = 0; + + BUILD_BUG_ON(ARRAY_SIZE(idx2opp) + 1 != ARRAY_SIZE(freq_table)); + + pr_info("u5500-cpufreq : Available frequencies:\n"); + while (freq_table[i].frequency != CPUFREQ_TABLE_END) + pr_info(" %d Mhz\n", freq_table[i++].frequency/1000); + + return ux500_cpufreq_register(freq_table, idx2opp); +} +device_initcall(u5500_cpufreq_register); |