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

Go to the source code of this file.

Data Structures

struct  atp867x_priv
 

Macros

#define DRV_NAME   "pata_atp867x"
 
#define DRV_VERSION   "0.7.5"
 
#define ATP867X_IOBASE(ap)   ((ap)->host->iomap[0])
 
#define ATP867X_SYS_INFO(ap)   (0x3F + ATP867X_IOBASE(ap))
 
#define ATP867X_IO_PORTBASE(ap, port)
 
#define ATP867X_IO_DMABASE(ap, port)
 
#define ATP867X_IO_STATUS(ap, port)
 
#define ATP867X_IO_ALTSTATUS(ap, port)
 
#define ATP867X_IO_MSTRPIOSPD(ap, port)
 
#define ATP867X_IO_SLAVPIOSPD(ap, port)
 
#define ATP867X_IO_8BPIOSPD(ap, port)
 
#define ATP867X_IO_DMAMODE(ap, port)
 
#define ATP867X_IO_PORTSPD(ap, port)
 
#define ATP867X_IO_PREREAD(ap, port)
 

Enumerations

enum  {
  ATP867X_IO_CHANNEL_OFFSET = 0x10, ATP867X_IO_PIOSPD_ACTIVE_SHIFT = 4, ATP867X_IO_PIOSPD_RECOVER_SHIFT = 0, ATP867X_IO_DMAMODE_MSTR_SHIFT = 0,
  ATP867X_IO_DMAMODE_MSTR_MASK = 0x07, ATP867X_IO_DMAMODE_SLAVE_SHIFT = 4, ATP867X_IO_DMAMODE_SLAVE_MASK = 0x70, ATP867X_IO_DMAMODE_UDMA_6 = 0x07,
  ATP867X_IO_DMAMODE_UDMA_5 = 0x06, ATP867X_IO_DMAMODE_UDMA_4 = 0x05, ATP867X_IO_DMAMODE_UDMA_3 = 0x04, ATP867X_IO_DMAMODE_UDMA_2 = 0x03,
  ATP867X_IO_DMAMODE_UDMA_1 = 0x02, ATP867X_IO_DMAMODE_UDMA_0 = 0x01, ATP867X_IO_DMAMODE_DISABLE = 0x00, ATP867X_IO_SYS_INFO_66MHZ = 0x04,
  ATP867X_IO_SYS_INFO_SLOW_UDMA5 = 0x02, ATP867X_IO_SYS_MASK_RESERVED = (~0xf1), ATP867X_IO_PORTSPD_VAL = 0x1143, ATP867X_PREREAD_VAL = 0x0200,
  ATP867X_NUM_PORTS = 4, ATP867X_BAR_IOBASE = 0, ATP867X_BAR_ROMBASE = 6
}
 

Functions

 module_pci_driver (atp867x_driver)
 
 MODULE_AUTHOR ("John(Jung-Ik) Lee, Google Inc.")
 
 MODULE_DESCRIPTION ("low level driver for Artop/Acard 867x ATA controller")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (pci, atp867x_pci_tbl)
 
 MODULE_VERSION (DRV_VERSION)
 

Macro Definition Documentation

#define ATP867X_IO_8BPIOSPD (   ap,
  port 
)
Value:
(0x0A + \
ATP867X_IO_DMABASE((ap), (port)))

Definition at line 104 of file pata_atp867x.c.

#define ATP867X_IO_ALTSTATUS (   ap,
  port 
)
Value:
(0x0E + \
ATP867X_IO_PORTBASE((ap), (port)))

Definition at line 94 of file pata_atp867x.c.

#define ATP867X_IO_DMABASE (   ap,
  port 
)
Value:
(0x40 + \
ATP867X_IO_PORTBASE((ap), (port)))

Definition at line 89 of file pata_atp867x.c.

#define ATP867X_IO_DMAMODE (   ap,
  port 
)
Value:
(0x0B + \
ATP867X_IO_DMABASE((ap), (port)))

Definition at line 106 of file pata_atp867x.c.

#define ATP867X_IO_MSTRPIOSPD (   ap,
  port 
)
Value:
(0x08 + \
ATP867X_IO_DMABASE((ap), (port)))

Definition at line 100 of file pata_atp867x.c.

#define ATP867X_IO_PORTBASE (   ap,
  port 
)
Value:

Definition at line 87 of file pata_atp867x.c.

#define ATP867X_IO_PORTSPD (   ap,
  port 
)
Value:
(0x4A + \
ATP867X_IO_PORTBASE((ap), (port)))

Definition at line 109 of file pata_atp867x.c.

#define ATP867X_IO_PREREAD (   ap,
  port 
)
Value:
(0x4C + \
ATP867X_IO_PORTBASE((ap), (port)))

Definition at line 111 of file pata_atp867x.c.

#define ATP867X_IO_SLAVPIOSPD (   ap,
  port 
)
Value:
(0x09 + \
ATP867X_IO_DMABASE((ap), (port)))

Definition at line 102 of file pata_atp867x.c.

#define ATP867X_IO_STATUS (   ap,
  port 
)
Value:
(0x07 + \
ATP867X_IO_PORTBASE((ap), (port)))

Definition at line 92 of file pata_atp867x.c.

#define ATP867X_IOBASE (   ap)    ((ap)->host->iomap[0])

Definition at line 84 of file pata_atp867x.c.

#define ATP867X_SYS_INFO (   ap)    (0x3F + ATP867X_IOBASE(ap))

Definition at line 85 of file pata_atp867x.c.

#define DRV_NAME   "pata_atp867x"

Definition at line 40 of file pata_atp867x.c.

#define DRV_VERSION   "0.7.5"

Definition at line 41 of file pata_atp867x.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
ATP867X_IO_CHANNEL_OFFSET 
ATP867X_IO_PIOSPD_ACTIVE_SHIFT 
ATP867X_IO_PIOSPD_RECOVER_SHIFT 
ATP867X_IO_DMAMODE_MSTR_SHIFT 
ATP867X_IO_DMAMODE_MSTR_MASK 
ATP867X_IO_DMAMODE_SLAVE_SHIFT 
ATP867X_IO_DMAMODE_SLAVE_MASK 
ATP867X_IO_DMAMODE_UDMA_6 
ATP867X_IO_DMAMODE_UDMA_5 
ATP867X_IO_DMAMODE_UDMA_4 
ATP867X_IO_DMAMODE_UDMA_3 
ATP867X_IO_DMAMODE_UDMA_2 
ATP867X_IO_DMAMODE_UDMA_1 
ATP867X_IO_DMAMODE_UDMA_0 
ATP867X_IO_DMAMODE_DISABLE 
ATP867X_IO_SYS_INFO_66MHZ 
ATP867X_IO_SYS_INFO_SLOW_UDMA5 
ATP867X_IO_SYS_MASK_RESERVED 
ATP867X_IO_PORTSPD_VAL 
ATP867X_PREREAD_VAL 
ATP867X_NUM_PORTS 
ATP867X_BAR_IOBASE 
ATP867X_BAR_ROMBASE 

Definition at line 48 of file pata_atp867x.c.

Function Documentation

MODULE_AUTHOR ( "John(Jung-Ik)  Lee,
Google Inc."   
)
MODULE_DESCRIPTION ( "low level driver for Artop/Acard 867x ATA controller"  )
MODULE_DEVICE_TABLE ( pci  ,
atp867x_pci_tbl   
)
MODULE_LICENSE ( "GPL"  )
module_pci_driver ( atp867x_driver  )
MODULE_VERSION ( DRV_VERSION  )