gtwx5715.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * arch/arm/mach-ixp4xx/include/mach/gtwx5715.h
  3. *
  4. * Gemtek GTWX5715 Gateway (Linksys WRV54G)
  5. *
  6. * Copyright 2004 (c) George T. Joseph
  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
  10. * as published by the Free Software Foundation; either version 2
  11. * of 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, MA 02111-1307, USA.
  21. */
  22. #ifndef __ASM_ARCH_HARDWARE_H__
  23. #error "Do not include this directly, instead #include <mach/hardware.h>"
  24. #endif
  25. #include "irqs.h"
  26. #define GTWX5715_GPIO0 0
  27. #define GTWX5715_GPIO1 1
  28. #define GTWX5715_GPIO2 2
  29. #define GTWX5715_GPIO3 3
  30. #define GTWX5715_GPIO4 4
  31. #define GTWX5715_GPIO5 5
  32. #define GTWX5715_GPIO6 6
  33. #define GTWX5715_GPIO7 7
  34. #define GTWX5715_GPIO8 8
  35. #define GTWX5715_GPIO9 9
  36. #define GTWX5715_GPIO10 10
  37. #define GTWX5715_GPIO11 11
  38. #define GTWX5715_GPIO12 12
  39. #define GTWX5715_GPIO13 13
  40. #define GTWX5715_GPIO14 14
  41. #define GTWX5715_GPIO0_IRQ IRQ_IXP4XX_GPIO0
  42. #define GTWX5715_GPIO1_IRQ IRQ_IXP4XX_GPIO1
  43. #define GTWX5715_GPIO2_IRQ IRQ_IXP4XX_GPIO2
  44. #define GTWX5715_GPIO3_IRQ IRQ_IXP4XX_GPIO3
  45. #define GTWX5715_GPIO4_IRQ IRQ_IXP4XX_GPIO4
  46. #define GTWX5715_GPIO5_IRQ IRQ_IXP4XX_GPIO5
  47. #define GTWX5715_GPIO6_IRQ IRQ_IXP4XX_GPIO6
  48. #define GTWX5715_GPIO7_IRQ IRQ_IXP4XX_GPIO7
  49. #define GTWX5715_GPIO8_IRQ IRQ_IXP4XX_GPIO8
  50. #define GTWX5715_GPIO9_IRQ IRQ_IXP4XX_GPIO9
  51. #define GTWX5715_GPIO10_IRQ IRQ_IXP4XX_GPIO10
  52. #define GTWX5715_GPIO11_IRQ IRQ_IXP4XX_GPIO11
  53. #define GTWX5715_GPIO12_IRQ IRQ_IXP4XX_GPIO12
  54. #define GTWX5715_GPIO13_IRQ IRQ_IXP4XX_SW_INT1
  55. #define GTWX5715_GPIO14_IRQ IRQ_IXP4XX_SW_INT2
  56. /* PCI controller GPIO to IRQ pin mappings
  57. INTA INTB
  58. SLOT 0 10 11
  59. SLOT 1 11 10
  60. */
  61. #define GTWX5715_PCI_SLOT0_DEVID 0
  62. #define GTWX5715_PCI_SLOT0_INTA_GPIO GTWX5715_GPIO10
  63. #define GTWX5715_PCI_SLOT0_INTB_GPIO GTWX5715_GPIO11
  64. #define GTWX5715_PCI_SLOT0_INTA_IRQ GTWX5715_GPIO10_IRQ
  65. #define GTWX5715_PCI_SLOT0_INTB_IRQ GTWX5715_GPIO11_IRQ
  66. #define GTWX5715_PCI_SLOT1_DEVID 1
  67. #define GTWX5715_PCI_SLOT1_INTA_GPIO GTWX5715_GPIO11
  68. #define GTWX5715_PCI_SLOT1_INTB_GPIO GTWX5715_GPIO10
  69. #define GTWX5715_PCI_SLOT1_INTA_IRQ GTWX5715_GPIO11_IRQ
  70. #define GTWX5715_PCI_SLOT1_INTB_IRQ GTWX5715_GPIO10_IRQ
  71. #define GTWX5715_PCI_SLOT_COUNT 2
  72. #define GTWX5715_PCI_INT_PIN_COUNT 2
  73. /*
  74. * GPIO 5,6,7 and12 are hard wired to the Kendin KS8995M Switch
  75. * and operate as an SPI type interface. The details of the interface
  76. * are available on Kendin/Micrel's web site.
  77. */
  78. #define GTWX5715_KSSPI_SELECT GTWX5715_GPIO5
  79. #define GTWX5715_KSSPI_TXD GTWX5715_GPIO6
  80. #define GTWX5715_KSSPI_CLOCK GTWX5715_GPIO7
  81. #define GTWX5715_KSSPI_RXD GTWX5715_GPIO12
  82. /*
  83. * The "reset" button is wired to GPIO 3.
  84. * The GPIO is brought "low" when the button is pushed.
  85. */
  86. #define GTWX5715_BUTTON_GPIO GTWX5715_GPIO3
  87. #define GTWX5715_BUTTON_IRQ GTWX5715_GPIO3_IRQ
  88. /*
  89. * Board Label Front Label
  90. * LED1 Power
  91. * LED2 Wireless-G
  92. * LED3 not populated but could be
  93. * LED4 Internet
  94. * LED5 - LED8 Controlled by KS8995M Switch
  95. * LED9 DMZ
  96. */
  97. #define GTWX5715_LED1_GPIO GTWX5715_GPIO2
  98. #define GTWX5715_LED2_GPIO GTWX5715_GPIO9
  99. #define GTWX5715_LED3_GPIO GTWX5715_GPIO8
  100. #define GTWX5715_LED4_GPIO GTWX5715_GPIO1
  101. #define GTWX5715_LED9_GPIO GTWX5715_GPIO4