TwiceAsNice  2019-02-18
Classes | Macros | Functions | Variables
util_reg.c File Reference
#include <stdio.h>
#include "util_reg.h"
#include "util_label.h"
Include dependency graph for util_reg.c:

Classes

struct  _reg_def_t
 

Macros

#define _GSC_REG(a)   "GSC " #a, HPDI32_##a
 
#define _PCI_REG(a)   "PCI " #a, GSC_PCI_9080_##a
 
#define _PLX_REG(a)   "PLX " #a, GSC_PLX_9080_##a
 

Functions

static int _reg_list (void *dev, const _reg_def_t *list)
 
static const char * _reg_name (U32 reg, const _reg_def_t *list)
 
int dev_reg_mod (void *dev, U32 reg, U32 value, U32 mask, int verbose)
 
int dev_reg_read (void *dev, U32 reg, U32 *value, int verbose)
 
int dev_reg_write (void *dev, U32 reg, U32 value, int verbose)
 
int reg_list (void *dev, int pci, int plx, int gsc)
 
const char * reg_name (U32 reg)
 

Variables

static const _reg_def_t _gsc []
 
static const _reg_def_t _pci []
 
static const _reg_def_t _plx []
 

Macro Definition Documentation

◆ _GSC_REG

#define _GSC_REG (   a)    "GSC " #a, HPDI32_##a

◆ _PCI_REG

#define _PCI_REG (   a)    "PCI " #a, GSC_PCI_9080_##a

◆ _PLX_REG

#define _PLX_REG (   a)    "PLX " #a, GSC_PLX_9080_##a

Function Documentation

◆ _reg_list()

static int _reg_list ( void *  dev,
const _reg_def_t list 
)
static

◆ _reg_name()

static const char* _reg_name ( U32  reg,
const _reg_def_t list 
)
static

◆ dev_reg_mod()

int dev_reg_mod ( void *  dev,
U32  reg,
U32  value,
U32  mask,
int  verbose 
)

◆ dev_reg_read()

int dev_reg_read ( void *  dev,
U32  reg,
U32 *  value,
int  verbose 
)

◆ dev_reg_write()

int dev_reg_write ( void *  dev,
U32  reg,
U32  value,
int  verbose 
)

◆ reg_list()

int reg_list ( void *  dev,
int  pci,
int  plx,
int  gsc 
)

◆ reg_name()

const char* reg_name ( U32  reg)

Variable Documentation

◆ _gsc

const _reg_def_t _gsc[]
static
Initial value:
=
{
{ _GSC_REG(FRR) },
{ _GSC_REG(BCR) },
{ _GSC_REG(BSR) },
{ _GSC_REG(TAR) },
{ _GSC_REG(RAR) },
{ _GSC_REG(FSR) },
{ _GSC_REG(FDR) },
{ _GSC_REG(TSVLCR) },
{ _GSC_REG(TLVLCR) },
{ _GSC_REG(TLILCR) },
{ _GSC_REG(RSCR) },
{ _GSC_REG(RLCR) },
{ _GSC_REG(ICR) },
{ _GSC_REG(ISR) },
{ _GSC_REG(TCDR) },
{ _GSC_REG(TFSR) },
{ _GSC_REG(RFSR) },
{ _GSC_REG(TFWR) },
{ _GSC_REG(RFWR) },
{ _GSC_REG(IELR) },
{ _GSC_REG(IHLR) },
{ NULL, 0 }
}
ISR(TWI_vect)
Definition: twi.c:399
#define NULL
Definition: PciTypes.h:160
RAR
Definition: cat2mm_E2.py:238
#define _GSC_REG(a)
Definition: util_reg.c:23

◆ _pci

const _reg_def_t _pci[]
static
Initial value:
=
{
{ _PCI_REG(VIDR) },
{ _PCI_REG(DIDR) },
{ _PCI_REG(CR) },
{ _PCI_REG(SR) },
{ _PCI_REG(REV) },
{ _PCI_REG(CCR) },
{ _PCI_REG(CLSR) },
{ _PCI_REG(LTR) },
{ _PCI_REG(HTR) },
{ _PCI_REG(BISTR) },
{ _PCI_REG(BAR0) },
{ _PCI_REG(BAR1) },
{ _PCI_REG(BAR2) },
{ _PCI_REG(BAR3) },
{ _PCI_REG(BAR4) },
{ _PCI_REG(BAR5) },
{ _PCI_REG(CIS) },
{ _PCI_REG(SVID) },
{ _PCI_REG(SID) },
{ _PCI_REG(ERBAR) },
{ _PCI_REG(ILR) },
{ _PCI_REG(IPR) },
{ _PCI_REG(MGR) },
{ _PCI_REG(MLR) },
{ NULL, 0 }
}
#define CR
Definition: HitachiHighProtocol.cpp:35
#define NULL
Definition: PciTypes.h:160
#define _PCI_REG(a)
Definition: util_reg.c:24

◆ _plx

const _reg_def_t _plx[]
static