ARM: OMAP: Remove unused old gpio-switch.h
[deliverable/linux.git] / arch / arm / mach-omap2 / voltagedomains44xx_data.c
1 /*
2 * OMAP3/OMAP4 Voltage Management Routines
3 *
4 * Author: Thara Gopinath <thara@ti.com>
5 *
6 * Copyright (C) 2007 Texas Instruments, Inc.
7 * Rajendra Nayak <rnayak@ti.com>
8 * Lesly A M <x0080970@ti.com>
9 *
10 * Copyright (C) 2008 Nokia Corporation
11 * Kalle Jokiniemi
12 *
13 * Copyright (C) 2010 Texas Instruments, Inc.
14 * Thara Gopinath <thara@ti.com>
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20 #include <linux/kernel.h>
21 #include <linux/err.h>
22 #include <linux/init.h>
23
24 #include "common.h"
25
26 #include "prm-regbits-44xx.h"
27 #include "prm44xx.h"
28 #include "prcm44xx.h"
29 #include "prminst44xx.h"
30 #include "voltage.h"
31 #include "omap_opp_data.h"
32 #include "vc.h"
33 #include "vp.h"
34
35 static const struct omap_vfsm_instance omap4_vdd_mpu_vfsm = {
36 .voltsetup_reg = OMAP4_PRM_VOLTSETUP_MPU_RET_SLEEP_OFFSET,
37 };
38
39 static const struct omap_vfsm_instance omap4_vdd_iva_vfsm = {
40 .voltsetup_reg = OMAP4_PRM_VOLTSETUP_IVA_RET_SLEEP_OFFSET,
41 };
42
43 static const struct omap_vfsm_instance omap4_vdd_core_vfsm = {
44 .voltsetup_reg = OMAP4_PRM_VOLTSETUP_CORE_RET_SLEEP_OFFSET,
45 };
46
47 static struct voltagedomain omap4_voltdm_mpu = {
48 .name = "mpu",
49 .scalable = true,
50 .read = omap4_prm_vcvp_read,
51 .write = omap4_prm_vcvp_write,
52 .rmw = omap4_prm_vcvp_rmw,
53 .vc = &omap4_vc_mpu,
54 .vfsm = &omap4_vdd_mpu_vfsm,
55 .vp = &omap4_vp_mpu,
56 };
57
58 static struct voltagedomain omap4_voltdm_iva = {
59 .name = "iva",
60 .scalable = true,
61 .read = omap4_prm_vcvp_read,
62 .write = omap4_prm_vcvp_write,
63 .rmw = omap4_prm_vcvp_rmw,
64 .vc = &omap4_vc_iva,
65 .vfsm = &omap4_vdd_iva_vfsm,
66 .vp = &omap4_vp_iva,
67 };
68
69 static struct voltagedomain omap4_voltdm_core = {
70 .name = "core",
71 .scalable = true,
72 .read = omap4_prm_vcvp_read,
73 .write = omap4_prm_vcvp_write,
74 .rmw = omap4_prm_vcvp_rmw,
75 .vc = &omap4_vc_core,
76 .vfsm = &omap4_vdd_core_vfsm,
77 .vp = &omap4_vp_core,
78 };
79
80 static struct voltagedomain omap4_voltdm_wkup = {
81 .name = "wakeup",
82 };
83
84 static struct voltagedomain *voltagedomains_omap4[] __initdata = {
85 &omap4_voltdm_mpu,
86 &omap4_voltdm_iva,
87 &omap4_voltdm_core,
88 &omap4_voltdm_wkup,
89 NULL,
90 };
91
92 static const char *sys_clk_name __initdata = "sys_clkin_ck";
93
94 void __init omap44xx_voltagedomains_init(void)
95 {
96 struct voltagedomain *voltdm;
97 int i;
98
99 /*
100 * XXX Will depend on the process, validation, and binning
101 * for the currently-running IC
102 */
103 #ifdef CONFIG_PM_OPP
104 omap4_voltdm_mpu.volt_data = omap44xx_vdd_mpu_volt_data;
105 omap4_voltdm_iva.volt_data = omap44xx_vdd_iva_volt_data;
106 omap4_voltdm_core.volt_data = omap44xx_vdd_core_volt_data;
107 #endif
108
109 for (i = 0; voltdm = voltagedomains_omap4[i], voltdm; i++)
110 voltdm->sys_clk.name = sys_clk_name;
111
112 voltdm_init(voltagedomains_omap4);
113 };
This page took 0.039657 seconds and 5 git commands to generate.