xref: /linux/arch/arm/mach-omap2/vc3xxx_data.c (revision d84adcf46b9c235d1f4975b72a8c2763dbfb0081)
1c0718df4SPaul Walmsley /*
2c0718df4SPaul Walmsley  * OMAP3 Voltage Controller (VC) data
3c0718df4SPaul Walmsley  *
4c0718df4SPaul Walmsley  * Copyright (C) 2007, 2010 Texas Instruments, Inc.
5c0718df4SPaul Walmsley  * Rajendra Nayak <rnayak@ti.com>
6c0718df4SPaul Walmsley  * Lesly A M <x0080970@ti.com>
7c0718df4SPaul Walmsley  * Thara Gopinath <thara@ti.com>
8c0718df4SPaul Walmsley  *
9c0718df4SPaul Walmsley  * Copyright (C) 2008, 2011 Nokia Corporation
10c0718df4SPaul Walmsley  * Kalle Jokiniemi
11c0718df4SPaul Walmsley  * Paul Walmsley
12c0718df4SPaul Walmsley  *
13c0718df4SPaul Walmsley  * This program is free software; you can redistribute it and/or modify
14c0718df4SPaul Walmsley  * it under the terms of the GNU General Public License version 2 as
15c0718df4SPaul Walmsley  * published by the Free Software Foundation.
16c0718df4SPaul Walmsley  */
17c0718df4SPaul Walmsley #include <linux/io.h>
18c0718df4SPaul Walmsley #include <linux/err.h>
19c0718df4SPaul Walmsley #include <linux/init.h>
20c0718df4SPaul Walmsley 
21c0718df4SPaul Walmsley #include <plat/common.h>
22c0718df4SPaul Walmsley 
23c0718df4SPaul Walmsley #include "prm-regbits-34xx.h"
24c0718df4SPaul Walmsley #include "voltage.h"
25c0718df4SPaul Walmsley 
26c0718df4SPaul Walmsley #include "vc.h"
27c0718df4SPaul Walmsley 
28c0718df4SPaul Walmsley /*
29c0718df4SPaul Walmsley  * VC data common to 34xx/36xx chips
30c0718df4SPaul Walmsley  * XXX This stuff presumably belongs in the vc3xxx.c or vc.c file.
31c0718df4SPaul Walmsley  */
32*d84adcf4SKevin Hilman static struct omap_vc_common omap3_vc_common = {
33a7460dafSKevin Hilman 	.prm_mod         = OMAP3430_GR_MOD,
34c0718df4SPaul Walmsley 	.smps_sa_reg	 = OMAP3_PRM_VC_SMPS_SA_OFFSET,
35c0718df4SPaul Walmsley 	.smps_volra_reg	 = OMAP3_PRM_VC_SMPS_VOL_RA_OFFSET,
36c0718df4SPaul Walmsley 	.bypass_val_reg	 = OMAP3_PRM_VC_BYPASS_VAL_OFFSET,
37c0718df4SPaul Walmsley 	.data_shift	 = OMAP3430_DATA_SHIFT,
38c0718df4SPaul Walmsley 	.slaveaddr_shift = OMAP3430_SLAVEADDR_SHIFT,
39c0718df4SPaul Walmsley 	.regaddr_shift	 = OMAP3430_REGADDR_SHIFT,
40c0718df4SPaul Walmsley 	.valid		 = OMAP3430_VALID_MASK,
41c0718df4SPaul Walmsley 	.cmd_on_shift	 = OMAP3430_VC_CMD_ON_SHIFT,
42c0718df4SPaul Walmsley 	.cmd_on_mask	 = OMAP3430_VC_CMD_ON_MASK,
43c0718df4SPaul Walmsley 	.cmd_onlp_shift	 = OMAP3430_VC_CMD_ONLP_SHIFT,
44c0718df4SPaul Walmsley 	.cmd_ret_shift	 = OMAP3430_VC_CMD_RET_SHIFT,
45c0718df4SPaul Walmsley 	.cmd_off_shift	 = OMAP3430_VC_CMD_OFF_SHIFT,
46c0718df4SPaul Walmsley };
47c0718df4SPaul Walmsley 
48*d84adcf4SKevin Hilman struct omap_vc_channel omap3_vc_mpu = {
49*d84adcf4SKevin Hilman 	.common = &omap3_vc_common,
50c0718df4SPaul Walmsley 	.cmdval_reg = OMAP3_PRM_VC_CMD_VAL_0_OFFSET,
51c0718df4SPaul Walmsley 	.smps_sa_shift = OMAP3430_PRM_VC_SMPS_SA_SA0_SHIFT,
52c0718df4SPaul Walmsley 	.smps_sa_mask = OMAP3430_PRM_VC_SMPS_SA_SA0_MASK,
53c0718df4SPaul Walmsley 	.smps_volra_shift = OMAP3430_VOLRA0_SHIFT,
54c0718df4SPaul Walmsley 	.smps_volra_mask = OMAP3430_VOLRA0_MASK,
55c0718df4SPaul Walmsley };
56c0718df4SPaul Walmsley 
57*d84adcf4SKevin Hilman struct omap_vc_channel omap3_vc_core = {
58*d84adcf4SKevin Hilman 	.common = &omap3_vc_common,
59c0718df4SPaul Walmsley 	.cmdval_reg = OMAP3_PRM_VC_CMD_VAL_1_OFFSET,
60c0718df4SPaul Walmsley 	.smps_sa_shift = OMAP3430_PRM_VC_SMPS_SA_SA1_SHIFT,
61c0718df4SPaul Walmsley 	.smps_sa_mask = OMAP3430_PRM_VC_SMPS_SA_SA1_MASK,
62c0718df4SPaul Walmsley 	.smps_volra_shift = OMAP3430_VOLRA1_SHIFT,
63c0718df4SPaul Walmsley 	.smps_volra_mask = OMAP3430_VOLRA1_MASK,
64c0718df4SPaul Walmsley };
65