| CAN Device Driver Internals | ||
|---|---|---|
| <<< Previous | Next >>> | |
struct hwspecops_t {
int (* request_io (struct candevice_t *candev);
int (* release_io (struct candevice_t *candev);
int (* reset (struct candevice_t *candev);
int (* init_hw_data (struct candevice_t *candev);
int (* init_chip_data (struct candevice_t *candev, int chipnr);
int (* init_obj_data (struct chip_t *chip, int objnr);
int (* program_irq (struct candevice_t *candev);
void (* write_register (unsigned char data,unsigned long address);
unsigned (* read_register (unsigned long address);
}; |
reserve io or memory range for can board
free reserved io memory range
hardware reset routine
called to initialize &candevice_t structure, mainly res_add, nr_all_chips, nr_82527_chips, nr_sja1000_chips and flags fields
called initialize each &chip_t structure, mainly chip_type, chip_base_addr, clock and chip specific registers. It is responsible to setup &chip_t->chipspecops functions for non-standard chip types (type other than "i82527", "sja1000" or "sja1000p")
called initialize each &msgobj_t structure, mainly obj_base_addr field.
program interrupt generation hardware of the board if flag PROGRAMMABLE_IRQ is present for specified device/board
low level write register routine
low level read register routine
| <<< Previous | Home | Next >>> |
| struct canuser_t | Up | struct chipspecops_t |