]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h
ArmPlatformPkg: Apply uncrustify changes
[mirror_edk2.git] / ArmPlatformPkg / Drivers / PL061GpioDxe / PL061Gpio.h
1 /** @file
2
3 Copyright (c) 2011-2012, ARM Limited. All rights reserved.
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef __PL061_GPIO_H__
10 #define __PL061_GPIO_H__
11
12 #include <Protocol/EmbeddedGpio.h>
13
14 // PL061 GPIO Registers
15 #define PL061_GPIO_DATA_REG_OFFSET ((UINTN) 0x000)
16 #define PL061_GPIO_DATA_REG 0x000
17 #define PL061_GPIO_DIR_REG 0x400
18 #define PL061_GPIO_IS_REG 0x404
19 #define PL061_GPIO_IBE_REG 0x408
20 #define PL061_GPIO_IEV_REG 0x40C
21 #define PL061_GPIO_IE_REG 0x410
22 #define PL061_GPIO_RIS_REG 0x414
23 #define PL061_GPIO_MIS_REG 0x410
24 #define PL061_GPIO_IC_REG 0x41C
25 #define PL061_GPIO_AFSEL_REG 0x420
26
27 #define PL061_GPIO_PERIPH_ID0 0xFE0
28 #define PL061_GPIO_PERIPH_ID1 0xFE4
29 #define PL061_GPIO_PERIPH_ID2 0xFE8
30 #define PL061_GPIO_PERIPH_ID3 0xFEC
31
32 #define PL061_GPIO_PCELL_ID0 0xFF0
33 #define PL061_GPIO_PCELL_ID1 0xFF4
34 #define PL061_GPIO_PCELL_ID2 0xFF8
35 #define PL061_GPIO_PCELL_ID3 0xFFC
36
37 #define PL061_GPIO_PINS 8
38
39 // All bits low except one bit high, native bit length
40 #define GPIO_PIN_MASK(Pin) (1UL << ((UINTN)(Pin)))
41
42 #endif // __PL061_GPIO_H__