Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
altera-jtag.c File Reference
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/slab.h>
#include <misc/altera.h>
#include "altera-exprt.h"
#include "altera-jtag.h"

Go to the source code of this file.

Data Structures

struct  altera_jtag_machine
 

Macros

#define alt_jtag_io(a, b, c)   astate->config->jtag_io(astate->config->dev, a, b, c);
 
#define alt_malloc(a)   kzalloc(a, GFP_KERNEL);
 
#define TMS_HIGH   1
 
#define TMS_LOW   0
 
#define TDI_HIGH   1
 
#define TDI_LOW   0
 
#define READ_TDO   1
 
#define IGNORE_TDO   0
 

Functions

int altera_jinit (struct altera_state *astate)
 
int altera_set_drstop (struct altera_jtag *js, enum altera_jtag_state state)
 
int altera_set_irstop (struct altera_jtag *js, enum altera_jtag_state state)
 
int altera_set_dr_pre (struct altera_jtag *js, u32 count, u32 start_index, u8 *preamble_data)
 
int altera_set_ir_pre (struct altera_jtag *js, u32 count, u32 start_index, u8 *preamble_data)
 
int altera_set_dr_post (struct altera_jtag *js, u32 count, u32 start_index, u8 *postamble_data)
 
int altera_set_ir_post (struct altera_jtag *js, u32 count, u32 start_index, u8 *postamble_data)
 
int altera_goto_jstate (struct altera_state *astate, enum altera_jtag_state state)
 
int altera_wait_cycles (struct altera_state *astate, s32 cycles, enum altera_jtag_state wait_state)
 
int altera_wait_msecs (struct altera_state *astate, s32 microseconds, enum altera_jtag_state wait_state)
 
int altera_irscan (struct altera_state *astate, u32 count, u8 *tdi_data, u32 start_index)
 
int altera_swap_ir (struct altera_state *astate, u32 count, u8 *in_data, u32 in_index, u8 *out_data, u32 out_index)
 
int altera_drscan (struct altera_state *astate, u32 count, u8 *tdi_data, u32 start_index)
 
int altera_swap_dr (struct altera_state *astate, u32 count, u8 *in_data, u32 in_index, u8 *out_data, u32 out_index)
 
void altera_free_buffers (struct altera_state *astate)
 

Macro Definition Documentation

#define alt_jtag_io (   a,
  b,
  c 
)    astate->config->jtag_io(astate->config->dev, a, b, c);

Definition at line 33 of file altera-jtag.c.

#define alt_malloc (   a)    kzalloc(a, GFP_KERNEL);

Definition at line 36 of file altera-jtag.c.

#define IGNORE_TDO   0

Definition at line 87 of file altera-jtag.c.

#define READ_TDO   1

Definition at line 86 of file altera-jtag.c.

#define TDI_HIGH   1

Definition at line 84 of file altera-jtag.c.

#define TDI_LOW   0

Definition at line 85 of file altera-jtag.c.

#define TMS_HIGH   1

Definition at line 82 of file altera-jtag.c.

#define TMS_LOW   0

Definition at line 83 of file altera-jtag.c.

Function Documentation

int altera_drscan ( struct altera_state astate,
u32  count,
u8 tdi_data,
u32  start_index 
)

Definition at line 800 of file altera-jtag.c.

void altera_free_buffers ( struct altera_state astate)

Definition at line 997 of file altera-jtag.c.

int altera_goto_jstate ( struct altera_state astate,
enum altera_jtag_state  state 
)

Definition at line 299 of file altera-jtag.c.

int altera_irscan ( struct altera_state astate,
u32  count,
u8 tdi_data,
u32  start_index 
)

Definition at line 597 of file altera-jtag.c.

int altera_jinit ( struct altera_state astate)

Definition at line 89 of file altera-jtag.c.

int altera_set_dr_post ( struct altera_jtag js,
u32  count,
u32  start_index,
u8 postamble_data 
)

Definition at line 207 of file altera-jtag.c.

int altera_set_dr_pre ( struct altera_jtag js,
u32  count,
u32  start_index,
u8 preamble_data 
)

Definition at line 130 of file altera-jtag.c.

int altera_set_drstop ( struct altera_jtag js,
enum altera_jtag_state  state 
)

Definition at line 116 of file altera-jtag.c.

int altera_set_ir_post ( struct altera_jtag js,
u32  count,
u32  start_index,
u8 postamble_data 
)

Definition at line 247 of file altera-jtag.c.

int altera_set_ir_pre ( struct altera_jtag js,
u32  count,
u32  start_index,
u8 preamble_data 
)

Definition at line 169 of file altera-jtag.c.

int altera_set_irstop ( struct altera_jtag js,
enum altera_jtag_state  state 
)

Definition at line 123 of file altera-jtag.c.

int altera_swap_dr ( struct altera_state astate,
u32  count,
u8 in_data,
u32  in_index,
u8 out_data,
u32  out_index 
)

Definition at line 892 of file altera-jtag.c.

int altera_swap_ir ( struct altera_state astate,
u32  count,
u8 in_data,
u32  in_index,
u8 out_data,
u32  out_index 
)

Definition at line 694 of file altera-jtag.c.

int altera_wait_cycles ( struct altera_state astate,
s32  cycles,
enum altera_jtag_state  wait_state 
)

Definition at line 351 of file altera-jtag.c.

int altera_wait_msecs ( struct altera_state astate,
s32  microseconds,
enum altera_jtag_state  wait_state 
)

Definition at line 378 of file altera-jtag.c.