gemini_serial.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifdef __KERNEL__
  2. #ifndef __ASMPPC_GEMINI_SERIAL_H
  3. #define __ASMPPC_GEMINI_SERIAL_H
  4. #include <platforms/gemini.h>
  5. #ifdef CONFIG_SERIAL_MANY_PORTS
  6. #define RS_TABLE_SIZE 64
  7. #else
  8. #define RS_TABLE_SIZE 4
  9. #endif
  10. /* Rate for the 24.576 Mhz clock for the onboard serial chip */
  11. #define BASE_BAUD (24576000 / 16)
  12. #ifdef CONFIG_SERIAL_DETECT_IRQ
  13. #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
  14. #define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ)
  15. #else
  16. #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
  17. #define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF)
  18. #endif
  19. #define STD_SERIAL_PORT_DEFNS \
  20. { 0, BASE_BAUD, GEMINI_SERIAL_A, 15, STD_COM_FLAGS }, /* ttyS0 */ \
  21. { 0, BASE_BAUD, GEMINI_SERIAL_B, 14, STD_COM_FLAGS }, /* ttyS1 */ \
  22. #ifdef CONFIG_GEMINI_PU32
  23. #define PU32_SERIAL_PORT_DEFNS \
  24. { 0, BASE_BAUD, NULL, 0, STD_COM_FLAGS },
  25. #else
  26. #define PU32_SERIAL_PORT_DEFNS
  27. #endif
  28. #define SERIAL_PORT_DFNS \
  29. STD_SERIAL_PORT_DEFNS \
  30. PU32_SERIAL_PORT_DEFNS
  31. #endif
  32. #endif /* __KERNEL__ */