regs-gpio.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* linux/arch/arm/plat-s5pc100/include/plat/regs-gpio.h
  2. *
  3. * Copyright 2009 Samsung Electronics Co.
  4. * Byungho Min <bhmin@samsung.com>
  5. *
  6. * S5PC100 - GPIO register definitions
  7. */
  8. #ifndef __ASM_MACH_S5PC100_REGS_GPIO_H
  9. #define __ASM_MACH_S5PC100_REGS_GPIO_H __FILE__
  10. #include <mach/map.h>
  11. /* S5PC100 */
  12. #define S5PC100_GPIO_BASE S5P_VA_GPIO
  13. #define S5PC100_GPA0_BASE (S5PC100_GPIO_BASE + 0x0000)
  14. #define S5PC100_GPA1_BASE (S5PC100_GPIO_BASE + 0x0020)
  15. #define S5PC100_GPB_BASE (S5PC100_GPIO_BASE + 0x0040)
  16. #define S5PC100_GPC_BASE (S5PC100_GPIO_BASE + 0x0060)
  17. #define S5PC100_GPD_BASE (S5PC100_GPIO_BASE + 0x0080)
  18. #define S5PC100_GPE0_BASE (S5PC100_GPIO_BASE + 0x00A0)
  19. #define S5PC100_GPE1_BASE (S5PC100_GPIO_BASE + 0x00C0)
  20. #define S5PC100_GPF0_BASE (S5PC100_GPIO_BASE + 0x00E0)
  21. #define S5PC100_GPF1_BASE (S5PC100_GPIO_BASE + 0x0100)
  22. #define S5PC100_GPF2_BASE (S5PC100_GPIO_BASE + 0x0120)
  23. #define S5PC100_GPF3_BASE (S5PC100_GPIO_BASE + 0x0140)
  24. #define S5PC100_GPG0_BASE (S5PC100_GPIO_BASE + 0x0160)
  25. #define S5PC100_GPG1_BASE (S5PC100_GPIO_BASE + 0x0180)
  26. #define S5PC100_GPG2_BASE (S5PC100_GPIO_BASE + 0x01A0)
  27. #define S5PC100_GPG3_BASE (S5PC100_GPIO_BASE + 0x01C0)
  28. #define S5PC100_GPH0_BASE (S5PC100_GPIO_BASE + 0x0C00)
  29. #define S5PC100_GPH1_BASE (S5PC100_GPIO_BASE + 0x0C20)
  30. #define S5PC100_GPH2_BASE (S5PC100_GPIO_BASE + 0x0C40)
  31. #define S5PC100_GPH3_BASE (S5PC100_GPIO_BASE + 0x0C60)
  32. #define S5PC100_GPI_BASE (S5PC100_GPIO_BASE + 0x01E0)
  33. #define S5PC100_GPJ0_BASE (S5PC100_GPIO_BASE + 0x0200)
  34. #define S5PC100_GPJ1_BASE (S5PC100_GPIO_BASE + 0x0220)
  35. #define S5PC100_GPJ2_BASE (S5PC100_GPIO_BASE + 0x0240)
  36. #define S5PC100_GPJ3_BASE (S5PC100_GPIO_BASE + 0x0260)
  37. #define S5PC100_GPJ4_BASE (S5PC100_GPIO_BASE + 0x0280)
  38. #define S5PC100_GPK0_BASE (S5PC100_GPIO_BASE + 0x02A0)
  39. #define S5PC100_GPK1_BASE (S5PC100_GPIO_BASE + 0x02C0)
  40. #define S5PC100_GPK2_BASE (S5PC100_GPIO_BASE + 0x02E0)
  41. #define S5PC100_GPK3_BASE (S5PC100_GPIO_BASE + 0x0300)
  42. #define S5PC100_GPL0_BASE (S5PC100_GPIO_BASE + 0x0320)
  43. #define S5PC100_GPL1_BASE (S5PC100_GPIO_BASE + 0x0340)
  44. #define S5PC100_GPL2_BASE (S5PC100_GPIO_BASE + 0x0360)
  45. #define S5PC100_GPL3_BASE (S5PC100_GPIO_BASE + 0x0380)
  46. #define S5PC100_GPL4_BASE (S5PC100_GPIO_BASE + 0x03A0)
  47. #define S5PC100EINT30CON (S5P_VA_GPIO + 0xE00)
  48. #define S5P_EINT_CON(x) (S5PC100EINT30CON + ((x) * 0x4))
  49. #define S5PC100EINT30FLTCON0 (S5P_VA_GPIO + 0xE80)
  50. #define S5P_EINT_FLTCON(x) (S5PC100EINT30FLTCON0 + ((x) * 0x4))
  51. #define S5PC100EINT30MASK (S5P_VA_GPIO + 0xF00)
  52. #define S5P_EINT_MASK(x) (S5PC100EINT30MASK + ((x) * 0x4))
  53. #define S5PC100EINT30PEND (S5P_VA_GPIO + 0xF40)
  54. #define S5P_EINT_PEND(x) (S5PC100EINT30PEND + ((x) * 0x4))
  55. #define EINT_REG_NR(x) (EINT_OFFSET(x) >> 3)
  56. #define eint_irq_to_bit(irq) (1 << (EINT_OFFSET(irq) & 0x7))
  57. /* values for S5P_EXTINT0 */
  58. #define S5P_EXTINT_LOWLEV (0x00)
  59. #define S5P_EXTINT_HILEV (0x01)
  60. #define S5P_EXTINT_FALLEDGE (0x02)
  61. #define S5P_EXTINT_RISEEDGE (0x03)
  62. #define S5P_EXTINT_BOTHEDGE (0x04)
  63. #define EINT_MODE S3C_GPIO_SFN(0x2)
  64. #define EINT_GPIO_0(x) S5PC100_GPH0(x)
  65. #define EINT_GPIO_1(x) S5PC100_GPH1(x)
  66. #define EINT_GPIO_2(x) S5PC100_GPH2(x)
  67. #define EINT_GPIO_3(x) S5PC100_GPH3(x)
  68. #endif /* __ASM_MACH_S5PC100_REGS_GPIO_H */