serial.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #elif defined(CONFIG_ARCH_OMAP3)
  22. /* OMAP3 serial ports */
  23. #define OMAP_UART1_BASE 0x4806a000
  24. #define OMAP_UART2_BASE 0x4806c000
  25. #define OMAP_UART3_BASE 0x49020000
  26. #endif
  27. #define OMAP_MAX_NR_PORTS 3
  28. #define OMAP1510_BASE_BAUD (12000000/16)
  29. #define OMAP16XX_BASE_BAUD (48000000/16)
  30. #define OMAP24XX_BASE_BAUD (48000000/16)
  31. #define is_omap_port(pt) ({int __ret = 0; \
  32. if ((pt)->port.mapbase == OMAP_UART1_BASE || \
  33. (pt)->port.mapbase == OMAP_UART2_BASE || \
  34. (pt)->port.mapbase == OMAP_UART3_BASE) \
  35. __ret = 1; \
  36. __ret; \
  37. })
  38. #endif