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_data omap4_vdd_mpu_vfsm_data
= {
36 .voltsetup_reg
= OMAP4_PRM_VOLTSETUP_MPU_RET_SLEEP_OFFSET
,
39 static struct omap_vdd_info omap4_vdd_mpu_info
= {
40 .vp_data
= &omap4_vp_mpu_data
,
41 .vc_data
= &omap4_vc_mpu_data
,
42 .vfsm
= &omap4_vdd_mpu_vfsm_data
,
48 static const struct omap_vfsm_instance_data omap4_vdd_iva_vfsm_data
= {
49 .voltsetup_reg
= OMAP4_PRM_VOLTSETUP_IVA_RET_SLEEP_OFFSET
,
52 static struct omap_vdd_info omap4_vdd_iva_info
= {
53 .vp_data
= &omap4_vp_iva_data
,
54 .vc_data
= &omap4_vc_iva_data
,
55 .vfsm
= &omap4_vdd_iva_vfsm_data
,
61 static const struct omap_vfsm_instance_data omap4_vdd_core_vfsm_data
= {
62 .voltsetup_reg
= OMAP4_PRM_VOLTSETUP_CORE_RET_SLEEP_OFFSET
,
65 static struct omap_vdd_info omap4_vdd_core_info
= {
66 .vp_data
= &omap4_vp_core_data
,
67 .vc_data
= &omap4_vc_core_data
,
68 .vfsm
= &omap4_vdd_core_vfsm_data
,
74 /* OMAP4 VDD structures */
75 static struct omap_vdd_info
*omap4_vdd_info
[] = {
81 /* OMAP4 specific voltage init functions */
82 static int __init
omap44xx_voltage_early_init(void)
84 s16 prm_mod
= OMAP4430_PRM_DEVICE_INST
;
85 s16 prm_irqst_ocp_mod
= OMAP4430_PRM_OCP_SOCKET_INST
;
87 if (!cpu_is_omap44xx())
91 * XXX Will depend on the process, validation, and binning
92 * for the currently-running IC
94 omap4_vdd_mpu_info
.volt_data
= omap44xx_vdd_mpu_volt_data
;
95 omap4_vdd_iva_info
.volt_data
= omap44xx_vdd_iva_volt_data
;
96 omap4_vdd_core_info
.volt_data
= omap44xx_vdd_core_volt_data
;
98 return omap_voltage_early_init(prm_mod
, prm_irqst_ocp_mod
,
100 ARRAY_SIZE(omap4_vdd_info
));
102 core_initcall(omap44xx_voltage_early_init
);