Merge tag 'efi-2020-07-rc6' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
[oweals/u-boot.git] / arch / powerpc / include / asm / arch-mpc83xx / gpio.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2
3 #ifndef _MPC83XX_GPIO_H_
4 #define _MPC83XX_GPIO_H_
5
6 /*
7  * The MCP83xx's 1-2 GPIO controllers each with 32 bits.
8  */
9 #if defined(CONFIG_ARCH_MPC8313) || defined(CONFIG_ARCH_MPC8308) || \
10         defined(CONFIG_ARCH_MPC8315)
11 #define MPC83XX_GPIO_CTRLRS 1
12 #elif defined(CONFIG_ARCH_MPC834X) || defined(CONFIG_ARCH_MPC837X) || \
13         defined(CONFIG_ARCH_MPC8309)
14 #define MPC83XX_GPIO_CTRLRS 2
15 #else
16 #define MPC83XX_GPIO_CTRLRS 0
17 #endif
18
19 #define MAX_NUM_GPIOS (32 * MPC83XX_GPIO_CTRLRS)
20
21 struct mpc8xxx_gpio_plat {
22        ulong addr;
23        unsigned long size;
24        uint ngpios;
25 };
26
27 #ifndef DM_GPIO
28 void mpc83xx_gpio_init_f(void);
29 void mpc83xx_gpio_init_r(void);
30 #endif  /* DM_GPIO */
31
32 #endif  /* MPC83XX_GPIO_H_ */