gpio.h 597 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (C) 2015 Linaro
  3. * Peter Griffin <peter.griffin@linaro.org>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _HI6220_GPIO_H_
  8. #define _HI6220_GPIO_H_
  9. #define HI6220_GPIO_BASE(bank) (((bank < 4) ? 0xf8011000 : \
  10. 0xf7020000 - 0x4000) + (0x1000 * bank))
  11. #define HI6220_GPIO_PER_BANK 8
  12. #define HI6220_GPIO_DIR 0x400
  13. struct gpio_bank {
  14. u8 *base; /* address of registers in physical memory */
  15. };
  16. /* Information about a GPIO bank */
  17. struct hikey_gpio_platdata {
  18. int bank_index;
  19. ulong base; /* address of registers in physical memory */
  20. };
  21. #endif /* _HI6220_GPIO_H_ */