aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAvinash Mahadeva <avinashhm@ti.com>2011-06-22 12:37:59 -0500
committerNishanth Menon <nm@ti.com>2011-06-29 03:52:40 -0700
commit791aad56edecbbd2a2c43a8c43d5b4fd66eccd89 (patch)
tree89a411c3a251752fc8fea0a20e8594fc6d32d16c /arch/arm
parentaaf27f232634dfbb8ddbcbccb4df6c25bb1e684d (diff)
downloadkernel_samsung_tuna-791aad56edecbbd2a2c43a8c43d5b4fd66eccd89.zip
kernel_samsung_tuna-791aad56edecbbd2a2c43a8c43d5b4fd66eccd89.tar.gz
kernel_samsung_tuna-791aad56edecbbd2a2c43a8c43d5b4fd66eccd89.tar.bz2
OMAP4: PM: TPS: unlink VCORE3 and VMEM from APE for TWL6030
In 4460, the VMEM and VCORE3 resources are not populated. So these resources should not be associated with any power resource groups. If associated, when the resource transition to OFF state, the VMEM and VCORE3 get detected as shorted and in the next wakeup, the TWL detects a exception (short cirucit in previous cycle) and then powers down itself. Since these are critical settings, we try to get subsequent settings setup even if setting previous one failed. Acked-by: Ambresh K <ambresh@ti.com> [nm@ti.com: ported back to 3.0] Signed-off-by: Nishanth Menon <nm@ti.com> [rajeevk@ti.com: co-development] Signed-off-by: Rajeev Kulkarni <rajeevk@ti.com> Signed-off-by: Avinash Mahadeva <avinashhm@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/omap_tps6236x.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_tps6236x.c b/arch/arm/mach-omap2/omap_tps6236x.c
index 24aa6cd..45ca1de5 100644
--- a/arch/arm/mach-omap2/omap_tps6236x.c
+++ b/arch/arm/mach-omap2/omap_tps6236x.c
@@ -67,6 +67,8 @@
/* TWL usage */
#define TWL6030_REG_SYSEN_CFG_GRP 0xB3
+#define TWL6030_REG_VCORE3_CFG_GRP 0x5E
+#define TWL6030_REG_VMEM_CFG_GRP 0x64
#define TWL6030_BIT_APE_GRP BIT(0)
/* Voltage params of the attached device (all in uV) */
@@ -228,6 +230,7 @@ out:
static int __init omap4_twl_tps62361_enable(struct voltagedomain *voltdm)
{
int ret = 0;
+ int ret1;
u8 val;
/* Dont trust the bootloader. start with max, pm will set to proper */
@@ -270,8 +273,28 @@ static int __init omap4_twl_tps62361_enable(struct voltagedomain *voltdm)
/* if we have to work with TWL */
#ifdef CONFIG_TWL4030_CORE
/* Map up SYSEN on TWL core to control TPS */
- ret = _twl_i2c_rmw_u8(TWL6030_MODULE_ID0, TWL6030_BIT_APE_GRP,
+ ret1 = _twl_i2c_rmw_u8(TWL6030_MODULE_ID0, TWL6030_BIT_APE_GRP,
TWL6030_BIT_APE_GRP, TWL6030_REG_SYSEN_CFG_GRP);
+ if (ret1) {
+ pr_err("%s:Err:TWL6030: map APE SYEN(%d)\n", __func__, ret1);
+ ret = ret1;
+ }
+
+ /* Since we dont use VCORE3, this should not be associated with APE */
+ ret1 = _twl_i2c_rmw_u8(TWL6030_MODULE_ID0, TWL6030_BIT_APE_GRP,
+ 0x00, TWL6030_REG_VCORE3_CFG_GRP);
+ if (ret1) {
+ pr_err("%s:Err:TWL6030:unmap APE VCORE3(%d)\n", __func__, ret1);
+ ret = ret1;
+ }
+
+ /* Since we dont use VMEM, this should not be associated with APE */
+ ret1 = _twl_i2c_rmw_u8(TWL6030_MODULE_ID0, TWL6030_BIT_APE_GRP,
+ 0x00, TWL6030_REG_VMEM_CFG_GRP);
+ if (ret1) {
+ pr_err("%s:Err:TWL6030: unmap APE VMEM(%d)\n", __func__, ret1);
+ ret = ret1;
+ }
#endif
out: