katmai.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * (C) Copyright 2007
  3. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  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 __KATMAI_H_
  24. #define __KATMAI_H_
  25. /*----------------------------------------------------------------------------
  26. * XX
  27. * XXXX XX XXX XXX XXXX
  28. * XX XX XX XX XX XX
  29. * XX XXX XX XX XX XX XX
  30. * XX XX XXXXX XX XX XX
  31. * XXXX XX XXXX XXXX
  32. * XXXX
  33. *
  34. * The 440SPe provices 32 bits of GPIO. By default all GPIO pins
  35. * are disabled, and must be explicitly enabled by setting a
  36. * bit in the SDR0_PFC0 indirect DCR. Each GPIO maps 1-to-1 with the
  37. * corresponding bit in the SDR0_PFC0 register (note that bit numbers
  38. * reflect the PowerPC convention where bit 0 is the most-significant
  39. * bit).
  40. *
  41. * Katmai specific:
  42. * RS232_RX_EN# is held HIGH during reset by hardware, keeping the
  43. * RS232_CTS, DSR & DCD signals coming from the MAX3411 (U26) in
  44. * Hi-Z condition. This prevents contention between the MAX3411 (U26)
  45. * and 74CBTLV3125PG (U2) during reset.
  46. *
  47. * RS232_RX_EN# is connected as GPIO pin 30. Once the processor
  48. * is released from reset, this pin must be configured as an output and
  49. * then driven high to enable the receive signals from the UART transciever.
  50. *----------------------------------------------------------------------------*/
  51. #define GPIO_ENABLE(gpio) (0x80000000 >> (gpio))
  52. #define PFC0_KATMAI GPIO_ENABLE(30)
  53. #define GPIO_OR_KATMAI GPIO_ENABLE(30) /* Drive all outputs low except GPIO 30 */
  54. #define GPIO_TCR_KATMAI GPIO_ENABLE(30)
  55. #define GPIO_ODR_KATMAI 0 /* Disable open drain for all outputs */
  56. #define GPIO0_OR_ADDR (CFG_PERIPHERAL_BASE + 0x700)
  57. #define GPIO0_TCR_ADDR (CFG_PERIPHERAL_BASE + 0x704)
  58. #define GPIO0_ODR_ADDR (CFG_PERIPHERAL_BASE + 0x718)
  59. #define GPIO0_IR_ADDR (CFG_PERIPHERAL_BASE + 0x71C)
  60. #endif /* __KATMAI_H_ */