gpio.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (C) 2012
  3. * Philippe Reynes <tremyfr@yahoo.fr>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef __ASM_ARCH_MX27_GPIO_H
  24. #define __ASM_ARCH_MX27_GPIO_H
  25. /* GPIO registers */
  26. struct gpio_regs {
  27. u32 gpio_dir; /* DDIR */
  28. u32 ocr1;
  29. u32 ocr2;
  30. u32 iconfa1;
  31. u32 iconfa2;
  32. u32 iconfb1;
  33. u32 iconfb2;
  34. u32 gpio_dr; /* DR */
  35. u32 gius;
  36. u32 gpio_psr; /* SSR */
  37. u32 icr1;
  38. u32 icr2;
  39. u32 imr;
  40. u32 isr;
  41. u32 gpr;
  42. u32 swr;
  43. u32 puen;
  44. u32 res[0x2f];
  45. };
  46. /* This structure is used by the function imx_gpio_mode */
  47. struct gpio_port_regs {
  48. struct gpio_regs port[6];
  49. };
  50. #endif