serial.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Copyright (C) 2009 Texas Instruments
  3. * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
  4. *
  5. * This program is distributed in the hope that it will be useful,
  6. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. * GNU General Public License for more details.
  9. */
  10. /*
  11. * Memory entry used for the DEBUG_LL UART configuration, relative to
  12. * start of RAM. See also uncompress.h and debug-macro.S.
  13. *
  14. * Note that using a memory location for storing the UART configuration
  15. * has at least two limitations:
  16. *
  17. * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
  18. * uncompress code could then partially overwrite itself
  19. * 2. We assume printascii is called at least once before paging_init,
  20. * and addruart has a chance to read OMAP_UART_INFO
  21. */
  22. #define OMAP_UART_INFO_OFS 0x3ffc
  23. /* OMAP2 serial ports */
  24. #define OMAP2_UART1_BASE 0x4806a000
  25. #define OMAP2_UART2_BASE 0x4806c000
  26. #define OMAP2_UART3_BASE 0x4806e000
  27. /* OMAP3 serial ports */
  28. #define OMAP3_UART1_BASE OMAP2_UART1_BASE
  29. #define OMAP3_UART2_BASE OMAP2_UART2_BASE
  30. #define OMAP3_UART3_BASE 0x49020000
  31. #define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
  32. #define OMAP3_UART4_AM35XX_BASE 0x4809E000 /* Only on AM35xx */
  33. /* OMAP4 serial ports */
  34. #define OMAP4_UART1_BASE OMAP2_UART1_BASE
  35. #define OMAP4_UART2_BASE OMAP2_UART2_BASE
  36. #define OMAP4_UART3_BASE 0x48020000
  37. #define OMAP4_UART4_BASE 0x4806e000
  38. /* TI81XX serial ports */
  39. #define TI81XX_UART1_BASE 0x48020000
  40. #define TI81XX_UART2_BASE 0x48022000
  41. #define TI81XX_UART3_BASE 0x48024000
  42. /* AM3505/3517 UART4 */
  43. #define AM35XX_UART4_BASE 0x4809E000 /* Only on AM3505/3517 */
  44. /* AM33XX serial port */
  45. #define AM33XX_UART1_BASE 0x44E09000
  46. /* OMAP5 serial ports */
  47. #define OMAP5_UART1_BASE OMAP2_UART1_BASE
  48. #define OMAP5_UART2_BASE OMAP2_UART2_BASE
  49. #define OMAP5_UART3_BASE OMAP4_UART3_BASE
  50. #define OMAP5_UART4_BASE OMAP4_UART4_BASE
  51. #define OMAP5_UART5_BASE 0x48066000
  52. #define OMAP5_UART6_BASE 0x48068000
  53. /* External port on Zoom2/3 */
  54. #define ZOOM_UART_BASE 0x10000000
  55. #define ZOOM_UART_VIRT 0xfa400000
  56. #define OMAP_PORT_SHIFT 2
  57. #define ZOOM_PORT_SHIFT 1
  58. #define OMAP24XX_BASE_BAUD (48000000/16)
  59. /*
  60. * DEBUG_LL port encoding stored into the UART1 scratchpad register by
  61. * decomp_setup in uncompress.h
  62. */
  63. #define OMAP2UART1 21
  64. #define OMAP2UART2 22
  65. #define OMAP2UART3 23
  66. #define OMAP3UART1 OMAP2UART1
  67. #define OMAP3UART2 OMAP2UART2
  68. #define OMAP3UART3 33
  69. #define OMAP3UART4 34 /* Only on 36xx */
  70. #define OMAP4UART1 OMAP2UART1
  71. #define OMAP4UART2 OMAP2UART2
  72. #define OMAP4UART3 43
  73. #define OMAP4UART4 44
  74. #define TI81XXUART1 81
  75. #define TI81XXUART2 82
  76. #define TI81XXUART3 83
  77. #define AM33XXUART1 84
  78. #define OMAP5UART3 OMAP4UART3
  79. #define OMAP5UART4 OMAP4UART4
  80. #define ZOOM_UART 95 /* Only on zoom2/3 */
  81. #ifndef __ASSEMBLER__
  82. struct omap_board_data;
  83. struct omap_uart_port_info;
  84. extern void omap_serial_init(void);
  85. extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
  86. extern void omap_serial_init_port(struct omap_board_data *bdata,
  87. struct omap_uart_port_info *platform_data);
  88. #endif