serial.c

来自「Linux内核源代码 为压缩文件 是<<Linux内核>&gt」· C语言 代码 · 共 99 行

C
99
字号
/* * sercons.c *      choose the right serial device at boot time * * triemer 6-SEP-1998 *      sercons.c is designed to allow the three different kinds  *      of serial devices under the decstation world to co-exist *      in the same kernel.  The idea here is to abstract  *      the pieces of the drivers that are common to this file *      so that they do not clash at compile time and runtime. * * HK 16-SEP-1998 v0.002 *      removed the PROM console as this is not a real serial *      device. Added support for PROM console in drivers/char/tty_io.c *      instead. Although it may work to enable more than one  *      console device I strongly recommend to use only one. */#include <linux/config.h>#include <linux/init.h>#include <asm/dec/machtype.h>#ifdef CONFIG_ZSextern int zs_init(void);#endif#ifdef CONFIG_DZextern int dz_init(void);#endif#ifdef CONFIG_SERIAL_CONSOLE#ifdef CONFIG_ZSextern void zs_serial_console_init(void);#endif#ifdef CONFIG_DZextern void dz_serial_console_init(void);#endif#endif/* rs_init - starts up the serial interface -   handle normal case of starting up the serial interface */#ifdef CONFIG_SERIALint __init rs_init(void){#if defined(CONFIG_ZS) && defined(CONFIG_DZ)    if (IOASIC)	return zs_init();    else	return dz_init();#else#ifdef CONFIG_ZS    return zs_init();#endif#ifdef CONFIG_DZ    return dz_init();#endif#endif}__initcall(rs_init);#endif#ifdef CONFIG_SERIAL_CONSOLE/* serial_console_init handles the special case of starting *   up the console on the serial port */void __init serial_console_init(void){#if defined(CONFIG_ZS) && defined(CONFIG_DZ)    if (IOASIC)	zs_serial_console_init();    else	dz_serial_console_init();#else#ifdef CONFIG_ZS    zs_serial_console_init();#endif#ifdef CONFIG_DZ    dz_serial_console_init();#endif#endif}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?