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>
This commit is contained in:
Haojian Zhuang 2017-02-13 15:53:00 +08:00 committed by Ard Biesheuvel
parent d164a0e31b
commit d176bb3c5c
1 changed files with 1 additions and 1 deletions

View File

@ -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;