serial.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. #if defined(CONFIG_ARCH_OMAP1)
  16. /* OMAP1 serial ports */
  17. #define OMAP_UART1_BASE 0xfffb0000
  18. #define OMAP_UART2_BASE 0xfffb0800
  19. #define OMAP_UART3_BASE 0xfffb9800
  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. #elif defined(CONFIG_ARCH_OMAP3)
  26. /* OMAP3 serial ports */
  27. #define OMAP_UART1_BASE 0x4806a000
  28. #define OMAP_UART2_BASE 0x4806c000
  29. #define OMAP_UART3_BASE 0x49020000
  30. #elif defined(CONFIG_ARCH_OMAP4)
  31. /* OMAP4 serial ports */
  32. #define OMAP_UART1_BASE 0x4806a000
  33. #define OMAP_UART2_BASE 0x4806c000
  34. #define OMAP_UART3_BASE 0x48020000
  35. #define OMAP_UART4_BASE 0x4806e000
  36. #endif
  37. #define OMAP1510_BASE_BAUD (12000000/16)
  38. #define OMAP16XX_BASE_BAUD (48000000/16)
  39. #define OMAP24XX_BASE_BAUD (48000000/16)
  40. #define is_omap_port(pt) ({int __ret = 0; \
  41. if ((pt)->port.mapbase == OMAP_UART1_BASE || \
  42. (pt)->port.mapbase == OMAP_UART2_BASE || \
  43. (pt)->port.mapbase == OMAP_UART3_BASE) \
  44. __ret = 1; \
  45. __ret; \
  46. })
  47. #ifndef __ASSEMBLER__
  48. extern void __init omap_serial_early_init(void);
  49. extern void omap_serial_init(void);
  50. extern void omap_serial_init_port(int port);
  51. extern int omap_uart_can_sleep(void);
  52. extern void omap_uart_check_wakeup(void);
  53. extern void omap_uart_prepare_suspend(void);
  54. extern void omap_uart_prepare_idle(int num);
  55. extern void omap_uart_resume_idle(int num);
  56. extern void omap_uart_enable_irqs(int enable);
  57. #endif
  58. #endif