virtex-ii_pro.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * arch/ppc/platforms/4xx/virtex-ii_pro.h
  3. *
  4. * Include file that defines the Xilinx Virtex-II Pro processor
  5. *
  6. * Author: MontaVista Software, Inc.
  7. * source@mvista.com
  8. *
  9. * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the
  10. * terms of the GNU General Public License version 2. This program is licensed
  11. * "as is" without any warranty of any kind, whether express or implied.
  12. */
  13. #ifdef __KERNEL__
  14. #ifndef __ASM_VIRTEXIIPRO_H__
  15. #define __ASM_VIRTEXIIPRO_H__
  16. #include <linux/config.h>
  17. #include <asm/xparameters.h>
  18. /* serial defines */
  19. #define RS_TABLE_SIZE 4 /* change this and add more devices below
  20. if you have more then 4 16x50 UARTs */
  21. #define BASE_BAUD (XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16)
  22. /* The serial ports in the Virtex-II Pro have each I/O byte in the
  23. * LSByte of a word. This means that iomem_reg_shift needs to be 2 to
  24. * change the byte offsets into word offsets. In addition the base
  25. * addresses need to have 3 added to them to get to the LSByte.
  26. */
  27. #define STD_UART_OP(num) \
  28. { 0, BASE_BAUD, 0, XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \
  29. ASYNC_BOOT_AUTOCONF, \
  30. .iomem_base = (u8 *)XPAR_UARTNS550_##num##_BASEADDR + 3, \
  31. .iomem_reg_shift = 2, \
  32. .io_type = SERIAL_IO_MEM},
  33. #if defined(XPAR_INTC_0_UARTNS550_0_VEC_ID)
  34. #define ML300_UART0 STD_UART_OP(0)
  35. #else
  36. #define ML300_UART0
  37. #endif
  38. #if defined(XPAR_INTC_0_UARTNS550_1_VEC_ID)
  39. #define ML300_UART1 STD_UART_OP(1)
  40. #else
  41. #define ML300_UART1
  42. #endif
  43. #if defined(XPAR_INTC_0_UARTNS550_2_VEC_ID)
  44. #define ML300_UART2 STD_UART_OP(2)
  45. #else
  46. #define ML300_UART2
  47. #endif
  48. #if defined(XPAR_INTC_0_UARTNS550_3_VEC_ID)
  49. #define ML300_UART3 STD_UART_OP(3)
  50. #else
  51. #define ML300_UART3
  52. #endif
  53. #if defined(XPAR_INTC_0_UARTNS550_4_VEC_ID)
  54. #error Edit this file to add more devices.
  55. #elif defined(XPAR_INTC_0_UARTNS550_3_VEC_ID)
  56. #define NR_SER_PORTS 4
  57. #elif defined(XPAR_INTC_0_UARTNS550_2_VEC_ID)
  58. #define NR_SER_PORTS 3
  59. #elif defined(XPAR_INTC_0_UARTNS550_1_VEC_ID)
  60. #define NR_SER_PORTS 2
  61. #elif defined(XPAR_INTC_0_UARTNS550_0_VEC_ID)
  62. #define NR_SER_PORTS 1
  63. #else
  64. #define NR_SER_PORTS 0
  65. #endif
  66. #if defined(CONFIG_UART0_TTYS0)
  67. #define SERIAL_PORT_DFNS \
  68. ML300_UART0 \
  69. ML300_UART1 \
  70. ML300_UART2 \
  71. ML300_UART3
  72. #endif
  73. #if defined(CONFIG_UART0_TTYS1)
  74. #define SERIAL_PORT_DFNS \
  75. ML300_UART1 \
  76. ML300_UART0 \
  77. ML300_UART2 \
  78. ML300_UART3
  79. #endif
  80. #define DCRN_CPMFR_BASE 0
  81. #include <asm/ibm405.h>
  82. #endif /* __ASM_VIRTEXIIPRO_H__ */
  83. #endif /* __KERNEL__ */