ARM: OMAP: Remove unused old gpio-switch.h
[deliverable/linux.git] / arch / arm / mach-omap2 / voltagedomains44xx_data.c
CommitLineData
c0718df4
PW
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
4e65331c 24#include "common.h"
c0718df4
PW
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
5892bb1f 35static const struct omap_vfsm_instance omap4_vdd_mpu_vfsm = {
c0718df4
PW
36 .voltsetup_reg = OMAP4_PRM_VOLTSETUP_MPU_RET_SLEEP_OFFSET,
37};
38
5892bb1f 39static const struct omap_vfsm_instance omap4_vdd_iva_vfsm = {
c0718df4
PW
40 .voltsetup_reg = OMAP4_PRM_VOLTSETUP_IVA_RET_SLEEP_OFFSET,
41};
42
5892bb1f 43static const struct omap_vfsm_instance omap4_vdd_core_vfsm = {
c0718df4
PW
44 .voltsetup_reg = OMAP4_PRM_VOLTSETUP_CORE_RET_SLEEP_OFFSET,
45};
46
81a60482
KH
47static struct voltagedomain omap4_voltdm_mpu = {
48 .name = "mpu",
37efca7e 49 .scalable = true,
4bcc475e
KH
50 .read = omap4_prm_vcvp_read,
51 .write = omap4_prm_vcvp_write,
52 .rmw = omap4_prm_vcvp_rmw,
d84adcf4 53 .vc = &omap4_vc_mpu,
5892bb1f 54 .vfsm = &omap4_vdd_mpu_vfsm,
b7ea803e 55 .vp = &omap4_vp_mpu,
c0718df4
PW
56};
57
81a60482
KH
58static struct voltagedomain omap4_voltdm_iva = {
59 .name = "iva",
37efca7e 60 .scalable = true,
4bcc475e
KH
61 .read = omap4_prm_vcvp_read,
62 .write = omap4_prm_vcvp_write,
63 .rmw = omap4_prm_vcvp_rmw,
d84adcf4 64 .vc = &omap4_vc_iva,
5892bb1f 65 .vfsm = &omap4_vdd_iva_vfsm,
b7ea803e 66 .vp = &omap4_vp_iva,
81a60482
KH
67};
68
69static struct voltagedomain omap4_voltdm_core = {
70 .name = "core",
37efca7e 71 .scalable = true,
4bcc475e
KH
72 .read = omap4_prm_vcvp_read,
73 .write = omap4_prm_vcvp_write,
74 .rmw = omap4_prm_vcvp_rmw,
d84adcf4 75 .vc = &omap4_vc_core,
5892bb1f 76 .vfsm = &omap4_vdd_core_vfsm,
b7ea803e 77 .vp = &omap4_vp_core,
81a60482 78};
c0718df4 79
7e1b9405
BC
80static struct voltagedomain omap4_voltdm_wkup = {
81 .name = "wakeup",
82};
83
81a60482
KH
84static struct voltagedomain *voltagedomains_omap4[] __initdata = {
85 &omap4_voltdm_mpu,
86 &omap4_voltdm_iva,
87 &omap4_voltdm_core,
7e1b9405 88 &omap4_voltdm_wkup,
81a60482
KH
89 NULL,
90};
91
0e2f3d9c
KH
92static const char *sys_clk_name __initdata = "sys_clkin_ck";
93
81a60482
KH
94void __init omap44xx_voltagedomains_init(void)
95{
0e2f3d9c
KH
96 struct voltagedomain *voltdm;
97 int i;
98
c0718df4
PW
99 /*
100 * XXX Will depend on the process, validation, and binning
101 * for the currently-running IC
102 */
3ddd4d0c 103#ifdef CONFIG_PM_OPP
e3277880
KH
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;
3ddd4d0c 107#endif
c0718df4 108
0e2f3d9c
KH
109 for (i = 0; voltdm = voltagedomains_omap4[i], voltdm; i++)
110 voltdm->sys_clk.name = sys_clk_name;
111
81a60482 112 voltdm_init(voltagedomains_omap4);
c0718df4 113};
This page took 0.099086 seconds and 5 git commands to generate.