Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
paride.h File Reference

Go to the source code of this file.

Data Structures

struct  pi_adapter
 
struct  pi_protocol
 

Macros

#define PARIDE_H_VERSION   "1.01"
 
#define PI_PD   0 /* IDE disk */
 
#define PI_PCD   1 /* ATAPI CDrom */
 
#define PI_PF   2 /* ATAPI disk */
 
#define PI_PT   3 /* ATAPI tape */
 
#define PI_PG   4 /* ATAPI generic */
 
#define delay_p   (pi->delay?udelay(pi->delay):(void)0)
 
#define out_p(offs, byte)   outb(byte,pi->port+offs); delay_p;
 
#define in_p(offs)   (delay_p,inb(pi->port+offs))
 
#define w0(byte)   {out_p(0,byte);}
 
#define r0()   (in_p(0) & 0xff)
 
#define w1(byte)   {out_p(1,byte);}
 
#define r1()   (in_p(1) & 0xff)
 
#define w2(byte)   {out_p(2,byte);}
 
#define r2()   (in_p(2) & 0xff)
 
#define w3(byte)   {out_p(3,byte);}
 
#define w4(byte)   {out_p(4,byte);}
 
#define r4()   (in_p(4) & 0xff)
 
#define w4w(data)   {outw(data,pi->port+4); delay_p;}
 
#define w4l(data)   {outl(data,pi->port+4); delay_p;}
 
#define r4w()   (delay_p,inw(pi->port+4)&0xffff)
 
#define r4l()   (delay_p,inl(pi->port+4)&0xffffffff)
 

Typedefs

typedef struct pi_adapter PIA
 
typedef struct pi_protocol PIP
 

Functions

int pi_init (PIA *pi, int autoprobe, int port, int mode, int unit, int protocol, int delay, char *scratch, int devtype, int verbose, char *device)
 
void pi_release (PIA *pi)
 
void pi_write_regr (PIA *pi, int cont, int regr, int val)
 
int pi_read_regr (PIA *pi, int cont, int regr)
 
void pi_write_block (PIA *pi, char *buf, int count)
 
void pi_read_block (PIA *pi, char *buf, int count)
 
void pi_connect (PIA *pi)
 
void pi_disconnect (PIA *pi)
 
void pi_do_claimed (PIA *pi, void(*cont)(void))
 
int pi_schedule_claimed (PIA *pi, void(*cont)(void))
 
int paride_register (PIP *)
 
void paride_unregister (PIP *)
 

Macro Definition Documentation

#define delay_p   (pi->delay?udelay(pi->delay):(void)0)

Definition at line 100 of file paride.h.

#define in_p (   offs)    (delay_p,inb(pi->port+offs))

Definition at line 102 of file paride.h.

#define out_p (   offs,
  byte 
)    outb(byte,pi->port+offs); delay_p;

Definition at line 101 of file paride.h.

#define PARIDE_H_VERSION   "1.01"

Definition at line 18 of file paride.h.

#define PI_PCD   1 /* ATAPI CDrom */

Definition at line 26 of file paride.h.

#define PI_PD   0 /* IDE disk */

Definition at line 25 of file paride.h.

#define PI_PF   2 /* ATAPI disk */

Definition at line 27 of file paride.h.

#define PI_PG   4 /* ATAPI generic */

Definition at line 29 of file paride.h.

#define PI_PT   3 /* ATAPI tape */

Definition at line 28 of file paride.h.

#define r0 ( )    (in_p(0) & 0xff)

Definition at line 105 of file paride.h.

#define r1 ( )    (in_p(1) & 0xff)

Definition at line 107 of file paride.h.

#define r2 ( )    (in_p(2) & 0xff)

Definition at line 109 of file paride.h.

#define r4 ( )    (in_p(4) & 0xff)

Definition at line 112 of file paride.h.

#define r4l ( )    (delay_p,inl(pi->port+4)&0xffffffff)

Definition at line 116 of file paride.h.

#define r4w ( )    (delay_p,inw(pi->port+4)&0xffff)

Definition at line 115 of file paride.h.

#define w0 (   byte)    {out_p(0,byte);}

Definition at line 104 of file paride.h.

#define w1 (   byte)    {out_p(1,byte);}

Definition at line 106 of file paride.h.

#define w2 (   byte)    {out_p(2,byte);}

Definition at line 108 of file paride.h.

#define w3 (   byte)    {out_p(3,byte);}

Definition at line 110 of file paride.h.

#define w4 (   byte)    {out_p(4,byte);}

Definition at line 111 of file paride.h.

#define w4l (   data)    {outl(data,pi->port+4); delay_p;}

Definition at line 114 of file paride.h.

#define w4w (   data)    {outw(data,pi->port+4); delay_p;}

Definition at line 113 of file paride.h.

Typedef Documentation

Definition at line 57 of file paride.h.

Definition at line 164 of file paride.h.

Function Documentation

int paride_register ( PIP )

Definition at line 209 of file paride.c.

void paride_unregister ( PIP )

Definition at line 234 of file paride.c.

void pi_connect ( PIA pi)

Definition at line 135 of file paride.c.

void pi_disconnect ( PIA pi)

Definition at line 143 of file paride.c.

void pi_do_claimed ( PIA pi,
void(*)(void cont 
)

Definition at line 110 of file paride.c.

int pi_init ( PIA pi,
int  autoprobe,
int  port,
int  mode,
int  unit,
int  protocol,
int  delay,
char scratch,
int  devtype,
int  verbose,
char device 
)

Definition at line 347 of file paride.c.

void pi_read_block ( PIA pi,
char buf,
int  count 
)

Definition at line 65 of file paride.c.

int pi_read_regr ( PIA pi,
int  cont,
int  regr 
)

Definition at line 51 of file paride.c.

void pi_release ( PIA pi)

Definition at line 159 of file paride.c.

int pi_schedule_claimed ( PIA pi,
void(*)(void cont 
)

Definition at line 94 of file paride.c.

void pi_write_block ( PIA pi,
char buf,
int  count 
)

Definition at line 58 of file paride.c.

void pi_write_regr ( PIA pi,
int  cont,
int  regr,
int  val 
)

Definition at line 44 of file paride.c.