decserial.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * sercons.c
  3. * choose the right serial device at boot time
  4. *
  5. * triemer 6-SEP-1998
  6. * sercons.c is designed to allow the three different kinds
  7. * of serial devices under the decstation world to co-exist
  8. * in the same kernel. The idea here is to abstract
  9. * the pieces of the drivers that are common to this file
  10. * so that they do not clash at compile time and runtime.
  11. *
  12. * HK 16-SEP-1998 v0.002
  13. * removed the PROM console as this is not a real serial
  14. * device. Added support for PROM console in drivers/char/tty_io.c
  15. * instead. Although it may work to enable more than one
  16. * console device I strongly recommend to use only one.
  17. */
  18. #include <linux/init.h>
  19. #include <asm/dec/machtype.h>
  20. #ifdef CONFIG_ZS
  21. extern int zs_init(void);
  22. #endif
  23. #ifdef CONFIG_SERIAL_CONSOLE
  24. #ifdef CONFIG_ZS
  25. extern void zs_serial_console_init(void);
  26. #endif
  27. #endif
  28. /* rs_init - starts up the serial interface -
  29. handle normal case of starting up the serial interface */
  30. #ifdef CONFIG_SERIAL
  31. int __init rs_init(void)
  32. {
  33. #ifdef CONFIG_ZS
  34. if (IOASIC)
  35. return zs_init();
  36. #endif
  37. return -ENXIO;
  38. }
  39. __initcall(rs_init);
  40. #endif
  41. #ifdef CONFIG_SERIAL_CONSOLE
  42. /* serial_console_init handles the special case of starting
  43. * up the console on the serial port
  44. */
  45. static int __init decserial_console_init(void)
  46. {
  47. #ifdef CONFIG_ZS
  48. if (IOASIC)
  49. zs_serial_console_init();
  50. #endif
  51. return 0;
  52. }
  53. console_initcall(decserial_console_init);
  54. #endif