2 * OMAP3 Voltage Processor (VP) 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
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.
19 #include <linux/err.h>
20 #include <linux/init.h>
22 #include <plat/common.h>
26 #include "prm-regbits-44xx.h"
31 /* OMAP4 is hooked such that only a cold reset will reset VP */
32 static void omap4_vp_recover(u8 vp_id
)
34 omap4_pm_cold_reset("Voltage Processor Recovery");
37 static const struct omap_vp_ops omap4_vp_ops
= {
38 .check_txdone
= omap4_prm_vp_check_txdone
,
39 .clear_txdone
= omap4_prm_vp_clear_txdone
,
40 .recover
= omap4_vp_recover
,
44 * VP data common to 44xx chips
45 * XXX This stuff presumably belongs in the vp44xx.c or vp.c file.
47 static const struct omap_vp_common omap4_vp_common
= {
48 .vpconfig_erroroffset_mask
= OMAP4430_ERROROFFSET_MASK
,
49 .vpconfig_errorgain_mask
= OMAP4430_ERRORGAIN_MASK
,
50 .vpconfig_initvoltage_mask
= OMAP4430_INITVOLTAGE_MASK
,
51 .vpconfig_timeouten
= OMAP4430_TIMEOUTEN_MASK
,
52 .vpconfig_initvdd
= OMAP4430_INITVDD_MASK
,
53 .vpconfig_forceupdate
= OMAP4430_FORCEUPDATE_MASK
,
54 .vpconfig_vpenable
= OMAP4430_VPENABLE_MASK
,
55 .vstatus_vpidle
= OMAP4430_VPINIDLE_MASK
,
56 .vstepmin_smpswaittimemin_shift
= OMAP4430_SMPSWAITTIMEMIN_SHIFT
,
57 .vstepmax_smpswaittimemax_shift
= OMAP4430_SMPSWAITTIMEMAX_SHIFT
,
58 .vstepmin_stepmin_shift
= OMAP4430_VSTEPMIN_SHIFT
,
59 .vstepmax_stepmax_shift
= OMAP4430_VSTEPMAX_SHIFT
,
60 .vlimitto_vddmin_shift
= OMAP4430_VDDMIN_SHIFT
,
61 .vlimitto_vddmax_shift
= OMAP4430_VDDMAX_SHIFT
,
62 .vlimitto_timeout_shift
= OMAP4430_TIMEOUT_SHIFT
,
63 .vpvoltage_mask
= OMAP4430_VPVOLTAGE_MASK
,
67 struct omap_vp_instance omap4_vp_mpu
= {
68 .id
= OMAP4_PRM_IRQ_VDD_MPU_ID
,
69 .common
= &omap4_vp_common
,
70 .vpconfig
= OMAP4_PRM_VP_MPU_CONFIG_OFFSET
,
71 .vstepmin
= OMAP4_PRM_VP_MPU_VSTEPMIN_OFFSET
,
72 .vstepmax
= OMAP4_PRM_VP_MPU_VSTEPMAX_OFFSET
,
73 .vlimitto
= OMAP4_PRM_VP_MPU_VLIMITTO_OFFSET
,
74 .vstatus
= OMAP4_PRM_VP_MPU_STATUS_OFFSET
,
75 .voltage
= OMAP4_PRM_VP_MPU_VOLTAGE_OFFSET
,
78 struct omap_vp_instance omap4_vp_iva
= {
79 .id
= OMAP4_PRM_IRQ_VDD_IVA_ID
,
80 .common
= &omap4_vp_common
,
81 .vpconfig
= OMAP4_PRM_VP_IVA_CONFIG_OFFSET
,
82 .vstepmin
= OMAP4_PRM_VP_IVA_VSTEPMIN_OFFSET
,
83 .vstepmax
= OMAP4_PRM_VP_IVA_VSTEPMAX_OFFSET
,
84 .vlimitto
= OMAP4_PRM_VP_IVA_VLIMITTO_OFFSET
,
85 .vstatus
= OMAP4_PRM_VP_IVA_STATUS_OFFSET
,
86 .voltage
= OMAP4_PRM_VP_IVA_VOLTAGE_OFFSET
,
89 struct omap_vp_instance omap4_vp_core
= {
90 .id
= OMAP4_PRM_IRQ_VDD_CORE_ID
,
91 .common
= &omap4_vp_common
,
92 .vpconfig
= OMAP4_PRM_VP_CORE_CONFIG_OFFSET
,
93 .vstepmin
= OMAP4_PRM_VP_CORE_VSTEPMIN_OFFSET
,
94 .vstepmax
= OMAP4_PRM_VP_CORE_VSTEPMAX_OFFSET
,
95 .vlimitto
= OMAP4_PRM_VP_CORE_VLIMITTO_OFFSET
,
96 .vstatus
= OMAP4_PRM_VP_CORE_STATUS_OFFSET
,
97 .voltage
= OMAP4_PRM_VP_CORE_VOLTAGE_OFFSET
,