struct chip_t

Name

struct chip_t --  CAN chip state and type information

Synopsis

struct chip_t {
  char * chip_type;
  int chip_idx;
  int chip_irq;
  unsigned long chip_base_addr;
  unsigned int flags;
  int clock;
  void (* write_register (unsigned char data,unsigned long address);
  unsigned (* read_register (unsigned long address);
  unsigned short sja_cdr_reg;
  unsigned short sja_ocr_reg;
  unsigned short int_cpu_reg;
  unsigned short int_clk_reg;
  unsigned short int_bus_reg;
  struct msgobj_t * * msgobj;
  struct chipspecops_t * chipspecops;
  struct candevice_t * hostdevice;
  int max_objects;
};  

Members

chip_type

text string describing chip type

chip_idx

index of the chip in candevice_t.chip[] array

chip_irq

chip interrupt number if any

chip_base_addr

chip base address in the CPU IO or virtual memory space

flags

chip flags: CHIP_CONFIGURED .. chip is configured, CHIP_SEGMENTED .. access to the chip is segmented (mainly for i82527 chips)

clock

chip base clock frequency in Hz

write_register

write chip register function copy -

read_register

read chip register function copy

sja_cdr_reg

SJA specific register - holds hardware specific options for the Clock Divider register. Options defined in the sja1000.h file: CDR_CLKOUT_MASK, CDR_CLK_OFF, CDR_RXINPEN, CDR_CBP, CDR_PELICAN

sja_ocr_reg

SJA specific register - hold hardware specific options for the Output Control register. Options defined in the sja1000.h file: OCR_MODE_BIPHASE, OCR_MODE_TEST, OCR_MODE_NORMAL, OCR_MODE_CLOCK, OCR_TX0_LH, OCR_TX1_ZZ.

int_cpu_reg

Intel specific register - holds hardware specific options for the CPU Interface register. Options defined in the i82527.h file: iCPU_CEN, iCPU_MUX, iCPU_SLP, iCPU_PWD, iCPU_DMC, iCPU_DSC, iCPU_RST.

int_clk_reg

Intel specific register - holds hardware specific options for the Clock Out register. Options defined in the i82527.h file: iCLK_CD0, iCLK_CD1, iCLK_CD2, iCLK_CD3, iCLK_SL0, iCLK_SL1.

int_bus_reg

Intel specific register - holds hardware specific options for the Bus Configuration register. Options defined in the i82527.h file: iBUS_DR0, iBUS_DR1, iBUS_DT1, iBUS_POL, iBUS_CBY.

msgobj

array of pointers to individual communication objects

chipspecops

pointer to the set of chip specific object filled by init_chip_data function

hostdevice

pointer to chip hosting board

max_objects

maximal number of communication objects connected to this chip

Description

The fields write_register and read_register are copied from corresponding fields from hwspecops structure (chip->hostdevice->hwspecops->write_register and chip->hostdevice->hwspecops->read_register) to speedup can_write_reg and can_read_reg functions.