2 * OMAP4 Voltage Controller (VC) 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.
18 #include <linux/err.h>
19 #include <linux/init.h>
21 #include <plat/common.h>
24 #include "prm-regbits-44xx.h"
30 * VC data common to 44xx chips
31 * XXX This stuff presumably belongs in the vc3xxx.c or vc.c file.
33 static const struct omap_vc_common omap4_vc_common = {
34 .smps_sa_reg = OMAP4_PRM_VC_SMPS_SA_OFFSET,
35 .smps_volra_reg = OMAP4_PRM_VC_VAL_SMPS_RA_VOL_OFFSET,
36 .smps_cmdra_reg = OMAP4_PRM_VC_VAL_SMPS_RA_CMD_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 .cfg_channel_reg = OMAP4_PRM_VC_CFG_CHANNEL_OFFSET,
50 /* VC instance data for each controllable voltage line */
51 struct omap_vc_channel omap4_vc_mpu = {
52 .flags = OMAP_VC_CHANNEL_DEFAULT,
53 .common = &omap4_vc_common,
54 .cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_MPU_L_OFFSET,
55 .smps_sa_mask = OMAP4430_SA_VDD_MPU_L_PRM_VC_SMPS_SA_MASK,
56 .smps_volra_mask = OMAP4430_VOLRA_VDD_MPU_L_MASK,
57 .smps_cmdra_mask = OMAP4430_CMDRA_VDD_MPU_L_MASK,
58 .cfg_channel_sa_shift = OMAP4430_SA_VDD_MPU_L_SHIFT,
61 struct omap_vc_channel omap4_vc_iva = {
62 .common = &omap4_vc_common,
63 .cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_IVA_L_OFFSET,
64 .smps_sa_mask = OMAP4430_SA_VDD_IVA_L_PRM_VC_SMPS_SA_MASK,
65 .smps_volra_mask = OMAP4430_VOLRA_VDD_IVA_L_MASK,
66 .smps_cmdra_mask = OMAP4430_CMDRA_VDD_IVA_L_MASK,
67 .cfg_channel_sa_shift = OMAP4430_SA_VDD_IVA_L_SHIFT,
70 struct omap_vc_channel omap4_vc_core = {
71 .common = &omap4_vc_common,
72 .cmdval_reg = OMAP4_PRM_VC_VAL_CMD_VDD_CORE_L_OFFSET,
73 .smps_sa_mask = OMAP4430_SA_VDD_CORE_L_0_6_MASK,
74 .smps_volra_mask = OMAP4430_VOLRA_VDD_CORE_L_MASK,
75 .smps_cmdra_mask = OMAP4430_CMDRA_VDD_CORE_L_MASK,
76 .cfg_channel_sa_shift = OMAP4430_SA_VDD_CORE_L_SHIFT,