Message ID | 1486972380-24255-2-git-send-email-haojian.zhuang@linaro.org |
---|---|
State | Accepted |
Commit | d176bb3c5c28e0c89ae86995ecd6b9e21b4e0b9f |
Headers | show |
Series | [edk2,1/2] ArmPlatformPkg/PL061: remove duplicated PL061_GPIO_DATA_REG | expand |
On 13 February 2017 at 15:53, Haojian Zhuang <haojian.zhuang@linaro.org> wrote: > 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> > --- > ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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; > -- > 2.7.4 > Correct Ard's email address. Regards Haojian _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On 13 February 2017 at 07:53, Haojian Zhuang <haojian.zhuang@linaro.org> wrote: > 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> Pushed as d164a0e31bf8 ArmPlatformPkg/PL061: remove duplicated PL061_GPIO_DATA_REG d176bb3c5c28 ArmPlatformPkg/PL061Gpio: fix the offset value in Get function > --- > ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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; > -- > 2.7.4 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
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;
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> --- ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel