gemini_serial.h 1.1 KB

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