Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/netdevice.h>
#include <linux/vmalloc.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/ioctl.h>
#include <linux/termios.h>
#include <linux/bitops.h>
#include <linux/workqueue.h>
#include <linux/hdlc.h>
#include <linux/synclink.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/dma.h>
#include <asm/types.h>
#include <asm/uaccess.h>
Go to the source code of this file.
Data Structures | |
struct | cond_wait |
struct | slgt_desc |
struct | _input_signal_events |
struct | slgt_info |
Macros | |
#define | DBGINFO(fmt) if (debug_level >= DEBUG_LEVEL_INFO) printk fmt |
#define | DBGERR(fmt) if (debug_level >= DEBUG_LEVEL_ERROR) printk fmt |
#define | DBGBH(fmt) if (debug_level >= DEBUG_LEVEL_BH) printk fmt |
#define | DBGISR(fmt) if (debug_level >= DEBUG_LEVEL_ISR) printk fmt |
#define | DBGDATA(info, buf, size, label) if (debug_level >= DEBUG_LEVEL_DATA) trace_block((info), (buf), (size), (label)) |
#define | SYNCLINK_GENERIC_HDLC 0 |
#define | MGSL_MAGIC 0x5401 |
#define | MAX_DEVICES 32 |
#define | SLGT_MAX_PORTS 4 |
#define | SLGT_REG_SIZE 256 |
#define | set_desc_buffer(a, b) (a).pbuf = cpu_to_le32((unsigned int)(b)) |
#define | set_desc_next(a, b) (a).next = cpu_to_le32((unsigned int)(b)) |
#define | set_desc_count(a, b) (a).count = cpu_to_le16((unsigned short)(b)) |
#define | set_desc_eof(a, b) (a).status = cpu_to_le16((b) ? (le16_to_cpu((a).status) | BIT0) : (le16_to_cpu((a).status) & ~BIT0)) |
#define | set_desc_status(a, b) (a).status = cpu_to_le16((unsigned short)(b)) |
#define | desc_count(a) (le16_to_cpu((a).count)) |
#define | desc_status(a) (le16_to_cpu((a).status)) |
#define | desc_complete(a) (le16_to_cpu((a).status) & BIT15) |
#define | desc_eof(a) (le16_to_cpu((a).status) & BIT2) |
#define | desc_crc_error(a) (le16_to_cpu((a).status) & BIT1) |
#define | desc_abort(a) (le16_to_cpu((a).status) & BIT0) |
#define | desc_residue(a) ((le16_to_cpu((a).status) & 0x38) >> 3) |
#define | BH_RECEIVE 1 |
#define | BH_TRANSMIT 2 |
#define | BH_STATUS 4 |
#define | IO_PIN_SHUTDOWN_LIMIT 100 |
#define | DMABUFSIZE 256 |
#define | DESC_LIST_SIZE 4096 |
#define | MASK_PARITY BIT1 |
#define | MASK_FRAMING BIT0 |
#define | MASK_BREAK BIT14 |
#define | MASK_OVERRUN BIT4 |
#define | GSR 0x00 /* global status */ |
#define | JCR 0x04 /* JTAG control */ |
#define | IODR 0x08 /* GPIO direction */ |
#define | IOER 0x0c /* GPIO interrupt enable */ |
#define | IOVR 0x10 /* GPIO value */ |
#define | IOSR 0x14 /* GPIO interrupt status */ |
#define | TDR 0x80 /* tx data */ |
#define | RDR 0x80 /* rx data */ |
#define | TCR 0x82 /* tx control */ |
#define | TIR 0x84 /* tx idle */ |
#define | TPR 0x85 /* tx preamble */ |
#define | RCR 0x86 /* rx control */ |
#define | VCR 0x88 /* V.24 control */ |
#define | CCR 0x89 /* clock control */ |
#define | BDR 0x8a /* baud divisor */ |
#define | SCR 0x8c /* serial control */ |
#define | SSR 0x8e /* serial status */ |
#define | RDCSR 0x90 /* rx DMA control/status */ |
#define | TDCSR 0x94 /* tx DMA control/status */ |
#define | RDDAR 0x98 /* rx DMA descriptor address */ |
#define | TDDAR 0x9c /* tx DMA descriptor address */ |
#define | XSR 0x40 /* extended sync pattern */ |
#define | XCR 0x44 /* extended control */ |
#define | RXIDLE BIT14 |
#define | RXBREAK BIT14 |
#define | IRQ_TXDATA BIT13 |
#define | IRQ_TXIDLE BIT12 |
#define | IRQ_TXUNDER BIT11 /* HDLC */ |
#define | IRQ_RXDATA BIT10 |
#define | IRQ_RXIDLE BIT9 /* HDLC */ |
#define | IRQ_RXBREAK BIT9 /* async */ |
#define | IRQ_RXOVER BIT8 |
#define | IRQ_DSR BIT7 |
#define | IRQ_CTS BIT6 |
#define | IRQ_DCD BIT5 |
#define | IRQ_RI BIT4 |
#define | IRQ_ALL 0x3ff0 |
#define | IRQ_MASTER BIT0 |
#define | slgt_irq_on(info, mask) wr_reg16((info), SCR, (unsigned short)(rd_reg16((info), SCR) | (mask))) |
#define | slgt_irq_off(info, mask) wr_reg16((info), SCR, (unsigned short)(rd_reg16((info), SCR) & ~(mask))) |
#define | DBGTBUF(info) |
#define | DBGRBUF(info) |
#define | slgt_compat_ioctl NULL |
#define | CALC_REGADDR() |
#define | TESTFRAMESIZE 20 |
Functions | |
MODULE_LICENSE ("GPL") | |
MODULE_DEVICE_TABLE (pci, pci_table) | |
module_param (ttymajor, int, 0) | |
module_param (debug_level, int, 0) | |
module_param_array (maxframe, int, NULL, 0) | |
MODULE_PARM_DESC (ttymajor,"TTY major device number override: 0=auto assigned") | |
MODULE_PARM_DESC (debug_level,"Debug syslog output: 0=disabled, 1 to 5=increasing detail") | |
MODULE_PARM_DESC (maxframe,"Maximum frame size used by device (4096 to 65535)") | |
module_init (slgt_init) | |
module_exit (slgt_exit) | |
#define BDR 0x8a /* baud divisor */ |
Definition at line 402 of file synclink_gt.c.
#define BH_RECEIVE 1 |
Definition at line 375 of file synclink_gt.c.
#define BH_STATUS 4 |
Definition at line 377 of file synclink_gt.c.
#define BH_TRANSMIT 2 |
Definition at line 376 of file synclink_gt.c.
#define CALC_REGADDR | ( | ) |
#define CCR 0x89 /* clock control */ |
Definition at line 401 of file synclink_gt.c.
#define DBGBH | ( | fmt | ) | if (debug_level >= DEBUG_LEVEL_BH) printk fmt |
Definition at line 40 of file synclink_gt.c.
#define DBGDATA | ( | info, | |
buf, | |||
size, | |||
label | |||
) | if (debug_level >= DEBUG_LEVEL_DATA) trace_block((info), (buf), (size), (label)) |
Definition at line 42 of file synclink_gt.c.
#define DBGERR | ( | fmt | ) | if (debug_level >= DEBUG_LEVEL_ERROR) printk fmt |
Definition at line 39 of file synclink_gt.c.
#define DBGINFO | ( | fmt | ) | if (debug_level >= DEBUG_LEVEL_INFO) printk fmt |
Definition at line 38 of file synclink_gt.c.
#define DBGISR | ( | fmt | ) | if (debug_level >= DEBUG_LEVEL_ISR) printk fmt |
Definition at line 41 of file synclink_gt.c.
#define DBGRBUF | ( | info | ) |
Definition at line 604 of file synclink_gt.c.
#define DBGTBUF | ( | info | ) |
Definition at line 590 of file synclink_gt.c.
#define desc_abort | ( | a | ) | (le16_to_cpu((a).status) & BIT0) |
Definition at line 222 of file synclink_gt.c.
#define desc_complete | ( | a | ) | (le16_to_cpu((a).status) & BIT15) |
Definition at line 219 of file synclink_gt.c.
#define desc_count | ( | a | ) | (le16_to_cpu((a).count)) |
Definition at line 217 of file synclink_gt.c.
#define desc_crc_error | ( | a | ) | (le16_to_cpu((a).status) & BIT1) |
Definition at line 221 of file synclink_gt.c.
#define desc_eof | ( | a | ) | (le16_to_cpu((a).status) & BIT2) |
Definition at line 220 of file synclink_gt.c.
#define DESC_LIST_SIZE 4096 |
Definition at line 381 of file synclink_gt.c.
#define desc_residue | ( | a | ) | ((le16_to_cpu((a).status) & 0x38) >> 3) |
Definition at line 223 of file synclink_gt.c.
#define desc_status | ( | a | ) | (le16_to_cpu((a).status)) |
Definition at line 218 of file synclink_gt.c.
#define DMABUFSIZE 256 |
Definition at line 380 of file synclink_gt.c.
#define GSR 0x00 /* global status */ |
Definition at line 388 of file synclink_gt.c.
#define IO_PIN_SHUTDOWN_LIMIT 100 |
Definition at line 378 of file synclink_gt.c.
#define IODR 0x08 /* GPIO direction */ |
Definition at line 390 of file synclink_gt.c.
#define IOER 0x0c /* GPIO interrupt enable */ |
Definition at line 391 of file synclink_gt.c.
#define IOSR 0x14 /* GPIO interrupt status */ |
Definition at line 393 of file synclink_gt.c.
#define IOVR 0x10 /* GPIO value */ |
Definition at line 392 of file synclink_gt.c.
#define IRQ_ALL 0x3ff0 |
Definition at line 425 of file synclink_gt.c.
#define IRQ_CTS BIT6 |
Definition at line 422 of file synclink_gt.c.
#define IRQ_DCD BIT5 |
Definition at line 423 of file synclink_gt.c.
#define IRQ_DSR BIT7 |
Definition at line 421 of file synclink_gt.c.
#define IRQ_MASTER BIT0 |
Definition at line 426 of file synclink_gt.c.
#define IRQ_RI BIT4 |
Definition at line 424 of file synclink_gt.c.
Definition at line 419 of file synclink_gt.c.
#define IRQ_RXDATA BIT10 |
Definition at line 417 of file synclink_gt.c.
#define IRQ_RXIDLE BIT9 /* HDLC */ |
Definition at line 418 of file synclink_gt.c.
#define IRQ_RXOVER BIT8 |
Definition at line 420 of file synclink_gt.c.
#define IRQ_TXDATA BIT13 |
Definition at line 414 of file synclink_gt.c.
#define IRQ_TXIDLE BIT12 |
Definition at line 415 of file synclink_gt.c.
#define IRQ_TXUNDER BIT11 /* HDLC */ |
Definition at line 416 of file synclink_gt.c.
#define JCR 0x04 /* JTAG control */ |
Definition at line 389 of file synclink_gt.c.
#define MASK_BREAK BIT14 |
Definition at line 385 of file synclink_gt.c.
#define MASK_FRAMING BIT0 |
Definition at line 384 of file synclink_gt.c.
#define MASK_OVERRUN BIT4 |
Definition at line 386 of file synclink_gt.c.
#define MASK_PARITY BIT1 |
Definition at line 383 of file synclink_gt.c.
#define MAX_DEVICES 32 |
Definition at line 96 of file synclink_gt.c.
#define MGSL_MAGIC 0x5401 |
Definition at line 95 of file synclink_gt.c.
#define RCR 0x86 /* rx control */ |
Definition at line 399 of file synclink_gt.c.
#define RDCSR 0x90 /* rx DMA control/status */ |
Definition at line 405 of file synclink_gt.c.
#define RDDAR 0x98 /* rx DMA descriptor address */ |
Definition at line 407 of file synclink_gt.c.
#define RDR 0x80 /* rx data */ |
Definition at line 395 of file synclink_gt.c.
#define RXBREAK BIT14 |
Definition at line 413 of file synclink_gt.c.
#define RXIDLE BIT14 |
Definition at line 412 of file synclink_gt.c.
#define SCR 0x8c /* serial control */ |
Definition at line 403 of file synclink_gt.c.
Definition at line 212 of file synclink_gt.c.
Definition at line 214 of file synclink_gt.c.
#define set_desc_eof | ( | a, | |
b | |||
) | (a).status = cpu_to_le16((b) ? (le16_to_cpu((a).status) | BIT0) : (le16_to_cpu((a).status) & ~BIT0)) |
Definition at line 215 of file synclink_gt.c.
Definition at line 213 of file synclink_gt.c.
Definition at line 216 of file synclink_gt.c.
#define slgt_compat_ioctl NULL |
Definition at line 1248 of file synclink_gt.c.
#define slgt_irq_off | ( | info, | |
mask | |||
) | wr_reg16((info), SCR, (unsigned short)(rd_reg16((info), SCR) & ~(mask))) |
Definition at line 430 of file synclink_gt.c.
#define slgt_irq_on | ( | info, | |
mask | |||
) | wr_reg16((info), SCR, (unsigned short)(rd_reg16((info), SCR) | (mask))) |
Definition at line 428 of file synclink_gt.c.
#define SLGT_MAX_PORTS 4 |
Definition at line 178 of file synclink_gt.c.
#define SLGT_REG_SIZE 256 |
Definition at line 179 of file synclink_gt.c.
#define SSR 0x8e /* serial status */ |
Definition at line 404 of file synclink_gt.c.
#define SYNCLINK_GENERIC_HDLC 0 |
Definition at line 85 of file synclink_gt.c.
#define TCR 0x82 /* tx control */ |
Definition at line 396 of file synclink_gt.c.
#define TDCSR 0x94 /* tx DMA control/status */ |
Definition at line 406 of file synclink_gt.c.
#define TDDAR 0x9c /* tx DMA descriptor address */ |
Definition at line 408 of file synclink_gt.c.
#define TDR 0x80 /* tx data */ |
Definition at line 394 of file synclink_gt.c.
#define TESTFRAMESIZE 20 |
#define TIR 0x84 /* tx idle */ |
Definition at line 397 of file synclink_gt.c.
#define TPR 0x85 /* tx preamble */ |
Definition at line 398 of file synclink_gt.c.
#define VCR 0x88 /* V.24 control */ |
Definition at line 400 of file synclink_gt.c.
#define XCR 0x44 /* extended control */ |
Definition at line 410 of file synclink_gt.c.
#define XSR 0x40 /* extended sync pattern */ |
Definition at line 409 of file synclink_gt.c.
MODULE_DEVICE_TABLE | ( | pci | , |
pci_table | |||
) |
module_exit | ( | slgt_exit | ) |
module_init | ( | slgt_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_param | ( | ttymajor | , |
int | , | ||
0 | |||
) |
module_param | ( | debug_level | , |
int | , | ||
0 | |||
) |
MODULE_PARM_DESC | ( | ttymajor | ) |
MODULE_PARM_DESC | ( | debug_level | , |
"Debug syslog output: | 0 = disabled |
||
) |