summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Drivers/PL061GpioDxe
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 /ArmPlatformPkg/Drivers/PL061GpioDxe
parentd164a0e31bf8aa5bc8f9a184a02648585ff4f0d7 (diff)
downloadedk2-d176bb3c5c28e0c89ae86995ecd6b9e21b4e0b9f.zip
edk2-d176bb3c5c28e0c89ae86995ecd6b9e21b4e0b9f.tar.gz
edk2-d176bb3c5c28e0c89ae86995ecd6b9e21b4e0b9f.tar.bz2
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>
Diffstat (limited to 'ArmPlatformPkg/Drivers/PL061GpioDxe')
-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 ff8bb3b..81b9f6d 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;