aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2015-04-30 12:27:41 +0100
committerSoby Mathew <soby.mathew@arm.com>2015-06-03 14:43:14 +0100
commitc8f0c3f76caaaa110d50027d6e1635d88e30c464 (patch)
treeb4126991543497e637fb8eff882719972b5ebe80
parentc163ec455b9f7432a8f677b8d35981e6d11b39cb (diff)
downloadarm-trusted-firmware-c8f0c3f76caaaa110d50027d6e1635d88e30c464.tar.gz
FVP: Correct the PSYSR_WK bit width in platform_get_entrypoint
This patch fixes the incorrect bit width used to extract the wakeup reason from PSYSR in platform_get_entrypoint() function. This defect did not have any observed regression. Change-Id: I42652dbffc99f5bf50cc86a5878f28d730720d9a
-rw-r--r--plat/arm/board/fvp/aarch64/fvp_helpers.S2
-rw-r--r--plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/plat/arm/board/fvp/aarch64/fvp_helpers.S b/plat/arm/board/fvp/aarch64/fvp_helpers.S
index dd56687..d176fac 100644
--- a/plat/arm/board/fvp/aarch64/fvp_helpers.S
+++ b/plat/arm/board/fvp/aarch64/fvp_helpers.S
@@ -123,7 +123,7 @@ func platform_get_entrypoint
ldr x1, =PWRC_BASE
str w2, [x1, #PSYSR_OFF]
ldr w2, [x1, #PSYSR_OFF]
- ubfx w2, w2, #PSYSR_WK_SHIFT, #PSYSR_WK_MASK
+ ubfx w2, w2, #PSYSR_WK_SHIFT, #PSYSR_WK_WIDTH
cmp w2, #WKUP_PPONR
beq warm_reset
cmp w2, #WKUP_GICREQ
diff --git a/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h b/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h
index 5b755af..3dc9aad 100644
--- a/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h
+++ b/plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.h
@@ -48,7 +48,8 @@
#define PSYSR_PP (1 << 26)
#define PSYSR_WK_SHIFT 24
-#define PSYSR_WK_MASK 0x3
+#define PSYSR_WK_WIDTH 0x2
+#define PSYSR_WK_MASK ((1 << PSYSR_WK_WIDTH) - 1)
#define PSYSR_WK(x) (x >> PSYSR_WK_SHIFT) & PSYSR_WK_MASK
#define WKUP_COLD 0x0