TwiceAsNice  2019-02-18
Macros | Functions | Variables
util_reg.c File Reference
#include <stdio.h>
#include <sys/ioctl.h>
#include "hpdi32_dsl.h"
#include "hpdi32_utils.h"
#include "gsc_utils.h"
Include dependency graph for util_reg.c:

Macros

#define _GSC_REG(a)   "GSC " #a, HPDI32_GSC_##a, 0, 0
 
#define WIDTH   24
 

Functions

static int _frr_detail_new (int fd, int supported, __u32 value, int width)
 
static int _frr_detail_old (int fd, int supported, __u32 value, int width, __u32 didr)
 
static int _frr_detail (int fd, int supported, __u32 value, int width)
 
static int _bcr_detail (int fd, int supported, __u32 value, int width)
 
static int _bsr_detail (int fd, int supported, __u32 value, int width)
 
static int _xar_detail (int fd, int supported, __u32 value, int width)
 
static int _fsr_detail (int fd, int supported, __u32 value, int width)
 
static int _fdr_detail (int fd, int supported, __u32 value, int width)
 
static int _txvlcr_detail (int fd, int supported, __u32 value, int width)
 
static int _tlilcr_detail (int fd, int supported, __u32 value, int width)
 
static int _icr_irq_detail (int fd, int supported, __u32 value, int width, const char **list)
 
static int _icr_detail (int fd, int supported, __u32 value, int width)
 
static int _isr_detail (int fd, int supported, __u32 value, int width)
 
static int _tcdr_detail (int fd, int supported, __u32 value, int width)
 
static int _xfsr_detail (int fd, int supported, __u32 value, int width)
 
static int _xfwr_detail (int fd, int supported, __u32 value, int width)
 
static int _ielr_detail (int fd, int supported, __u32 value, int width)
 
static int _ihlr_detail (int fd, int supported, __u32 value, int width)
 
static const gsc_reg_def_t_find_reg (unsigned long reg, const gsc_reg_def_t *list)
 
const gsc_reg_def_thpdi32_reg_get_def_index (int index)
 
const char * hpdi32_reg_get_desc (unsigned long reg)
 
const char * hpdi32_reg_get_name (unsigned long reg)
 
int hpdi32_reg_list (int fd, int detail)
 
const gsc_reg_def_thpdi32_reg_get_def_id (int reg)
 

Variables

static gsc_reg_def_t _gsc []
 

Macro Definition Documentation

◆ _GSC_REG

#define _GSC_REG (   a)    "GSC " #a, HPDI32_GSC_##a, 0, 0

◆ WIDTH

#define WIDTH   24

Function Documentation

◆ _bcr_detail()

static int _bcr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _bsr_detail()

static int _bsr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _fdr_detail()

static int _fdr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _find_reg()

static const gsc_reg_def_t* _find_reg ( unsigned long  reg,
const gsc_reg_def_t list 
)
static

◆ _frr_detail()

static int _frr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _frr_detail_new()

static int _frr_detail_new ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _frr_detail_old()

static int _frr_detail_old ( int  fd,
int  supported,
__u32  value,
int  width,
__u32  didr 
)
static

◆ _fsr_detail()

static int _fsr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _icr_detail()

static int _icr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _icr_irq_detail()

static int _icr_irq_detail ( int  fd,
int  supported,
__u32  value,
int  width,
const char **  list 
)
static

◆ _ielr_detail()

static int _ielr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _ihlr_detail()

static int _ihlr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _isr_detail()

static int _isr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _tcdr_detail()

static int _tcdr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _tlilcr_detail()

static int _tlilcr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _txvlcr_detail()

static int _txvlcr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _xar_detail()

static int _xar_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _xfsr_detail()

static int _xfsr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ _xfwr_detail()

static int _xfwr_detail ( int  fd,
int  supported,
__u32  value,
int  width 
)
static

◆ hpdi32_reg_get_def_id()

const gsc_reg_def_t* hpdi32_reg_get_def_id ( int  reg)

◆ hpdi32_reg_get_def_index()

const gsc_reg_def_t* hpdi32_reg_get_def_index ( int  index)

◆ hpdi32_reg_get_desc()

const char* hpdi32_reg_get_desc ( unsigned long  reg)

◆ hpdi32_reg_get_name()

const char* hpdi32_reg_get_name ( unsigned long  reg)

◆ hpdi32_reg_list()

int hpdi32_reg_list ( int  fd,
int  detail 
)

Variable Documentation

◆ _gsc

gsc_reg_def_t _gsc[]
static
Initial value:
=
{
{ _GSC_REG(FRR), 0, _frr_detail, "Firmware Revision Register" },
{ _GSC_REG(BCR), 0, _bcr_detail, "Board Control Register" },
{ _GSC_REG(BSR), 0, _bsr_detail, "Board Status Register" },
{ _GSC_REG(TAR), 0, _xar_detail, "Tx Almost Register" },
{ _GSC_REG(RAR), 0, _xar_detail, "Rx Almost Register" },
{ _GSC_REG(FSR), 1, _fsr_detail, "Feature Set Register" },
{ _GSC_REG(FDR), 0, _fdr_detail, "FIFO Data Register" },
{ _GSC_REG(TSVLCR), 0, _txvlcr_detail, "Tx Status Valid Counter Register" },
{ _GSC_REG(TLVLCR), 0, _txvlcr_detail, "Tx Line Valid Length Counter Register" },
{ _GSC_REG(TLILCR), 0, _tlilcr_detail, "Tx Line Invalid Length Counter Register" },
{ _GSC_REG(RSCR), 0, _txvlcr_detail, "Rx Status Count Register" },
{ _GSC_REG(RLCR), 0, _txvlcr_detail, "Rx Line Count Register" },
{ _GSC_REG(ICR), 0, _icr_detail, "Interrupt Control Register" },
{ _GSC_REG(ISR), 0, _isr_detail, "Interrupt Status Register" },
{ _GSC_REG(TCDR), 0, _tcdr_detail, "Tx CLock Divider Register" },
{ _GSC_REG(TFSR), 1, _xfsr_detail, "Tx FIFO Size Register" },
{ _GSC_REG(RFSR), 1, _xfsr_detail, "Rx FIFO Size Register" },
{ _GSC_REG(TFWR), 1, _xfwr_detail, "Tx FIFO Words Register" },
{ _GSC_REG(RFWR), 1, _xfwr_detail, "Rx FIFO Words Register" },
{ _GSC_REG(IELR), 1, _ielr_detail, "Interrupt Edge/Level Register" },
{ _GSC_REG(IHLR), 1, _ihlr_detail, "Interrupt High/Low Register" },
{ NULL, 0, 0, 0, 0, NULL }
}
static int _ielr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:608
static int _tlilcr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:436
static int _fdr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:410
static int _isr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:493
ISR(TWI_vect)
Definition: twi.c:399
static int _ihlr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:637
#define NULL
Definition: PciTypes.h:160
static int _fsr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:371
#define _GSC_REG(a)
Definition: util_reg.c:16
static int _txvlcr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:423
static int _icr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:482
static int _bcr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:147
static int _xar_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:351
static int _bsr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:287
static int _xfwr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:570
RAR
Definition: cat2mm_E2.py:238
static int _frr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:129
static int _xfsr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:522
static int _tcdr_detail(int fd, int supported, __u32 value, int width)
Definition: util_reg.c:504