gpio.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * This program is free software; you can redistribute it and/or
  3. * modify it under the terms of the GNU General Public License as
  4. * published by the Free Software Foundation; either version 2 of
  5. * the License, or (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software
  14. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  15. * MA 02111-1307 USA
  16. */
  17. #ifndef _MPC83XX_GPIO_H_
  18. #define _MPC83XX_GPIO_H_
  19. /*
  20. * The MCP83xx's 1-2 GPIO controllers each with 32 bits.
  21. */
  22. #if defined(CONFIG_MPC8313) || defined(CONFIG_MPC8308) || \
  23. defined(CONFIG_MPC8315)
  24. #define MPC83XX_GPIO_CTRLRS 1
  25. #elif defined(CONFIG_MPC834x) || defined(CONFIG_MPC837x)
  26. #define MPC83XX_GPIO_CTRLRS 2
  27. #else
  28. #define MPC83XX_GPIO_CTRLRS 0
  29. #endif
  30. #define MAX_NUM_GPIOS (32 * MPC83XX_GPIO_CTRLRS)
  31. void mpc83xx_gpio_init_f(void);
  32. void mpc83xx_gpio_init_r(void);
  33. #endif /* MPC83XX_GPIO_H_ */