Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
plx_pci.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/can/dev.h>
#include <linux/io.h>
#include "sja1000.h"

Go to the source code of this file.

Data Structures

struct  plx_pci_card
 
struct  plx_pci_channel_map
 
struct  plx_pci_card_info
 

Macros

#define DRV_NAME   "sja1000_plx_pci"
 
#define PLX_PCI_MAX_CHAN   2
 
#define PLX_PCI_CAN_CLOCK   (16000000 / 2)
 
#define PLX_INTCSR   0x4c /* Interrupt Control/Status */
 
#define PLX_CNTRL
 
#define PLX_LINT1_EN   0x1 /* Local interrupt 1 enable */
 
#define PLX_LINT2_EN   (1 << 3) /* Local interrupt 2 enable */
 
#define PLX_PCI_INT_EN   (1 << 6) /* PCI Interrupt Enable */
 
#define PLX_PCI_RESET   (1 << 30) /* PCI Adapter Software Reset */
 
#define PLX9056_INTCSR   0x68 /* Interrupt Control/Status */
 
#define PLX9056_CNTRL   0x6c /* Control / Software Reset */
 
#define PLX9056_LINTI   (1 << 11)
 
#define PLX9056_PCI_INT_EN   (1 << 8)
 
#define PLX9056_PCI_RCR   (1 << 29) /* Read Configuration Registers */
 
#define PLX_PCI_OCR   (OCR_TX0_PUSHPULL | OCR_TX1_PUSHPULL)
 
#define PLX_PCI_CDR   (CDR_CBP | CDR_CLKOUT_MASK)
 
#define REG_CR   0x00
 
#define REG_CR_BASICCAN_INITIAL   0x21
 
#define REG_CR_BASICCAN_INITIAL_MASK   0xa1
 
#define REG_SR_BASICCAN_INITIAL   0x0c
 
#define REG_IR_BASICCAN_INITIAL   0xe0
 
#define REG_MOD_PELICAN_INITIAL   0x01
 
#define REG_SR_PELICAN_INITIAL   0x3c
 
#define REG_IR_PELICAN_INITIAL   0x00
 
#define ADLINK_PCI_VENDOR_ID   0x144A
 
#define ADLINK_PCI_DEVICE_ID   0x7841
 
#define ESD_PCI_SUB_SYS_ID_PCI200   0x0004
 
#define ESD_PCI_SUB_SYS_ID_PCI266   0x0009
 
#define ESD_PCI_SUB_SYS_ID_PMC266   0x000e
 
#define ESD_PCI_SUB_SYS_ID_CPCI200   0x010b
 
#define ESD_PCI_SUB_SYS_ID_PCIE2000   0x0200
 
#define ESD_PCI_SUB_SYS_ID_PCI104200   0x0501
 
#define IXXAT_PCI_VENDOR_ID   0x10b5
 
#define IXXAT_PCI_DEVICE_ID   0x9050
 
#define IXXAT_PCI_SUB_SYS_ID   0x2540
 
#define MARATHON_PCI_DEVICE_ID   0x2715
 
#define TEWS_PCI_VENDOR_ID   0x1498
 
#define TEWS_PCI_DEVICE_ID_TMPC810   0x032A
 

Functions

 MODULE_AUTHOR ("Pavel Cheblakov <P.B.Cheblakov@inp.nsk.su>")
 
 MODULE_DESCRIPTION ("Socket-CAN driver for PLX90xx PCI-bridge cards with ""the SJA1000 chips")
 
 MODULE_SUPPORTED_DEVICE ("Adlink PCI-7841/cPCI-7841, ""Adlink PCI-7841/cPCI-7841 SE, ""Marathon CAN-bus-PCI, ""TEWS TECHNOLOGIES TPMC810, ""esd CAN-PCI/CPCI/PCI104/200, ""esd CAN-PCI/PMC/266, ""esd CAN-PCIe/2000, ""IXXAT PC-I 04/PCI") MODULE_LICENSE("GPL v2")
 
 MODULE_DEVICE_TABLE (pci, plx_pci_tbl)
 
 module_pci_driver (plx_pci_driver)
 

Macro Definition Documentation

#define ADLINK_PCI_DEVICE_ID   0x7841

Definition at line 113 of file plx_pci.c.

#define ADLINK_PCI_VENDOR_ID   0x144A

Definition at line 112 of file plx_pci.c.

#define DRV_NAME   "sja1000_plx_pci"

Definition at line 35 of file plx_pci.c.

#define ESD_PCI_SUB_SYS_ID_CPCI200   0x010b

Definition at line 118 of file plx_pci.c.

#define ESD_PCI_SUB_SYS_ID_PCI104200   0x0501

Definition at line 120 of file plx_pci.c.

#define ESD_PCI_SUB_SYS_ID_PCI200   0x0004

Definition at line 115 of file plx_pci.c.

#define ESD_PCI_SUB_SYS_ID_PCI266   0x0009

Definition at line 116 of file plx_pci.c.

#define ESD_PCI_SUB_SYS_ID_PCIE2000   0x0200

Definition at line 119 of file plx_pci.c.

#define ESD_PCI_SUB_SYS_ID_PMC266   0x000e

Definition at line 117 of file plx_pci.c.

#define IXXAT_PCI_DEVICE_ID   0x9050

Definition at line 123 of file plx_pci.c.

#define IXXAT_PCI_SUB_SYS_ID   0x2540

Definition at line 124 of file plx_pci.c.

#define IXXAT_PCI_VENDOR_ID   0x10b5

Definition at line 122 of file plx_pci.c.

#define MARATHON_PCI_DEVICE_ID   0x2715

Definition at line 126 of file plx_pci.c.

#define PLX9056_CNTRL   0x6c /* Control / Software Reset */

Definition at line 74 of file plx_pci.c.

#define PLX9056_INTCSR   0x68 /* Interrupt Control/Status */

Definition at line 73 of file plx_pci.c.

#define PLX9056_LINTI   (1 << 11)

Definition at line 76 of file plx_pci.c.

#define PLX9056_PCI_INT_EN   (1 << 8)

Definition at line 77 of file plx_pci.c.

#define PLX9056_PCI_RCR   (1 << 29) /* Read Configuration Registers */

Definition at line 78 of file plx_pci.c.

#define PLX_CNTRL
Value:
0x50 /* User I/O, Direct Slave Response,
* Serial EEPROM, and Initialization
* Control register
*/

Definition at line 65 of file plx_pci.c.

#define PLX_INTCSR   0x4c /* Interrupt Control/Status */

Definition at line 64 of file plx_pci.c.

#define PLX_LINT1_EN   0x1 /* Local interrupt 1 enable */

Definition at line 67 of file plx_pci.c.

#define PLX_LINT2_EN   (1 << 3) /* Local interrupt 2 enable */

Definition at line 68 of file plx_pci.c.

#define PLX_PCI_CAN_CLOCK   (16000000 / 2)

Definition at line 61 of file plx_pci.c.

#define PLX_PCI_CDR   (CDR_CBP | CDR_CLKOUT_MASK)

Definition at line 96 of file plx_pci.c.

#define PLX_PCI_INT_EN   (1 << 6) /* PCI Interrupt Enable */

Definition at line 69 of file plx_pci.c.

#define PLX_PCI_MAX_CHAN   2

Definition at line 50 of file plx_pci.c.

#define PLX_PCI_OCR   (OCR_TX0_PUSHPULL | OCR_TX1_PUSHPULL)

Definition at line 88 of file plx_pci.c.

#define PLX_PCI_RESET   (1 << 30) /* PCI Adapter Software Reset */

Definition at line 70 of file plx_pci.c.

#define REG_CR   0x00

Definition at line 99 of file plx_pci.c.

#define REG_CR_BASICCAN_INITIAL   0x21

Definition at line 102 of file plx_pci.c.

#define REG_CR_BASICCAN_INITIAL_MASK   0xa1

Definition at line 103 of file plx_pci.c.

#define REG_IR_BASICCAN_INITIAL   0xe0

Definition at line 105 of file plx_pci.c.

#define REG_IR_PELICAN_INITIAL   0x00

Definition at line 110 of file plx_pci.c.

#define REG_MOD_PELICAN_INITIAL   0x01

Definition at line 108 of file plx_pci.c.

#define REG_SR_BASICCAN_INITIAL   0x0c

Definition at line 104 of file plx_pci.c.

#define REG_SR_PELICAN_INITIAL   0x3c

Definition at line 109 of file plx_pci.c.

#define TEWS_PCI_DEVICE_ID_TMPC810   0x032A

Definition at line 129 of file plx_pci.c.

#define TEWS_PCI_VENDOR_ID   0x1498

Definition at line 128 of file plx_pci.c.

Function Documentation

MODULE_AUTHOR ( "Pavel Cheblakov <P.B.Cheblakov@inp.nsk.su>"  )
MODULE_DESCRIPTION ( "Socket-CAN driver for PLX90xx PCI-bridge cards with ""the SJA1000 chips )
MODULE_DEVICE_TABLE ( pci  ,
plx_pci_tbl   
)
module_pci_driver ( plx_pci_driver  )
MODULE_SUPPORTED_DEVICE ( "Adlink PCI-7841/cPCI-  7841,
""Adlink PCI-7841/cPCI-7841  SE,
""Marathon CAN-bus PCI,
""TEWS TECHNOLOGIES  TPMC810,
""esd CAN-PCI/CPCI/PCI104/  200,
""esd CAN-PCI/PMC 266,
""esd CAN-PCIe/  2000,
""IXXAT PC-I 04/PCI  
)