serial.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * include/asm-mips/dec/serial.h
  3. *
  4. * Definitions common to all DECstation serial devices.
  5. *
  6. * Copyright (C) 2004 Maciej W. Rozycki
  7. *
  8. * Based on bits extracted from drivers/tc/zs.h for which
  9. * the following copyrights apply:
  10. *
  11. * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  12. * Copyright (C) 1996 Paul Mackerras (Paul.Mackerras@cs.anu.edu.au)
  13. * Copyright (C) Harald Koerfgen
  14. *
  15. * This program is free software; you can redistribute it and/or
  16. * modify it under the terms of the GNU General Public License
  17. * as published by the Free Software Foundation; either version
  18. * 2 of the License, or (at your option) any later version.
  19. */
  20. #ifndef __ASM_MIPS_DEC_SERIAL_H
  21. #define __ASM_MIPS_DEC_SERIAL_H
  22. struct dec_serial_hook {
  23. int (*init_channel)(void *handle);
  24. void (*init_info)(void *handle);
  25. void (*rx_char)(unsigned char ch, unsigned char fl);
  26. int (*poll_rx_char)(void *handle);
  27. int (*poll_tx_char)(void *handle, unsigned char ch);
  28. unsigned int cflags;
  29. };
  30. extern int register_dec_serial_hook(unsigned int channel,
  31. struct dec_serial_hook *hook);
  32. extern int unregister_dec_serial_hook(unsigned int channel);
  33. #endif /* __ASM_MIPS_DEC_SERIAL_H */