summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2017-02-13 15:53:00 +0800
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-02-16 11:31:25 +0000
commitd176bb3c5c28e0c89ae86995ecd6b9e21b4e0b9f (patch)
treea95c0f9f1c12e51a02a261751b259325cdf84c0a
parentd164a0e31bf8aa5bc8f9a184a02648585ff4f0d7 (diff)
downloadedk2-platforms-d176bb3c5c28e0c89ae86995ecd6b9e21b4e0b9f.tar.xz
ArmPlatformPkg/PL061Gpio: fix the offset value in Get function
When call PL061GetPins() or PL061SetPins(), should use GPIO_PIN_MASK(offset) as parameter, not offset. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-rw-r--r--ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c
index ff8bb3be85..81b9f6daec 100644
--- a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c
+++ b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c
@@ -186,7 +186,7 @@ Get (
return EFI_INVALID_PARAMETER;
}
- if (PL061GetPins (RegisterBase, Offset)) {
+ if (PL061GetPins (RegisterBase, GPIO_PIN_MASK(Offset))) {
*Value = 1;
} else {
*Value = 0;