aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/decserial.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/char/decserial.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/char/decserial.c')
-rw-r--r--drivers/char/decserial.c100
1 files changed, 100 insertions, 0 deletions
diff --git a/drivers/char/decserial.c b/drivers/char/decserial.c
new file mode 100644
index 000000000000..aa1440934e95
--- /dev/null
+++ b/drivers/char/decserial.c
@@ -0,0 +1,100 @@
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
19#include <linux/config.h>
20#include <linux/init.h>
21#include <asm/dec/machtype.h>
22
23#ifdef CONFIG_ZS
24extern int zs_init(void);
25#endif
26
27#ifdef CONFIG_DZ
28extern int dz_init(void);
29#endif
30
31#ifdef CONFIG_SERIAL_CONSOLE
32
33#ifdef CONFIG_ZS
34extern void zs_serial_console_init(void);
35#endif
36
37#ifdef CONFIG_DZ
38extern void dz_serial_console_init(void);
39#endif
40
41#endif
42
43/* rs_init - starts up the serial interface -
44 handle normal case of starting up the serial interface */
45
46#ifdef CONFIG_SERIAL
47
48int __init rs_init(void)
49{
50
51#if defined(CONFIG_ZS) && defined(CONFIG_DZ)
52 if (IOASIC)
53 return zs_init();
54 else
55 return dz_init();
56#else
57
58#ifdef CONFIG_ZS
59 return zs_init();
60#endif
61
62#ifdef CONFIG_DZ
63 return dz_init();
64#endif
65
66#endif
67}
68
69__initcall(rs_init);
70
71#endif
72
73#ifdef CONFIG_SERIAL_CONSOLE
74
75/* serial_console_init handles the special case of starting
76 * up the console on the serial port
77 */
78static int __init decserial_console_init(void)
79{
80#if defined(CONFIG_ZS) && defined(CONFIG_DZ)
81 if (IOASIC)
82 zs_serial_console_init();
83 else
84 dz_serial_console_init();
85#else
86
87#ifdef CONFIG_ZS
88 zs_serial_console_init();
89#endif
90
91#ifdef CONFIG_DZ
92 dz_serial_console_init();
93#endif
94
95#endif
96 return 0;
97}
98console_initcall(decserial_console_init);
99
100#endif