2 * OMAP3/OMAP4 Voltage Management Routines
4 * Author: Thara Gopinath <thara@ti.com>
6 * Copyright (C) 2007 Texas Instruments, Inc.
7 * Rajendra Nayak <rnayak@ti.com>
8 * Lesly A M <x0080970@ti.com>
10 * Copyright (C) 2008 Nokia Corporation
13 * Copyright (C) 2010 Texas Instruments, Inc.
14 * Thara Gopinath <thara@ti.com>
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.
20 #include <linux/kernel.h>
21 #include <linux/err.h>
22 #include <linux/init.h>
24 #include <plat/common.h>
26 #include "prm-regbits-44xx.h"
29 #include "prminst44xx.h"
31 #include "omap_opp_data.h"
35 static const struct omap_vfsm_instance omap4_vdd_mpu_vfsm = {
36 .voltsetup_reg = OMAP4_PRM_VOLTSETUP_MPU_RET_SLEEP_OFFSET,
39 static struct omap_vdd_info omap4_vdd_mpu_info;
41 static const struct omap_vfsm_instance omap4_vdd_iva_vfsm = {
42 .voltsetup_reg = OMAP4_PRM_VOLTSETUP_IVA_RET_SLEEP_OFFSET,
45 static struct omap_vdd_info omap4_vdd_iva_info;
47 static const struct omap_vfsm_instance omap4_vdd_core_vfsm = {
48 .voltsetup_reg = OMAP4_PRM_VOLTSETUP_CORE_RET_SLEEP_OFFSET,
51 static struct omap_vdd_info omap4_vdd_core_info;
53 static struct voltagedomain omap4_voltdm_mpu = {
56 .read = omap4_prm_vcvp_read,
57 .write = omap4_prm_vcvp_write,
58 .rmw = omap4_prm_vcvp_rmw,
60 .vfsm = &omap4_vdd_mpu_vfsm,
62 .vdd = &omap4_vdd_mpu_info,
65 static struct voltagedomain omap4_voltdm_iva = {
68 .read = omap4_prm_vcvp_read,
69 .write = omap4_prm_vcvp_write,
70 .rmw = omap4_prm_vcvp_rmw,
72 .vfsm = &omap4_vdd_iva_vfsm,
74 .vdd = &omap4_vdd_iva_info,
77 static struct voltagedomain omap4_voltdm_core = {
80 .read = omap4_prm_vcvp_read,
81 .write = omap4_prm_vcvp_write,
82 .rmw = omap4_prm_vcvp_rmw,
84 .vfsm = &omap4_vdd_core_vfsm,
86 .vdd = &omap4_vdd_core_info,
89 static struct voltagedomain omap4_voltdm_wkup = {
93 static struct voltagedomain *voltagedomains_omap4[] __initdata = {
101 void __init omap44xx_voltagedomains_init(void)
104 * XXX Will depend on the process, validation, and binning
105 * for the currently-running IC
107 omap4_vdd_mpu_info.volt_data = omap44xx_vdd_mpu_volt_data;
108 omap4_vdd_iva_info.volt_data = omap44xx_vdd_iva_volt_data;
109 omap4_vdd_core_info.volt_data = omap44xx_vdd_core_volt_data;
111 voltdm_init(voltagedomains_omap4);