serial.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * arch/arm/plat-omap/include/mach/serial.h
  3. *
  4. * This program is distributed in the hope that it will be useful,
  5. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  6. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  7. * GNU General Public License for more details.
  8. */
  9. #ifndef __ASM_ARCH_SERIAL_H
  10. #define __ASM_ARCH_SERIAL_H
  11. #if defined(CONFIG_ARCH_OMAP1)
  12. /* OMAP1 serial ports */
  13. #define OMAP_UART1_BASE 0xfffb0000
  14. #define OMAP_UART2_BASE 0xfffb0800
  15. #define OMAP_UART3_BASE 0xfffb9800
  16. #elif defined(CONFIG_ARCH_OMAP2)
  17. /* OMAP2 serial ports */
  18. #define OMAP_UART1_BASE 0x4806a000
  19. #define OMAP_UART2_BASE 0x4806c000
  20. #define OMAP_UART3_BASE 0x4806e000
  21. #endif
  22. #define OMAP_MAX_NR_PORTS 3
  23. #define OMAP1510_BASE_BAUD (12000000/16)
  24. #define OMAP16XX_BASE_BAUD (48000000/16)
  25. #define is_omap_port(p) ({int __ret = 0; \
  26. if (p == IO_ADDRESS(OMAP_UART1_BASE) || \
  27. p == IO_ADDRESS(OMAP_UART2_BASE) || \
  28. p == IO_ADDRESS(OMAP_UART3_BASE)) \
  29. __ret = 1; \
  30. __ret; \
  31. })
  32. #endif