Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
pdc_adma.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/gfp.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
#include <linux/libata.h>

Go to the source code of this file.

Data Structures

struct  adma_port_priv
 

Macros

#define DRV_NAME   "pdc_adma"
 
#define DRV_VERSION   "1.0"
 
#define ADMA_ATA_REGS(base, port_no)   ((base) + ((port_no) * 0x40))
 
#define ADMA_REGS(base, port_no)   ((base) + 0x80 + ((port_no) * 0x20))
 
#define ADMA_PORT_REGS(ap)   ADMA_REGS((ap)->host->iomap[ADMA_MMIO_BAR], ap->port_no)
 

Enumerations

enum  {
  ADMA_MMIO_BAR = 4, ADMA_PORTS = 2, ADMA_CPB_BYTES = 40, ADMA_PRD_BYTES = LIBATA_MAX_PRD * 16,
  ADMA_PKT_BYTES = ADMA_CPB_BYTES + ADMA_PRD_BYTES, ADMA_DMA_BOUNDARY = 0xffffffff, ADMA_MODE_LOCK = 0x00c7, ADMA_CONTROL = 0x0000,
  ADMA_STATUS = 0x0002, ADMA_CPB_COUNT = 0x0004, ADMA_CPB_CURRENT = 0x000c, ADMA_CPB_NEXT = 0x000c,
  ADMA_CPB_LOOKUP = 0x0010, ADMA_FIFO_IN = 0x0014, ADMA_FIFO_OUT = 0x0016, aNIEN = (1 << 8),
  aGO = (1 << 7), aRSTADM = (1 << 5), aPIOMD4 = 0x0003, aPSD = (1 << 6),
  aUIRQ = (1 << 4), aPERR = (1 << 0), cDONE = (1 << 0), cATERR = (1 << 3),
  cVLD = (1 << 0), cDAT = (1 << 2), cIEN = (1 << 3), pORD = (1 << 4),
  pDIRO = (1 << 5), pEND = (1 << 7), rIGN = (1 << 5), rEND = (1 << 7),
  ADMA_REGS_CONTROL = 0x0e, ADMA_REGS_SECTOR_COUNT = 0x12, ADMA_REGS_LBA_LOW = 0x13, ADMA_REGS_LBA_MID = 0x14,
  ADMA_REGS_LBA_HIGH = 0x15, ADMA_REGS_DEVICE = 0x16, ADMA_REGS_COMMAND = 0x17, board_1841_idx = 0
}
 
enum  adma_state_t { adma_state_idle, adma_state_pkt, adma_state_mmio }
 

Functions

 module_pci_driver (adma_ata_pci_driver)
 
 MODULE_AUTHOR ("Mark Lord")
 
 MODULE_DESCRIPTION ("Pacific Digital Corporation ADMA low-level driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (pci, adma_ata_pci_tbl)
 
 MODULE_VERSION (DRV_VERSION)
 

Macro Definition Documentation

#define ADMA_ATA_REGS (   base,
  port_no 
)    ((base) + ((port_no) * 0x40))

Definition at line 51 of file pdc_adma.c.

#define ADMA_PORT_REGS (   ap)    ADMA_REGS((ap)->host->iomap[ADMA_MMIO_BAR], ap->port_no)

Definition at line 57 of file pdc_adma.c.

#define ADMA_REGS (   base,
  port_no 
)    ((base) + 0x80 + ((port_no) * 0x20))

Definition at line 54 of file pdc_adma.c.

#define DRV_NAME   "pdc_adma"

Definition at line 47 of file pdc_adma.c.

#define DRV_VERSION   "1.0"

Definition at line 48 of file pdc_adma.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
ADMA_MMIO_BAR 
ADMA_PORTS 
ADMA_CPB_BYTES 
ADMA_PRD_BYTES 
ADMA_PKT_BYTES 
ADMA_DMA_BOUNDARY 
ADMA_MODE_LOCK 
ADMA_CONTROL 
ADMA_STATUS 
ADMA_CPB_COUNT 
ADMA_CPB_CURRENT 
ADMA_CPB_NEXT 
ADMA_CPB_LOOKUP 
ADMA_FIFO_IN 
ADMA_FIFO_OUT 
aNIEN 
aGO 
aRSTADM 
aPIOMD4 
aPSD 
aUIRQ 
aPERR 
cDONE 
cATERR 
cVLD 
cDAT 
cIEN 
pORD 
pDIRO 
pEND 
rIGN 
rEND 
ADMA_REGS_CONTROL 
ADMA_REGS_SECTOR_COUNT 
ADMA_REGS_LBA_LOW 
ADMA_REGS_LBA_MID 
ADMA_REGS_LBA_HIGH 
ADMA_REGS_DEVICE 
ADMA_REGS_COMMAND 
board_1841_idx 

Definition at line 60 of file pdc_adma.c.

Enumerator:
adma_state_idle 
adma_state_pkt 
adma_state_mmio 

Definition at line 124 of file pdc_adma.c.

Function Documentation

MODULE_AUTHOR ( "Mark Lord"  )
MODULE_DESCRIPTION ( "Pacific Digital Corporation ADMA low-level driver )
MODULE_DEVICE_TABLE ( pci  ,
adma_ata_pci_tbl   
)
MODULE_LICENSE ( "GPL"  )
module_pci_driver ( adma_ata_pci_driver  )
MODULE_VERSION ( DRV_VERSION  )