diff options
author | Thara Gopinath <thara@ti.com> | 2009-12-08 18:33:15 -0500 |
---|---|---|
committer | paul <paul@twilight.(none)> | 2009-12-11 19:00:42 -0500 |
commit | 3863c74b512c1afd3ce6b2f81d8dea9f1d860968 (patch) | |
tree | 1d7d15664c0ae3a71be7949e9c52ca2f79a73811 | |
parent | 18862cbe47e37beba98f22c088fbe6fe029df889 (diff) |
OMAP3: PM: Fix for MPU power domain MEM BANK position
MPU power domain bank 0 bits are displayed in position of bank 1
in PWRSTS and PREPWRSTS registers. So read them from correct
position
Signed-off-by: Thara Gopinath <thara@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomains34xx.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/powerdomain.h | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 47d576883d5c..26b3f3ee82a3 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -983,6 +983,9 @@ int pwrdm_read_mem_pwrst(struct powerdomain *pwrdm, u8 bank) | |||
983 | if (pwrdm->banks < (bank + 1)) | 983 | if (pwrdm->banks < (bank + 1)) |
984 | return -EEXIST; | 984 | return -EEXIST; |
985 | 985 | ||
986 | if (pwrdm->flags & PWRDM_HAS_MPU_QUIRK) | ||
987 | bank = 1; | ||
988 | |||
986 | /* | 989 | /* |
987 | * The register bit names below may not correspond to the | 990 | * The register bit names below may not correspond to the |
988 | * actual names of the bits in each powerdomain's register, | 991 | * actual names of the bits in each powerdomain's register, |
@@ -1030,6 +1033,9 @@ int pwrdm_read_prev_mem_pwrst(struct powerdomain *pwrdm, u8 bank) | |||
1030 | if (pwrdm->banks < (bank + 1)) | 1033 | if (pwrdm->banks < (bank + 1)) |
1031 | return -EEXIST; | 1034 | return -EEXIST; |
1032 | 1035 | ||
1036 | if (pwrdm->flags & PWRDM_HAS_MPU_QUIRK) | ||
1037 | bank = 1; | ||
1038 | |||
1033 | /* | 1039 | /* |
1034 | * The register bit names below may not correspond to the | 1040 | * The register bit names below may not correspond to the |
1035 | * actual names of the bits in each powerdomain's register, | 1041 | * actual names of the bits in each powerdomain's register, |
diff --git a/arch/arm/mach-omap2/powerdomains34xx.h b/arch/arm/mach-omap2/powerdomains34xx.h index fd09b0827df0..588f7e07d0ea 100644 --- a/arch/arm/mach-omap2/powerdomains34xx.h +++ b/arch/arm/mach-omap2/powerdomains34xx.h | |||
@@ -190,6 +190,7 @@ static struct powerdomain mpu_34xx_pwrdm = { | |||
190 | .wkdep_srcs = mpu_34xx_wkdeps, | 190 | .wkdep_srcs = mpu_34xx_wkdeps, |
191 | .pwrsts = PWRSTS_OFF_RET_ON, | 191 | .pwrsts = PWRSTS_OFF_RET_ON, |
192 | .pwrsts_logic_ret = PWRSTS_OFF_RET, | 192 | .pwrsts_logic_ret = PWRSTS_OFF_RET, |
193 | .flags = PWRDM_HAS_MPU_QUIRK, | ||
193 | .banks = 1, | 194 | .banks = 1, |
194 | .pwrsts_mem_ret = { | 195 | .pwrsts_mem_ret = { |
195 | [0] = PWRSTS_OFF_RET, | 196 | [0] = PWRSTS_OFF_RET, |
diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h index 56bb1b9bf2b5..0b960051eaed 100644 --- a/arch/arm/plat-omap/include/plat/powerdomain.h +++ b/arch/arm/plat-omap/include/plat/powerdomain.h | |||
@@ -42,7 +42,10 @@ | |||
42 | 42 | ||
43 | /* Powerdomain flags */ | 43 | /* Powerdomain flags */ |
44 | #define PWRDM_HAS_HDWR_SAR (1 << 0) /* hardware save-and-restore support */ | 44 | #define PWRDM_HAS_HDWR_SAR (1 << 0) /* hardware save-and-restore support */ |
45 | 45 | #define PWRDM_HAS_MPU_QUIRK (1 << 1) /* MPU pwr domain has MEM bank 0 bits | |
46 | * in MEM bank 1 position. This is | ||
47 | * true for OMAP3430 | ||
48 | */ | ||
46 | 49 | ||
47 | /* | 50 | /* |
48 | * Number of memory banks that are power-controllable. On OMAP3430, the | 51 | * Number of memory banks that are power-controllable. On OMAP3430, the |