Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rtl871x_io.h File Reference
#include "osdep_service.h"
#include "osdep_intf.h"

Go to the source code of this file.

Data Structures

struct  _io_ops
 
struct  io_req
 
struct  intf_hdl
 
struct  reg_protocol_rd
 
struct  reg_protocol_wt
 
struct  io_queue
 

Macros

#define NUM_IOREQ   8
 
#define MAX_PROT_SZ   (64-16)
 
#define _IOREADY   0
 
#define _IO_WAIT_COMPLETE   1
 
#define _IO_WAIT_RSP   2
 
#define _IOSZ_MASK_   (0x7F)
 
#define _IO_WRITE_   BIT(7)
 
#define _IO_FIXED_   BIT(8)
 
#define _IO_BURST_   BIT(9)
 
#define _IO_BYTE_   BIT(10)
 
#define _IO_HW_   BIT(11)
 
#define _IO_WORD_   BIT(12)
 
#define _IO_SYNC_   BIT(13)
 
#define _IO_CMDMASK_   (0x1F80)
 
#define _IO_ERR_   BIT(2)
 
#define _IO_SUCCESS_   BIT(1)
 
#define _IO_DONE_   BIT(0)
 
#define IO_RD32   (_IO_SYNC_ | _IO_WORD_)
 
#define IO_RD16   (_IO_SYNC_ | _IO_HW_)
 
#define IO_RD8   (_IO_SYNC_ | _IO_BYTE_)
 
#define IO_RD32_ASYNC   (_IO_WORD_)
 
#define IO_RD16_ASYNC   (_IO_HW_)
 
#define IO_RD8_ASYNC   (_IO_BYTE_)
 
#define IO_WR32   (_IO_WRITE_ | _IO_SYNC_ | _IO_WORD_)
 
#define IO_WR16   (_IO_WRITE_ | _IO_SYNC_ | _IO_HW_)
 
#define IO_WR8   (_IO_WRITE_ | _IO_SYNC_ | _IO_BYTE_)
 
#define IO_WR32_ASYNC   (_IO_WRITE_ | _IO_WORD_)
 
#define IO_WR16_ASYNC   (_IO_WRITE_ | _IO_HW_)
 
#define IO_WR8_ASYNC   (_IO_WRITE_ | _IO_BYTE_)
 
#define IO_WR_BURST(x)
 
#define IO_RD_BURST(x)   (_IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_))
 
#define _INTF_ASYNC_   BIT(0) /*support async io*/
 

Functions

u8 r8712_read8 (struct _adapter *adapter, u32 addr)
 
u16 r8712_read16 (struct _adapter *adapter, u32 addr)
 
u32 r8712_read32 (struct _adapter *adapter, u32 addr)
 
void r8712_read_mem (struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 
void r8712_read_port (struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 
void r8712_write8 (struct _adapter *adapter, u32 addr, u8 val)
 
void r8712_write16 (struct _adapter *adapter, u32 addr, u16 val)
 
void r8712_write32 (struct _adapter *adapter, u32 addr, u32 val)
 
void r8712_write_mem (struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 
void r8712_write_port (struct _adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 
uint r8712_alloc_io_queue (struct _adapter *adapter)
 
void r8712_free_io_queue (struct _adapter *adapter)
 

Macro Definition Documentation

#define _INTF_ASYNC_   BIT(0) /*support async io*/

Definition at line 78 of file rtl871x_io.h.

#define _IO_BURST_   BIT(9)

Definition at line 44 of file rtl871x_io.h.

#define _IO_BYTE_   BIT(10)

Definition at line 45 of file rtl871x_io.h.

#define _IO_CMDMASK_   (0x1F80)

Definition at line 49 of file rtl871x_io.h.

#define _IO_DONE_   BIT(0)

Definition at line 58 of file rtl871x_io.h.

#define _IO_ERR_   BIT(2)

Definition at line 56 of file rtl871x_io.h.

#define _IO_FIXED_   BIT(8)

Definition at line 43 of file rtl871x_io.h.

#define _IO_HW_   BIT(11)

Definition at line 46 of file rtl871x_io.h.

#define _IO_SUCCESS_   BIT(1)

Definition at line 57 of file rtl871x_io.h.

#define _IO_SYNC_   BIT(13)

Definition at line 48 of file rtl871x_io.h.

#define _IO_WAIT_COMPLETE   1

Definition at line 37 of file rtl871x_io.h.

#define _IO_WAIT_RSP   2

Definition at line 38 of file rtl871x_io.h.

#define _IO_WORD_   BIT(12)

Definition at line 47 of file rtl871x_io.h.

#define _IO_WRITE_   BIT(7)

Definition at line 42 of file rtl871x_io.h.

#define _IOREADY   0

Definition at line 36 of file rtl871x_io.h.

#define _IOSZ_MASK_   (0x7F)

Definition at line 41 of file rtl871x_io.h.

#define IO_RD16   (_IO_SYNC_ | _IO_HW_)

Definition at line 60 of file rtl871x_io.h.

#define IO_RD16_ASYNC   (_IO_HW_)

Definition at line 63 of file rtl871x_io.h.

#define IO_RD32   (_IO_SYNC_ | _IO_WORD_)

Definition at line 59 of file rtl871x_io.h.

#define IO_RD32_ASYNC   (_IO_WORD_)

Definition at line 62 of file rtl871x_io.h.

#define IO_RD8   (_IO_SYNC_ | _IO_BYTE_)

Definition at line 61 of file rtl871x_io.h.

#define IO_RD8_ASYNC   (_IO_BYTE_)

Definition at line 64 of file rtl871x_io.h.

#define IO_RD_BURST (   x)    (_IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_))

Definition at line 76 of file rtl871x_io.h.

#define IO_WR16   (_IO_WRITE_ | _IO_SYNC_ | _IO_HW_)

Definition at line 66 of file rtl871x_io.h.

#define IO_WR16_ASYNC   (_IO_WRITE_ | _IO_HW_)

Definition at line 69 of file rtl871x_io.h.

#define IO_WR32   (_IO_WRITE_ | _IO_SYNC_ | _IO_WORD_)

Definition at line 65 of file rtl871x_io.h.

#define IO_WR32_ASYNC   (_IO_WRITE_ | _IO_WORD_)

Definition at line 68 of file rtl871x_io.h.

#define IO_WR8   (_IO_WRITE_ | _IO_SYNC_ | _IO_BYTE_)

Definition at line 67 of file rtl871x_io.h.

#define IO_WR8_ASYNC   (_IO_WRITE_ | _IO_BYTE_)

Definition at line 70 of file rtl871x_io.h.

#define IO_WR_BURST (   x)
Value:
(IO_WRITE_ | _IO_SYNC_ | _IO_BURST_ | \
((x) & _IOSZ_MASK_))

Definition at line 74 of file rtl871x_io.h.

#define MAX_PROT_SZ   (64-16)

Definition at line 34 of file rtl871x_io.h.

#define NUM_IOREQ   8

Definition at line 32 of file rtl871x_io.h.

Function Documentation

uint r8712_alloc_io_queue ( struct _adapter adapter)

Definition at line 109 of file rtl871x_io.c.

void r8712_free_io_queue ( struct _adapter adapter)

Definition at line 150 of file rtl871x_io.c.

u16 r8712_read16 ( struct _adapter adapter,
u32  addr 
)

Definition at line 49 of file rtl8712_io.c.

u32 r8712_read32 ( struct _adapter adapter,
u32  addr 
)

Definition at line 61 of file rtl8712_io.c.

u8 r8712_read8 ( struct _adapter adapter,
u32  addr 
)

Definition at line 37 of file rtl8712_io.c.

void r8712_read_mem ( struct _adapter adapter,
u32  addr,
u32  cnt,
u8 pmem 
)

Definition at line 103 of file rtl8712_io.c.

void r8712_read_port ( struct _adapter adapter,
u32  addr,
u32  cnt,
u8 pmem 
)

Definition at line 128 of file rtl8712_io.c.

void r8712_write16 ( struct _adapter adapter,
u32  addr,
u16  val 
)

Definition at line 83 of file rtl8712_io.c.

void r8712_write32 ( struct _adapter adapter,
u32  addr,
u32  val 
)

Definition at line 93 of file rtl8712_io.c.

void r8712_write8 ( struct _adapter adapter,
u32  addr,
u8  val 
)

Definition at line 73 of file rtl8712_io.c.

void r8712_write_mem ( struct _adapter adapter,
u32  addr,
u32  cnt,
u8 pmem 
)

Definition at line 117 of file rtl8712_io.c.

void r8712_write_port ( struct _adapter adapter,
u32  addr,
u32  cnt,
u8 pmem 
)

Definition at line 142 of file rtl8712_io.c.