Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mxser.c File Reference
#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/tty.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
#include <linux/serial_reg.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/delay.h>
#include <linux/pci.h>
#include <linux/bitops.h>
#include <linux/slab.h>
#include <linux/ratelimit.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include "mxser.h"

Go to the source code of this file.

Data Structures

struct  mxser_cardinfo
 
struct  mxser_log
 
struct  mxser_mon
 
struct  mxser_mon_ext
 
struct  mxser_port
 
struct  mxser_board
 
struct  mxser_mstatus
 

Macros

#define MXSER_VERSION   "2.0.5" /* 1.14 */
 
#define MXSERMAJOR   174
 
#define MXSER_BOARDS   4 /* Max. boards */
 
#define MXSER_PORTS_PER_BOARD   8 /* Max. ports per board */
 
#define MXSER_PORTS   (MXSER_BOARDS * MXSER_PORTS_PER_BOARD)
 
#define MXSER_ISR_PASS_LIMIT   100
 
#define MOXA_OTHER_UART   0x00
 
#define MOXA_MUST_MU150_HWID   0x01
 
#define MOXA_MUST_MU860_HWID   0x02
 
#define WAKEUP_CHARS   256
 
#define UART_MCR_AFE   0x20
 
#define UART_LSR_SPECIAL   0x1E
 
#define PCI_DEVICE_ID_POS104UL   0x1044
 
#define PCI_DEVICE_ID_CB108   0x1080
 
#define PCI_DEVICE_ID_CP102UF   0x1023
 
#define PCI_DEVICE_ID_CP112UL   0x1120
 
#define PCI_DEVICE_ID_CB114   0x1142
 
#define PCI_DEVICE_ID_CP114UL   0x1143
 
#define PCI_DEVICE_ID_CB134I   0x1341
 
#define PCI_DEVICE_ID_CP138U   0x1380
 
#define C168_ASIC_ID   1
 
#define C104_ASIC_ID   2
 
#define C102_ASIC_ID   0xB
 
#define CI132_ASIC_ID   4
 
#define CI134_ASIC_ID   3
 
#define CI104J_ASIC_ID   5
 
#define MXSER_HIGHBAUD   1
 
#define MXSER_HAS2   2
 
#define UART_INFO_NUM   ARRAY_SIZE(Gpci_uart_info)
 
#define CHIP_SK   0x01 /* Serial Data Clock in Eprom */
 
#define CHIP_DO   0x02 /* Serial Data Output in Eprom */
 
#define CHIP_CS   0x04 /* Serial Chip Select in Eprom */
 
#define CHIP_DI   0x08 /* Serial Data Input in Eprom */
 
#define EN_CCMD   0x000 /* Chip's command register */
 
#define EN0_RSARLO   0x008 /* Remote start address reg 0 */
 
#define EN0_RSARHI   0x009 /* Remote start address reg 1 */
 
#define EN0_RCNTLO   0x00A /* Remote byte count reg WR */
 
#define EN0_RCNTHI   0x00B /* Remote byte count reg WR */
 
#define EN0_DCFG   0x00E /* Data configuration reg WR */
 
#define EN0_PORT   0x010 /* Rcv missed frame error counter RD */
 
#define ENC_PAGE0   0x000 /* Select page 0 of chip registers */
 
#define ENC_PAGE3   0x0C0 /* Select page 3 of chip registers */
 

Functions

 MODULE_DEVICE_TABLE (pci, mxser_pcibrds)
 
 MODULE_AUTHOR ("Casper Yang")
 
 MODULE_DESCRIPTION ("MOXA Smartio/Industio Family Multiport Board Device Driver")
 
 module_param_array (ioaddr, ulong, NULL, 0)
 
 MODULE_PARM_DESC (ioaddr,"ISA io addresses to look for a moxa board")
 
 module_param (ttymajor, int, 0)
 
 MODULE_LICENSE ("GPL")
 
 module_param (allow_overlapping_vector, bool, S_IRUGO)
 
 MODULE_PARM_DESC (allow_overlapping_vector,"whether we allow ISA cards to be configured such that vector overlabs IO ports (default=no)")
 
 module_init (mxser_module_init)
 
 module_exit (mxser_module_exit)
 

Macro Definition Documentation

#define C102_ASIC_ID   0xB

Definition at line 80 of file mxser.c.

#define C104_ASIC_ID   2

Definition at line 79 of file mxser.c.

#define C168_ASIC_ID   1

Definition at line 78 of file mxser.c.

#define CHIP_CS   0x04 /* Serial Chip Select in Eprom */

Definition at line 1434 of file mxser.c.

#define CHIP_DI   0x08 /* Serial Data Input in Eprom */

Definition at line 1435 of file mxser.c.

#define CHIP_DO   0x02 /* Serial Data Output in Eprom */

Definition at line 1433 of file mxser.c.

#define CHIP_SK   0x01 /* Serial Data Clock in Eprom */

Definition at line 1432 of file mxser.c.

#define CI104J_ASIC_ID   5

Definition at line 83 of file mxser.c.

#define CI132_ASIC_ID   4

Definition at line 81 of file mxser.c.

#define CI134_ASIC_ID   3

Definition at line 82 of file mxser.c.

#define EN0_DCFG   0x00E /* Data configuration reg WR */

Definition at line 1441 of file mxser.c.

#define EN0_PORT   0x010 /* Rcv missed frame error counter RD */

Definition at line 1442 of file mxser.c.

#define EN0_RCNTHI   0x00B /* Remote byte count reg WR */

Definition at line 1440 of file mxser.c.

#define EN0_RCNTLO   0x00A /* Remote byte count reg WR */

Definition at line 1439 of file mxser.c.

#define EN0_RSARHI   0x009 /* Remote start address reg 1 */

Definition at line 1438 of file mxser.c.

#define EN0_RSARLO   0x008 /* Remote start address reg 0 */

Definition at line 1437 of file mxser.c.

#define EN_CCMD   0x000 /* Chip's command register */

Definition at line 1436 of file mxser.c.

#define ENC_PAGE0   0x000 /* Select page 0 of chip registers */

Definition at line 1443 of file mxser.c.

#define ENC_PAGE3   0x0C0 /* Select page 3 of chip registers */

Definition at line 1444 of file mxser.c.

#define MOXA_MUST_MU150_HWID   0x01

Definition at line 60 of file mxser.c.

#define MOXA_MUST_MU860_HWID   0x02

Definition at line 61 of file mxser.c.

#define MOXA_OTHER_UART   0x00

Definition at line 59 of file mxser.c.

#define MXSER_BOARDS   4 /* Max. boards */

Definition at line 53 of file mxser.c.

#define MXSER_HAS2   2

Definition at line 86 of file mxser.c.

#define MXSER_HIGHBAUD   1

Definition at line 85 of file mxser.c.

#define MXSER_ISR_PASS_LIMIT   100

Definition at line 56 of file mxser.c.

#define MXSER_PORTS   (MXSER_BOARDS * MXSER_PORTS_PER_BOARD)

Definition at line 55 of file mxser.c.

#define MXSER_PORTS_PER_BOARD   8 /* Max. ports per board */

Definition at line 54 of file mxser.c.

#define MXSER_VERSION   "2.0.5" /* 1.14 */

Definition at line 50 of file mxser.c.

#define MXSERMAJOR   174

Definition at line 51 of file mxser.c.

#define PCI_DEVICE_ID_CB108   0x1080

Definition at line 69 of file mxser.c.

#define PCI_DEVICE_ID_CB114   0x1142

Definition at line 72 of file mxser.c.

#define PCI_DEVICE_ID_CB134I   0x1341

Definition at line 74 of file mxser.c.

#define PCI_DEVICE_ID_CP102UF   0x1023

Definition at line 70 of file mxser.c.

#define PCI_DEVICE_ID_CP112UL   0x1120

Definition at line 71 of file mxser.c.

#define PCI_DEVICE_ID_CP114UL   0x1143

Definition at line 73 of file mxser.c.

#define PCI_DEVICE_ID_CP138U   0x1380

Definition at line 75 of file mxser.c.

#define PCI_DEVICE_ID_POS104UL   0x1044

Definition at line 68 of file mxser.c.

#define UART_INFO_NUM   ARRAY_SIZE(Gpci_uart_info)

Definition at line 103 of file mxser.c.

#define UART_LSR_SPECIAL   0x1E

Definition at line 66 of file mxser.c.

#define UART_MCR_AFE   0x20

Definition at line 65 of file mxser.c.

#define WAKEUP_CHARS   256

Definition at line 63 of file mxser.c.

Function Documentation

MODULE_AUTHOR ( "Casper Yang"  )
MODULE_DESCRIPTION ( "MOXA Smartio/Industio Family Multiport Board Device Driver"  )
MODULE_DEVICE_TABLE ( pci  ,
mxser_pcibrds   
)
module_exit ( mxser_module_exit  )
module_init ( mxser_module_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( ttymajor  ,
int  ,
 
)
module_param ( allow_overlapping_vector  ,
bool  ,
S_IRUGO   
)
module_param_array ( ioaddr  ,
ulong  ,
NULL  ,
 
)
MODULE_PARM_DESC ( ioaddr  ,
"ISA io addresses to look for a moxa board  
)
MODULE_PARM_DESC ( allow_overlapping_vector  ,
"whether we allow ISA cards to be configured such that vector overlabs IO ports (default=no)"   
)

Variable Documentation

long max_baud

Definition at line 97 of file mxser.c.

int rx_fifo

Definition at line 92 of file mxser.c.

int rx_high_water

Definition at line 94 of file mxser.c.

int rx_low_water

Definition at line 96 of file mxser.c.

int rx_trigger

Definition at line 95 of file mxser.c.

Definition at line 91 of file mxser.c.

Definition at line 90 of file mxser.c.

int xmit_fifo_size

Definition at line 93 of file mxser.c.