⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 serial_s3c44b0x.h

📁 S3C44B0x串行口驱动,支持两个UART口
💻 H
字号:
/* * drivers/char/serial_s3c44b0x.h *  * Serial port driver for the Samsung S3C44B0X builtin UART * * Copyright (c) 2003 sympat GmbH * 	by Thomas Eschenbacher <thomas.eschenbacher@gmx.de> * * Based on: drivers/char/serial_s3c3410.h * Copyright (c) 2001, 2002  Arcturus Networks Inc. * 	by Oleksandr Zhadan <oleks@arcturusnetworks.com> * * Based on: drivers/char/trioserial.h * Copyright (c) 1998  Kenneth Albanowski <kjahds@kjahds.com>, *                     D. Jeff Dionne <jeff@arcturusnetworks.com>, *                     The Silver Hammer Group, Ltd. * * Based on: drivers/char/68328serial.h * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * */#ifndef __S3C44B0X_SERIAL_H#define __S3C44B0X_SERIAL_H#include <linux/config.h>#include <asm/ioctl.h>#include <asm/types.h>#include <asm/page.h>#include <asm/arch/hardware.h>/* * For the close wait times, 0 means wait forever for serial port to * flush its output.  65535 means don't wait at all. */#define S_CLOSING_WAIT_INF	0#define S_CLOSING_WAIT_NONE	65535/* * Definitions for S_struct (and serial_struct) flags field */#define S_HUP_NOTIFY 	  0x0001 /* Notify getty on hangups and closes 				    on the callout port */#define S_FOURPORT  	  0x0002 /* Set OU1, OUT2 per AST Fourport settings */#define S_SAK		  0x0004 /* Secure Attention Key (Orange book) */#define S_SPLIT_TERMIOS   0x0008 /* Separate termios for dialin/callout */#define S_SPD_MASK	  0x0030#define S_SPD_HI	  0x0010 /* Use 56000 instead of 38400 bps */#define S_SPD_VHI	  0x0020 /* Use 115200 instead of 38400 bps */#define S_SPD_CUST	  0x0030 /* Use user-specified divisor */#define S_SKIP_TEST	  0x0040 /* Skip UART test during autoconfiguration */#define S_AUTO_IRQ  	  0x0080 /* Do automatic IRQ during autoconfiguration */#define S_SESSION_LOCKOUT 0x0100 /* Lock out cua opens based on session */#define S_PGRP_LOCKOUT    0x0200 /* Lock out cua opens based on pgrp */#define S_CALLOUT_NOHUP   0x0400 /* Don't do hangups for cua device */#define S_FLAGS		  0x0FFF /* Possible legal S flags */#define S_USR_MASK 	  0x0430 /* Legal flags that non-privileged				    users can set or reset *//* Internal flags used only by kernel/chr_drv/serial.c */#define S_INITIALIZED		0x80000000 /* Serial port was initialized */#define S_CALLOUT_ACTIVE	0x40000000 /* Call out device is active */#define S_NORMAL_ACTIVE		0x20000000 /* Normal device is active */#define S_BOOT_AUTOCONF		0x10000000 /* Autoconfigure port on bootup */#define S_CLOSING		0x08000000 /* Serial port is closing */#define S_CTS_FLOW		0x04000000 /* Do CTS flow control */#define S_CHECK_CD		0x02000000 /* i.e., CLOCAL *//* Software state per channel *//* * This is our internal structure for each serial port's state. *  * Many fields are paralleled by the structure used by the serial_struct * structure. * * For definitions of the flags field, see tty.h *//* possible values for the ioctl */typedef enum {  SERIAL_MODE_NONE,          /**< disable serial-mode */  SERIAL_MODE_RS422,         /**< RS422 full-duplex (standard mode) */  SERIAL_MODE_RS422_LISTEN,  /**< RS422 with echo on RxD */  SERIAL_MODE_RS485_ECHO,    /**< RS485 with echo (standard mode) */	SERIAL_MODE_RS485_NO_ECHO, /**< RS485 without echo */	SERIAL_MODE_DEFAULT	   /**< Default mode */} serial_mode_t; /* IOCTL definitions */#define TIOSERMODE _IOW('T', 0x01, serial_mode_t)struct s3c44b0x_serial {	char soft_carrier;  /* Use soft carrier on this channel */	char break_abort;   /* Is serial console in, so process brk/abrt */	char is_cons;       /* Is this our console. */	/* We need to know the current clock divisor	 * to read the bps rate the chip has currently	 * loaded.	 */	unsigned char clk_divisor;  /* May be 1, 16, 32, or 64 */	int 			baud;	int			magic;	int			baud_base;	int			port;	int			irq;	int			irq_rx;	int			irqmask;	int			flags; 		/* defined in tty.h */	int			type; 		/* UART type */	int			use_ints;	int			cts_state;	struct tty_struct 	*tty;	int			read_status_mask;	int			ignore_status_mask;	int			timeout;	int			xmit_fifo_size;	int			rx_fifo_size;	int			custom_divisor;	int			x_char;	/* xon/xoff character */	int			close_delay;	unsigned short		closing_wait;	unsigned short		closing_wait2;	unsigned long		event;	unsigned long		last_active;	int			line;	int			count;	    /* # of fd on device */	int			blocked_open; /* # of blocked opens */	long			session; /* Session of opening process */	long			pgrp; /* pgrp of opening process */	unsigned char 		*xmit_buf;	int			xmit_head;	int			xmit_tail;	int			xmit_cnt;	struct tq_struct	tqueue;	struct tq_struct	tqueue_hangup;	struct termios		normal_termios;	struct termios		callout_termios;	wait_queue_head_t	open_wait;	wait_queue_head_t	close_wait;	int			uart_offset; /* offset to next uart */	serial_mode_t 		ser_mode; /*  mode in which the driver runs */};/* typedef to correlate a serial speed with its cflags - type handle: */typedef struct{  int rate;  int cflag;} s3c_baud_table_t;#define RS_EVENT_WRITE_WAKEUP   0#define SERIAL_MAGIC 0x5301#endif /* !(__S3C44B0X_SERIAL_H) */

⌨️ 快捷键说明

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