serial.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * arch/arm/plat-omap/include/mach/serial.h
  3. *
  4. * Copyright (C) 2009 Texas Instruments
  5. * Addded OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef __ASM_ARCH_SERIAL_H
  13. #define __ASM_ARCH_SERIAL_H
  14. #if defined(CONFIG_ARCH_OMAP1)
  15. /* OMAP1 serial ports */
  16. #define OMAP_UART1_BASE 0xfffb0000
  17. #define OMAP_UART2_BASE 0xfffb0800
  18. #define OMAP_UART3_BASE 0xfffb9800
  19. #define OMAP_MAX_NR_PORTS 3
  20. #elif defined(CONFIG_ARCH_OMAP2)
  21. /* OMAP2 serial ports */
  22. #define OMAP_UART1_BASE 0x4806a000
  23. #define OMAP_UART2_BASE 0x4806c000
  24. #define OMAP_UART3_BASE 0x4806e000
  25. #define OMAP_MAX_NR_PORTS 3
  26. #elif defined(CONFIG_ARCH_OMAP3)
  27. /* OMAP3 serial ports */
  28. #define OMAP_UART1_BASE 0x4806a000
  29. #define OMAP_UART2_BASE 0x4806c000
  30. #define OMAP_UART3_BASE 0x49020000
  31. #define OMAP_MAX_NR_PORTS 3
  32. #elif defined(CONFIG_ARCH_OMAP4)
  33. /* OMAP4 serial ports */
  34. #define OMAP_UART1_BASE 0x4806a000
  35. #define OMAP_UART2_BASE 0x4806c000
  36. #define OMAP_UART3_BASE 0x48020000
  37. #define OMAP_UART4_BASE 0x4806e000
  38. #define OMAP_MAX_NR_PORTS 4
  39. #endif
  40. #define OMAP1510_BASE_BAUD (12000000/16)
  41. #define OMAP16XX_BASE_BAUD (48000000/16)
  42. #define OMAP24XX_BASE_BAUD (48000000/16)
  43. #define is_omap_port(pt) ({int __ret = 0; \
  44. if ((pt)->port.mapbase == OMAP_UART1_BASE || \
  45. (pt)->port.mapbase == OMAP_UART2_BASE || \
  46. (pt)->port.mapbase == OMAP_UART3_BASE) \
  47. __ret = 1; \
  48. __ret; \
  49. })
  50. #ifndef __ASSEMBLER__
  51. extern void omap_serial_init(void);
  52. extern int omap_uart_can_sleep(void);
  53. extern void omap_uart_check_wakeup(void);
  54. extern void omap_uart_prepare_suspend(void);
  55. extern void omap_uart_prepare_idle(int num);
  56. extern void omap_uart_resume_idle(int num);
  57. #endif
  58. #endif