Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
xsysace.c File Reference
#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/blkdev.h>
#include <linux/mutex.h>
#include <linux/ata.h>
#include <linux/hdreg.h>
#include <linux/platform_device.h>

Go to the source code of this file.

Data Structures

struct  ace_device
 
struct  ace_reg_ops
 

Macros

#define ACE_BUSMODE   (0x00)
 
#define ACE_STATUS   (0x04)
 
#define ACE_STATUS_CFGLOCK   (0x00000001)
 
#define ACE_STATUS_MPULOCK   (0x00000002)
 
#define ACE_STATUS_CFGERROR   (0x00000004) /* config controller error */
 
#define ACE_STATUS_CFCERROR   (0x00000008) /* CF controller error */
 
#define ACE_STATUS_CFDETECT   (0x00000010)
 
#define ACE_STATUS_DATABUFRDY   (0x00000020)
 
#define ACE_STATUS_DATABUFMODE   (0x00000040)
 
#define ACE_STATUS_CFGDONE   (0x00000080)
 
#define ACE_STATUS_RDYFORCFCMD   (0x00000100)
 
#define ACE_STATUS_CFGMODEPIN   (0x00000200)
 
#define ACE_STATUS_CFGADDR_MASK   (0x0000e000)
 
#define ACE_STATUS_CFBSY   (0x00020000)
 
#define ACE_STATUS_CFRDY   (0x00040000)
 
#define ACE_STATUS_CFDWF   (0x00080000)
 
#define ACE_STATUS_CFDSC   (0x00100000)
 
#define ACE_STATUS_CFDRQ   (0x00200000)
 
#define ACE_STATUS_CFCORR   (0x00400000)
 
#define ACE_STATUS_CFERR   (0x00800000)
 
#define ACE_ERROR   (0x08)
 
#define ACE_CFGLBA   (0x0c)
 
#define ACE_MPULBA   (0x10)
 
#define ACE_SECCNTCMD   (0x14)
 
#define ACE_SECCNTCMD_RESET   (0x0100)
 
#define ACE_SECCNTCMD_IDENTIFY   (0x0200)
 
#define ACE_SECCNTCMD_READ_DATA   (0x0300)
 
#define ACE_SECCNTCMD_WRITE_DATA   (0x0400)
 
#define ACE_SECCNTCMD_ABORT   (0x0600)
 
#define ACE_VERSION   (0x16)
 
#define ACE_VERSION_REVISION_MASK   (0x00FF)
 
#define ACE_VERSION_MINOR_MASK   (0x0F00)
 
#define ACE_VERSION_MAJOR_MASK   (0xF000)
 
#define ACE_CTRL   (0x18)
 
#define ACE_CTRL_FORCELOCKREQ   (0x0001)
 
#define ACE_CTRL_LOCKREQ   (0x0002)
 
#define ACE_CTRL_FORCECFGADDR   (0x0004)
 
#define ACE_CTRL_FORCECFGMODE   (0x0008)
 
#define ACE_CTRL_CFGMODE   (0x0010)
 
#define ACE_CTRL_CFGSTART   (0x0020)
 
#define ACE_CTRL_CFGSEL   (0x0040)
 
#define ACE_CTRL_CFGRESET   (0x0080)
 
#define ACE_CTRL_DATABUFRDYIRQ   (0x0100)
 
#define ACE_CTRL_ERRORIRQ   (0x0200)
 
#define ACE_CTRL_CFGDONEIRQ   (0x0400)
 
#define ACE_CTRL_RESETIRQ   (0x0800)
 
#define ACE_CTRL_CFGPROG   (0x1000)
 
#define ACE_CTRL_CFGADDR_MASK   (0xe000)
 
#define ACE_FATSTAT   (0x1c)
 
#define ACE_NUM_MINORS   16
 
#define ACE_SECTOR_SIZE   (512)
 
#define ACE_FIFO_SIZE   (32)
 
#define ACE_BUF_PER_SECTOR   (ACE_SECTOR_SIZE / ACE_FIFO_SIZE)
 
#define ACE_BUS_WIDTH_8   0
 
#define ACE_BUS_WIDTH_16   1
 
#define ACE_TASK_IDLE   0
 
#define ACE_TASK_IDENTIFY   1
 
#define ACE_TASK_READ   2
 
#define ACE_TASK_WRITE   3
 
#define ACE_FSM_NUM_TASKS   4
 
#define ACE_FSM_STATE_IDLE   0
 
#define ACE_FSM_STATE_REQ_LOCK   1
 
#define ACE_FSM_STATE_WAIT_LOCK   2
 
#define ACE_FSM_STATE_WAIT_CFREADY   3
 
#define ACE_FSM_STATE_IDENTIFY_PREPARE   4
 
#define ACE_FSM_STATE_IDENTIFY_TRANSFER   5
 
#define ACE_FSM_STATE_IDENTIFY_COMPLETE   6
 
#define ACE_FSM_STATE_REQ_PREPARE   7
 
#define ACE_FSM_STATE_REQ_TRANSFER   8
 
#define ACE_FSM_STATE_REQ_COMPLETE   9
 
#define ACE_FSM_STATE_ERROR   10
 
#define ACE_FSM_NUM_STATES   11
 
#define ace_of_match   NULL
 

Functions

 MODULE_AUTHOR ("Grant Likely <grant.likely@secretlab.ca>")
 
 MODULE_DESCRIPTION ("Xilinx SystemACE device driver")
 
 MODULE_LICENSE ("GPL")
 
void ace_fix_driveid (u16 *id)
 
struct requestace_get_next_request (struct request_queue *q)
 
 module_init (ace_init)
 
 module_exit (ace_exit)
 

Macro Definition Documentation

#define ACE_BUF_PER_SECTOR   (ACE_SECTOR_SIZE / ACE_FIFO_SIZE)

Definition at line 166 of file xsysace.c.

#define ACE_BUS_WIDTH_16   1

Definition at line 169 of file xsysace.c.

#define ACE_BUS_WIDTH_8   0

Definition at line 168 of file xsysace.c.

#define ACE_BUSMODE   (0x00)

Definition at line 107 of file xsysace.c.

#define ACE_CFGLBA   (0x0c)

Definition at line 130 of file xsysace.c.

#define ACE_CTRL   (0x18)

Definition at line 145 of file xsysace.c.

#define ACE_CTRL_CFGADDR_MASK   (0xe000)

Definition at line 159 of file xsysace.c.

#define ACE_CTRL_CFGDONEIRQ   (0x0400)

Definition at line 156 of file xsysace.c.

#define ACE_CTRL_CFGMODE   (0x0010)

Definition at line 150 of file xsysace.c.

#define ACE_CTRL_CFGPROG   (0x1000)

Definition at line 158 of file xsysace.c.

#define ACE_CTRL_CFGRESET   (0x0080)

Definition at line 153 of file xsysace.c.

#define ACE_CTRL_CFGSEL   (0x0040)

Definition at line 152 of file xsysace.c.

#define ACE_CTRL_CFGSTART   (0x0020)

Definition at line 151 of file xsysace.c.

#define ACE_CTRL_DATABUFRDYIRQ   (0x0100)

Definition at line 154 of file xsysace.c.

#define ACE_CTRL_ERRORIRQ   (0x0200)

Definition at line 155 of file xsysace.c.

#define ACE_CTRL_FORCECFGADDR   (0x0004)

Definition at line 148 of file xsysace.c.

#define ACE_CTRL_FORCECFGMODE   (0x0008)

Definition at line 149 of file xsysace.c.

#define ACE_CTRL_FORCELOCKREQ   (0x0001)

Definition at line 146 of file xsysace.c.

#define ACE_CTRL_LOCKREQ   (0x0002)

Definition at line 147 of file xsysace.c.

#define ACE_CTRL_RESETIRQ   (0x0800)

Definition at line 157 of file xsysace.c.

#define ACE_ERROR   (0x08)

Definition at line 129 of file xsysace.c.

#define ACE_FATSTAT   (0x1c)

Definition at line 161 of file xsysace.c.

#define ACE_FIFO_SIZE   (32)

Definition at line 165 of file xsysace.c.

#define ACE_FSM_NUM_STATES   11

Definition at line 444 of file xsysace.c.

#define ACE_FSM_NUM_TASKS   4

Definition at line 430 of file xsysace.c.

#define ACE_FSM_STATE_ERROR   10

Definition at line 443 of file xsysace.c.

#define ACE_FSM_STATE_IDENTIFY_COMPLETE   6

Definition at line 439 of file xsysace.c.

#define ACE_FSM_STATE_IDENTIFY_PREPARE   4

Definition at line 437 of file xsysace.c.

#define ACE_FSM_STATE_IDENTIFY_TRANSFER   5

Definition at line 438 of file xsysace.c.

#define ACE_FSM_STATE_IDLE   0

Definition at line 433 of file xsysace.c.

#define ACE_FSM_STATE_REQ_COMPLETE   9

Definition at line 442 of file xsysace.c.

#define ACE_FSM_STATE_REQ_LOCK   1

Definition at line 434 of file xsysace.c.

#define ACE_FSM_STATE_REQ_PREPARE   7

Definition at line 440 of file xsysace.c.

#define ACE_FSM_STATE_REQ_TRANSFER   8

Definition at line 441 of file xsysace.c.

#define ACE_FSM_STATE_WAIT_CFREADY   3

Definition at line 436 of file xsysace.c.

#define ACE_FSM_STATE_WAIT_LOCK   2

Definition at line 435 of file xsysace.c.

#define ACE_MPULBA   (0x10)

Definition at line 131 of file xsysace.c.

#define ACE_NUM_MINORS   16

Definition at line 163 of file xsysace.c.

#define ace_of_match   NULL

Definition at line 1202 of file xsysace.c.

#define ACE_SECCNTCMD   (0x14)

Definition at line 133 of file xsysace.c.

#define ACE_SECCNTCMD_ABORT   (0x0600)

Definition at line 138 of file xsysace.c.

#define ACE_SECCNTCMD_IDENTIFY   (0x0200)

Definition at line 135 of file xsysace.c.

#define ACE_SECCNTCMD_READ_DATA   (0x0300)

Definition at line 136 of file xsysace.c.

#define ACE_SECCNTCMD_RESET   (0x0100)

Definition at line 134 of file xsysace.c.

#define ACE_SECCNTCMD_WRITE_DATA   (0x0400)

Definition at line 137 of file xsysace.c.

#define ACE_SECTOR_SIZE   (512)

Definition at line 164 of file xsysace.c.

#define ACE_STATUS   (0x04)

Definition at line 109 of file xsysace.c.

#define ACE_STATUS_CFBSY   (0x00020000)

Definition at line 121 of file xsysace.c.

#define ACE_STATUS_CFCERROR   (0x00000008) /* CF controller error */

Definition at line 113 of file xsysace.c.

#define ACE_STATUS_CFCORR   (0x00400000)

Definition at line 126 of file xsysace.c.

#define ACE_STATUS_CFDETECT   (0x00000010)

Definition at line 114 of file xsysace.c.

#define ACE_STATUS_CFDRQ   (0x00200000)

Definition at line 125 of file xsysace.c.

#define ACE_STATUS_CFDSC   (0x00100000)

Definition at line 124 of file xsysace.c.

#define ACE_STATUS_CFDWF   (0x00080000)

Definition at line 123 of file xsysace.c.

#define ACE_STATUS_CFERR   (0x00800000)

Definition at line 127 of file xsysace.c.

#define ACE_STATUS_CFGADDR_MASK   (0x0000e000)

Definition at line 120 of file xsysace.c.

#define ACE_STATUS_CFGDONE   (0x00000080)

Definition at line 117 of file xsysace.c.

#define ACE_STATUS_CFGERROR   (0x00000004) /* config controller error */

Definition at line 112 of file xsysace.c.

#define ACE_STATUS_CFGLOCK   (0x00000001)

Definition at line 110 of file xsysace.c.

#define ACE_STATUS_CFGMODEPIN   (0x00000200)

Definition at line 119 of file xsysace.c.

#define ACE_STATUS_CFRDY   (0x00040000)

Definition at line 122 of file xsysace.c.

#define ACE_STATUS_DATABUFMODE   (0x00000040)

Definition at line 116 of file xsysace.c.

#define ACE_STATUS_DATABUFRDY   (0x00000020)

Definition at line 115 of file xsysace.c.

#define ACE_STATUS_MPULOCK   (0x00000002)

Definition at line 111 of file xsysace.c.

#define ACE_STATUS_RDYFORCFCMD   (0x00000100)

Definition at line 118 of file xsysace.c.

#define ACE_TASK_IDENTIFY   1

Definition at line 427 of file xsysace.c.

#define ACE_TASK_IDLE   0

Definition at line 426 of file xsysace.c.

#define ACE_TASK_READ   2

Definition at line 428 of file xsysace.c.

#define ACE_TASK_WRITE   3

Definition at line 429 of file xsysace.c.

#define ACE_VERSION   (0x16)

Definition at line 140 of file xsysace.c.

#define ACE_VERSION_MAJOR_MASK   (0xF000)

Definition at line 143 of file xsysace.c.

#define ACE_VERSION_MINOR_MASK   (0x0F00)

Definition at line 142 of file xsysace.c.

#define ACE_VERSION_REVISION_MASK   (0x00FF)

Definition at line 141 of file xsysace.c.

Function Documentation

void ace_fix_driveid ( u16 id)

Definition at line 410 of file xsysace.c.

struct request* ace_get_next_request ( struct request_queue q)
read

Definition at line 466 of file xsysace.c.

MODULE_AUTHOR ( "Grant Likely <grant.likely@secretlab.ca>"  )
MODULE_DESCRIPTION ( "Xilinx SystemACE device driver )
module_exit ( ace_exit  )
module_init ( ace_init  )
MODULE_LICENSE ( "GPL"  )