X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/cd2dde52dbdb0dfcb890eb911b30bcfef5b46970..ce073e28de97760024a221efb3dcd799a0b98969:/lincan/include/main.h diff --git a/lincan/include/main.h b/lincan/include/main.h index f92d1c4..2893ef7 100644 --- a/lincan/include/main.h +++ b/lincan/include/main.h @@ -13,6 +13,10 @@ #include "./can_queue.h" #include "lincan_config.h" +#ifdef CONFIG_OC_LINCANVME +#define CAN_ENABLE_VME_SUPPORT +#endif + #ifdef CAN_DEBUG #define DEBUGMSG(fmt,args...) can_printk(KERN_ERR "can.o (debug): " fmt,\ ##args) @@ -88,6 +92,7 @@ struct candevice_t { struct canhardware_t *hosthardware_p; union { + void *anydev; #ifdef CAN_ENABLE_PCI_SUPPORT struct pci_dev *pcidev; #endif /*CAN_ENABLE_PCI_SUPPORT*/ @@ -105,8 +110,9 @@ struct candevice_t { * %CHIP_SEGMENTED .. access to the chip is segmented (mainly for i82527 chips) * @clock: chip base clock frequency in Hz * @baudrate: selected chip baudrate in Hz - * @write_register: write chip register function copy - + * @write_register: write chip register function copy * @read_register: read chip register function copy + * @chip_data: pointer for optional chip specific data extension * @sja_cdr_reg: SJA specific register - * holds hardware specific options for the Clock Divider * register. Options defined in the sja1000.h file: @@ -159,7 +165,9 @@ struct chip_t { void (*write_register)(unsigned char data,unsigned long address); unsigned (*read_register)(unsigned long address); - + + void *chip_data; + unsigned short sja_cdr_reg; /* sja1000 only! */ unsigned short sja_ocr_reg; /* sja1000 only! */ unsigned short int_cpu_reg; /* intel 82527 only! */ @@ -309,6 +317,7 @@ struct hwspecops_t { * @remote_request: configures message object and asks for RTR message * @check_tx_stat: checks state of transmission engine * @wakeup_tx: wakeup TX processing + * @filtch_rq: optional routine for propagation of outgoing edges filters to HW * @enable_configuration: enable chip configuration mode * @disable_configuration: disable chip configuration mode * @set_btregs: configures bitrate registers @@ -336,6 +345,7 @@ struct chipspecops_t { int (*remote_request)(struct chip_t *chip, struct msgobj_t *obj); int (*check_tx_stat)(struct chip_t *chip); int (*wakeup_tx)(struct chip_t *chip, struct msgobj_t *obj); + int (*filtch_rq)(struct chip_t *chip, struct msgobj_t *obj); int (*enable_configuration)(struct chip_t *chip); int (*disable_configuration)(struct chip_t *chip); int (*set_btregs)(struct chip_t *chip, unsigned short btr0, @@ -469,6 +479,8 @@ struct boardtype_t { const struct boardtype_t* boardtype_find(const char *str); +int can_check_dev_taken(void *anydev); + #ifdef CAN_WITH_RTL extern int can_rtl_priority; #endif /*CAN_WITH_RTL*/