OMAP2+: voltage: move VC into struct voltagedomain, misc. renames
[pandora-kernel.git] / arch / arm / mach-omap2 / vc44xx_data.c
1 /*
2  * OMAP4 Voltage Controller (VC) data
3  *
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>
8  *
9  * Copyright (C) 2008, 2011 Nokia Corporation
10  * Kalle Jokiniemi
11  * Paul Walmsley
12  *
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.
16  */
17 #include <linux/io.h>
18 #include <linux/err.h>
19 #include <linux/init.h>
20
21 #include <plat/common.h>
22
23 #include "prm44xx.h"
24 #include "prm-regbits-44xx.h"
25 #include "voltage.h"
26
27 #include "vc.h"
28
29 /*
30  * VC data common to 44xx chips
31  * XXX This stuff presumably belongs in the vc3xxx.c or vc.c file.
32  */
33 static const struct omap_vc_common omap4_vc_common = {
34         .prm_mod = OMAP4430_PRM_DEVICE_INST,
35         .smps_sa_reg = OMAP4_PRM_VC_SMPS_SA_OFFSET,
36         .smps_volra_reg = OMAP4_PRM_VC_VAL_SMPS_RA_VOL_OFFSET,
37         .bypass_val_reg = OMAP4_PRM_VC_VAL_BYPASS_OFFSET,
38         .data_shift = OMAP4430_DATA_SHIFT,
39         .slaveaddr_shift = OMAP4430_SLAVEADDR_SHIFT,
40         .regaddr_shift = OMAP4430_REGADDR_SHIFT,
41         .valid = OMAP4430_VALID_MASK,
42         .cmd_on_shift = OMAP4430_ON_SHIFT,
43         .cmd_on_mask = OMAP4430_ON_MASK,
44         .cmd_onlp_shift = OMAP4430_ONLP_SHIFT,
45         .cmd_ret_shift = OMAP4430_RET_SHIFT,
46         .cmd_off_shift = OMAP4430_OFF_SHIFT,
47 };
48
49 /* VC instance data for each controllable voltage line */
50 struct omap_vc_channel omap4_vc_mpu = {
51         .common = &omap4_vc_common,
52         .cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_MPU_L_OFFSET,
53         .smps_sa_shift = OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_SHIFT,
54         .smps_sa_mask = OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_MASK,
55         .smps_volra_shift = OMAP4430_VOLRA_VDD_MPU_L_SHIFT,
56         .smps_volra_mask = OMAP4430_VOLRA_VDD_MPU_L_MASK,
57 };
58
59 struct omap_vc_channel omap4_vc_iva = {
60         .common = &omap4_vc_common,
61         .cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_IVA_L_OFFSET,
62         .smps_sa_shift = OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_SHIFT,
63         .smps_sa_mask = OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_MASK,
64         .smps_volra_shift = OMAP4430_VOLRA_VDD_IVA_L_SHIFT,
65         .smps_volra_mask = OMAP4430_VOLRA_VDD_IVA_L_MASK,
66 };
67
68 struct omap_vc_channel omap4_vc_core = {
69         .common = &omap4_vc_common,
70         .cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_CORE_L_OFFSET,
71         .smps_sa_shift = OMAP4430_SA_VDD_CORE_L_0_6_SHIFT,
72         .smps_sa_mask = OMAP4430_SA_VDD_CORE_L_0_6_MASK,
73         .smps_volra_shift = OMAP4430_VOLRA_VDD_CORE_L_SHIFT,
74         .smps_volra_mask = OMAP4430_VOLRA_VDD_CORE_L_MASK,
75 };
76