serial.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. #include <linux/init.h>
  15. /* OMAP1 serial ports */
  16. #define OMAP1_UART1_BASE 0xfffb0000
  17. #define OMAP1_UART2_BASE 0xfffb0800
  18. #define OMAP1_UART3_BASE 0xfffb9800
  19. /* OMAP2 serial ports */
  20. #define OMAP2_UART1_BASE 0x4806a000
  21. #define OMAP2_UART2_BASE 0x4806c000
  22. #define OMAP2_UART3_BASE 0x4806e000
  23. /* OMAP3 serial ports */
  24. #define OMAP3_UART1_BASE 0x4806a000
  25. #define OMAP3_UART2_BASE 0x4806c000
  26. #define OMAP3_UART3_BASE 0x49020000
  27. #define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
  28. /* OMAP4 serial ports */
  29. #define OMAP4_UART1_BASE 0x4806a000
  30. #define OMAP4_UART2_BASE 0x4806c000
  31. #define OMAP4_UART3_BASE 0x48020000
  32. #define OMAP4_UART4_BASE 0x4806e000
  33. #define OMAP_PORT_SHIFT 2
  34. #define OMAP7XX_PORT_SHIFT 0
  35. #define OMAP1510_BASE_BAUD (12000000/16)
  36. #define OMAP16XX_BASE_BAUD (48000000/16)
  37. #define OMAP24XX_BASE_BAUD (48000000/16)
  38. /* This is only used by 8250.c for omap1510 */
  39. #define is_omap_port(pt) ({int __ret = 0; \
  40. if ((pt)->port.mapbase == OMAP1_UART1_BASE || \
  41. (pt)->port.mapbase == OMAP1_UART2_BASE || \
  42. (pt)->port.mapbase == OMAP1_UART3_BASE) \
  43. __ret = 1; \
  44. __ret; \
  45. })
  46. #ifndef __ASSEMBLER__
  47. extern void __init omap_serial_early_init(void);
  48. extern void omap_serial_init(void);
  49. extern void omap_serial_init_port(int port);
  50. extern int omap_uart_can_sleep(void);
  51. extern void omap_uart_check_wakeup(void);
  52. extern void omap_uart_prepare_suspend(void);
  53. extern void omap_uart_prepare_idle(int num);
  54. extern void omap_uart_resume_idle(int num);
  55. extern void omap_uart_enable_irqs(int enable);
  56. #endif
  57. #endif