From 791aad56edecbbd2a2c43a8c43d5b4fd66eccd89 Mon Sep 17 00:00:00 2001 From: Avinash Mahadeva Date: Wed, 22 Jun 2011 12:37:59 -0500 Subject: 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 [nm@ti.com: ported back to 3.0] Signed-off-by: Nishanth Menon [rajeevk@ti.com: co-development] Signed-off-by: Rajeev Kulkarni Signed-off-by: Avinash Mahadeva --- arch/arm/mach-omap2/omap_tps6236x.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'arch/arm') 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: -- cgit v1.1