diff options
Diffstat (limited to 'ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h')
-rw-r--r-- | ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h index 42d87a16a3..8db1e1f8ec 100644 --- a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h +++ b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h @@ -37,6 +37,6 @@ #define PL061_GPIO_PINS 8
// All bits low except one bit high, native bit length
-#define GPIO_PIN_MASK(Pin) (1UL << ((UINTN)(Pin)))
+#define GPIO_PIN_MASK(Pin) (UINT8)(1 << (Pin & (PL061_GPIO_PINS - 1)))
#endif // __PL061_GPIO_H__
|