ARM: cpu topology: Add debugfs interface for cpu_power
[cmplus.git] / arch / arm / mach-omap2 / voltagedomains3xxx_data.c
blob65a00ff824461686ce36ddd312e469ba18516af2
1 /*
2 * OMAP3 voltage domain data
4 * Copyright (C) 2007, 2010 Texas Instruments, Inc.
5 * Rajendra Nayak <rnayak@ti.com>
6 * Lesly A M <x0080970@ti.com>
7 * Thara Gopinath <thara@ti.com>
9 * Copyright (C) 2008, 2011 Nokia Corporation
10 * Kalle Jokiniemi
11 * Paul Walmsley
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
17 #include <linux/kernel.h>
18 #include <linux/err.h>
19 #include <linux/init.h>
21 #include <plat/common.h>
22 #include <plat/cpu.h>
24 #include "prm-regbits-34xx.h"
25 #include "omap_opp_data.h"
26 #include "voltage.h"
27 #include "vc.h"
28 #include "vp.h"
29 #include "ldo.h"
32 * VDD data
35 static const struct omap_vfsm_instance omap3_vdd1_vfsm = {
36 .voltsetup_reg = OMAP3_PRM_VOLTSETUP1_OFFSET,
37 .voltsetup_shift = OMAP3430_SETUP_TIME1_SHIFT,
38 .voltsetup_mask = OMAP3430_SETUP_TIME1_MASK,
41 static struct omap_vdd_info omap3_vdd1_info;
43 static const struct omap_vfsm_instance omap3_vdd2_vfsm = {
44 .voltsetup_reg = OMAP3_PRM_VOLTSETUP1_OFFSET,
45 .voltsetup_shift = OMAP3430_SETUP_TIME2_SHIFT,
46 .voltsetup_mask = OMAP3430_SETUP_TIME2_MASK,
49 static struct omap_vdd_info omap3_vdd2_info;
51 static struct voltagedomain omap3_voltdm_mpu = {
52 .name = "mpu_iva",
53 .scalable = true,
54 .read = omap3_prm_vcvp_read,
55 .write = omap3_prm_vcvp_write,
56 .rmw = omap3_prm_vcvp_rmw,
57 .vc = &omap3_vc_mpu,
58 .vfsm = &omap3_vdd1_vfsm,
59 .vp = &omap3_vp_mpu,
60 .vdd = &omap3_vdd1_info,
63 static struct voltagedomain omap3_voltdm_core = {
64 .name = "core",
65 .scalable = true,
66 .read = omap3_prm_vcvp_read,
67 .write = omap3_prm_vcvp_write,
68 .rmw = omap3_prm_vcvp_rmw,
69 .vc = &omap3_vc_core,
70 .vfsm = &omap3_vdd2_vfsm,
71 .vp = &omap3_vp_core,
72 .vdd = &omap3_vdd2_info,
75 static struct voltagedomain omap3_voltdm_wkup = {
76 .name = "wakeup",
79 static struct voltagedomain *voltagedomains_omap3[] __initdata = {
80 &omap3_voltdm_mpu,
81 &omap3_voltdm_core,
82 &omap3_voltdm_wkup,
83 NULL,
86 static const char *sys_clk_name __initdata = "sys_ck";
88 void __init omap3xxx_voltagedomains_init(void)
90 struct voltagedomain *voltdm;
91 int i;
94 * XXX Will depend on the process, validation, and binning
95 * for the currently-running IC
97 if (cpu_is_omap3630()) {
98 omap3_vdd1_info.volt_data = omap36xx_vddmpu_volt_data;
99 omap3_vdd2_info.volt_data = omap36xx_vddcore_volt_data;
100 omap3_vdd1_info.dep_vdd_info = omap36xx_vddmpu_dep_info;
101 omap3_voltdm_mpu.abb = &omap3630_ldo_abb_mpu_instance;
103 } else {
104 omap3_vdd1_info.volt_data = omap34xx_vddmpu_volt_data;
105 omap3_vdd2_info.volt_data = omap34xx_vddcore_volt_data;
106 omap3_vdd1_info.dep_vdd_info = omap34xx_vddmpu_dep_info;
109 for (i = 0; voltdm = voltagedomains_omap3[i], voltdm; i++)
110 voltdm->sys_clk.name = sys_clk_name;
112 voltdm_init(voltagedomains_omap3);