2 * Copyright (C) 2015 Linaro
3 * Peter Griffin <peter.griffin@linaro.org>
5 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef _HI6220_GPIO_H_
9 #define _HI6220_GPIO_H_
11 #define HI6220_GPIO_BASE(bank) (((bank < 4) ? 0xf8011000 : \
12 0xf7020000 - 0x4000) + (0x1000 * bank))
14 #define BIT(x) (1 << (x))
16 #define HI6220_GPIO_PER_BANK 8
17 #define HI6220_GPIO_DIR 0x400
20 u8 *base; /* address of registers in physical memory */
23 /* Information about a GPIO bank */
24 struct hikey_gpio_platdata {
26 unsigned int base; /* address of registers in physical memory */
29 #endif /* _HI6220_GPIO_H_ */