[edk2] [PATCH 1/3] ArmPlatformPkg: PL061: fix accessing GPIO DATA

2015-08-18 Thread Haojian Zhuang
// All bits low except one bit high, restricted to 8 bits // (i.e. ensures zeros above 8bits) But '&&' is wrong at here. It'll only return 1 or 0 as the result of GPIO_PIN_MASK_HIGH_8BIT(Pin). Since PL061 spec said in below. In order to write to GPIODATA, the corresponding bits in the mask, resu

Re: [edk2] [PATCH 1/3] ArmPlatformPkg: PL061: fix accessing GPIO DATA

2015-08-18 Thread Ard Biesheuvel
On 18 August 2015 at 10:39, Haojian Zhuang wrote: > // All bits low except one bit high, restricted to 8 bits > // (i.e. ensures zeros above 8bits) > > But '&&' is wrong at here. It'll only return 1 or 0 as the result > of GPIO_PIN_MASK_HIGH_8BIT(Pin). > > Since PL061 spec said in below. > > In or

Re: [edk2] [PATCH 1/3] ArmPlatformPkg: PL061: fix accessing GPIO DATA

2015-08-18 Thread Haojian Zhuang
On Tue, 2015-08-18 at 10:45 +0200, Ard Biesheuvel wrote: > On 18 August 2015 at 10:39, Haojian Zhuang wrote: > > // All bits low except one bit high, restricted to 8 bits > > // (i.e. ensures zeros above 8bits) > > > > But '&&' is wrong at here. It'll only return 1 or 0 as the result > > of GPIO_P