CAN Device Driver Internals | ||
---|---|---|
<<< Previous | Next >>> |
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; }; |
text string describing chip type
index of the chip in candevice_t.chip[] array
chip interrupt number if any
chip base address in the CPU IO or virtual memory space
chip flags: CHIP_CONFIGURED .. chip is configured, CHIP_SEGMENTED .. access to the chip is segmented (mainly for i82527 chips)
chip base clock frequency in Hz
write chip register function copy -
read chip register function copy
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 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.
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.
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.
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.
array of pointers to individual communication objects
pointer to the set of chip specific object filled by init_chip_data function
pointer to chip hosting board
maximal number of communication objects connected to this chip
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.
<<< Previous | Home | Next >>> |
struct candevice_t | Up | struct msgobj_t |