]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/PL061Gpio: fix the offset value in Get function
authorHaojian Zhuang <haojian.zhuang@linaro.org>
Mon, 13 Feb 2017 07:53:00 +0000 (15:53 +0800)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 16 Feb 2017 11:31:25 +0000 (11:31 +0000)
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>
ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c

index ff8bb3be857b1410d09dbf3d4d59e9b7470ade32..81b9f6daece8c0cce9e2dc04c79655ce329590d3 100644 (file)
@@ -186,7 +186,7 @@ Get (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (PL061GetPins (RegisterBase, Offset)) {\r
+  if (PL061GetPins (RegisterBase, GPIO_PIN_MASK(Offset))) {\r
     *Value = 1;\r
   } else {\r
     *Value = 0;\r