pb1000.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Alchemy Semi Pb1000 Referrence Board
  3. *
  4. * Copyright 2001, 2008 MontaVista Software Inc.
  5. * Author: MontaVista Software, Inc. <source@mvista.com>
  6. *
  7. * ########################################################################
  8. *
  9. * This program is free software; you can distribute it and/or modify it
  10. * under the terms of the GNU General Public License (Version 2) as
  11. * published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope it will be useful, but WITHOUT
  14. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  16. * for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program; if not, write to the Free Software Foundation, Inc.,
  20. * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  21. *
  22. * ########################################################################
  23. *
  24. *
  25. */
  26. #ifndef __ASM_PB1000_H
  27. #define __ASM_PB1000_H
  28. /* PCMCIA PB1000 specific defines */
  29. #define PCMCIA_MAX_SOCK 1
  30. #define PCMCIA_NUM_SOCKS (PCMCIA_MAX_SOCK + 1)
  31. #define PB1000_PCR 0xBE000000
  32. # define PCR_SLOT_0_VPP0 (1 << 0)
  33. # define PCR_SLOT_0_VPP1 (1 << 1)
  34. # define PCR_SLOT_0_VCC0 (1 << 2)
  35. # define PCR_SLOT_0_VCC1 (1 << 3)
  36. # define PCR_SLOT_0_RST (1 << 4)
  37. # define PCR_SLOT_1_VPP0 (1 << 8)
  38. # define PCR_SLOT_1_VPP1 (1 << 9)
  39. # define PCR_SLOT_1_VCC0 (1 << 10)
  40. # define PCR_SLOT_1_VCC1 (1 << 11)
  41. # define PCR_SLOT_1_RST (1 << 12)
  42. #define PB1000_MDR 0xBE000004
  43. # define MDR_PI (1 << 5) /* PCMCIA int latch */
  44. # define MDR_EPI (1 << 14) /* enable PCMCIA int */
  45. # define MDR_CPI (1 << 15) /* clear PCMCIA int */
  46. #define PB1000_ACR1 0xBE000008
  47. # define ACR1_SLOT_0_CD1 (1 << 0) /* card detect 1 */
  48. # define ACR1_SLOT_0_CD2 (1 << 1) /* card detect 2 */
  49. # define ACR1_SLOT_0_READY (1 << 2) /* ready */
  50. # define ACR1_SLOT_0_STATUS (1 << 3) /* status change */
  51. # define ACR1_SLOT_0_VS1 (1 << 4) /* voltage sense 1 */
  52. # define ACR1_SLOT_0_VS2 (1 << 5) /* voltage sense 2 */
  53. # define ACR1_SLOT_0_INPACK (1 << 6) /* inpack pin status */
  54. # define ACR1_SLOT_1_CD1 (1 << 8) /* card detect 1 */
  55. # define ACR1_SLOT_1_CD2 (1 << 9) /* card detect 2 */
  56. # define ACR1_SLOT_1_READY (1 << 10) /* ready */
  57. # define ACR1_SLOT_1_STATUS (1 << 11) /* status change */
  58. # define ACR1_SLOT_1_VS1 (1 << 12) /* voltage sense 1 */
  59. # define ACR1_SLOT_1_VS2 (1 << 13) /* voltage sense 2 */
  60. # define ACR1_SLOT_1_INPACK (1 << 14) /* inpack pin status */
  61. #define CPLD_AUX0 0xBE00000C
  62. #define CPLD_AUX1 0xBE000010
  63. #define CPLD_AUX2 0xBE000014
  64. /* Voltage levels */
  65. /* VPPEN1 - VPPEN0 */
  66. #define VPP_GND ((0 << 1) | (0 << 0))
  67. #define VPP_5V ((1 << 1) | (0 << 0))
  68. #define VPP_3V ((0 << 1) | (1 << 0))
  69. #define VPP_12V ((0 << 1) | (1 << 0))
  70. #define VPP_HIZ ((1 << 1) | (1 << 0))
  71. /* VCCEN1 - VCCEN0 */
  72. #define VCC_3V ((0 << 1) | (1 << 0))
  73. #define VCC_5V ((1 << 1) | (0 << 0))
  74. #define VCC_HIZ ((0 << 1) | (0 << 0))
  75. /* VPP/VCC */
  76. #define SET_VCC_VPP(VCC, VPP, SLOT) \
  77. ((((VCC) << 2) | ((VPP) << 0)) << ((SLOT) * 8))
  78. #endif /* __ASM_PB1000_H */