From: Soby Mathew Date: Thu, 30 Apr 2015 11:27:41 +0000 (+0100) Subject: FVP: Correct the PSYSR_WK bit width in platform_get_entrypoint X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c8f0c3f76caaaa110d50027d6e1635d88e30c464;p=project%2Fbcm63xx%2Fatf.git 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 --- diff --git a/plat/arm/board/fvp/aarch64/fvp_helpers.S b/plat/arm/board/fvp/aarch64/fvp_helpers.S index dd56687c..d176facc 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 5b755af3..3dc9aadc 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