aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_twl.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2012-09-25 12:33:33 -0400
committerKevin Hilman <khilman@ti.com>2012-11-05 18:03:34 -0500
commitf2a0dfefec5fac797a5c6defa7e29db933a67a80 (patch)
tree070d2d3befa2b0ad2be900e5fee478a7245cc3b9 /arch/arm/mach-omap2/omap_twl.c
parent3d70f8c617a436c7146ecb81df2265b4626dfe89 (diff)
ARM: OMAP3+: PM: VP: use uV for max and min voltage limits
Every PMIC has it's own eccentricities, For example, one of the PMIC has MSB set to 1 for a specific function - voltage enable! using an hardcoded value specific for TWL when copied over to such an implementation causes the system to crash as the MSB bit was 0 and the voltage got disabled!. Instead we use actual values and depend on the convertion routines to abstract out the eccentricities of each PMIC. With this, we can now move the voltages to a common location in voltage.h as they are no longer dependent on PMICs and expect the PMIC's conversion routines to set a cap if the voltage is out of reach for the PMIC. Reported-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_twl.c')
-rw-r--r--arch/arm/mach-omap2/omap_twl.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index f515a1a056d5..df4e7c38f7c6 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -30,16 +30,6 @@
30#define OMAP3_VP_VSTEPMAX_VSTEPMAX 0x04 30#define OMAP3_VP_VSTEPMAX_VSTEPMAX 0x04
31#define OMAP3_VP_VLIMITTO_TIMEOUT_US 200 31#define OMAP3_VP_VLIMITTO_TIMEOUT_US 200
32 32
33#define OMAP3430_VP1_VLIMITTO_VDDMIN 0x14
34#define OMAP3430_VP1_VLIMITTO_VDDMAX 0x42
35#define OMAP3430_VP2_VLIMITTO_VDDMIN 0x18
36#define OMAP3430_VP2_VLIMITTO_VDDMAX 0x2c
37
38#define OMAP3630_VP1_VLIMITTO_VDDMIN 0x18
39#define OMAP3630_VP1_VLIMITTO_VDDMAX 0x3c
40#define OMAP3630_VP2_VLIMITTO_VDDMIN 0x18
41#define OMAP3630_VP2_VLIMITTO_VDDMAX 0x30
42
43#define OMAP4_SRI2C_SLAVE_ADDR 0x12 33#define OMAP4_SRI2C_SLAVE_ADDR 0x12
44#define OMAP4_VDD_MPU_SR_VOLT_REG 0x55 34#define OMAP4_VDD_MPU_SR_VOLT_REG 0x55
45#define OMAP4_VDD_MPU_SR_CMD_REG 0x56 35#define OMAP4_VDD_MPU_SR_CMD_REG 0x56
@@ -53,13 +43,6 @@
53#define OMAP4_VP_VSTEPMAX_VSTEPMAX 0x04 43#define OMAP4_VP_VSTEPMAX_VSTEPMAX 0x04
54#define OMAP4_VP_VLIMITTO_TIMEOUT_US 200 44#define OMAP4_VP_VLIMITTO_TIMEOUT_US 200
55 45
56#define OMAP4_VP_MPU_VLIMITTO_VDDMIN 0xA
57#define OMAP4_VP_MPU_VLIMITTO_VDDMAX 0x39
58#define OMAP4_VP_IVA_VLIMITTO_VDDMIN 0xA
59#define OMAP4_VP_IVA_VLIMITTO_VDDMAX 0x2D
60#define OMAP4_VP_CORE_VLIMITTO_VDDMIN 0xA
61#define OMAP4_VP_CORE_VLIMITTO_VDDMAX 0x28
62
63static bool is_offset_valid; 46static bool is_offset_valid;
64static u8 smps_offset; 47static u8 smps_offset;
65/* 48/*