]> rtime.felk.cvut.cz Git - lincan.git/commitdiff
To prevent future name collisions "chip_t" changed to "canchip_t"
authorppisa <ppisa>
Thu, 16 Sep 2004 00:01:34 +0000 (00:01 +0000)
committerppisa <ppisa>
Thu, 16 Sep 2004 00:01:34 +0000 (00:01 +0000)
66 files changed:
lincan/include/aim104.h
lincan/include/c_can.h
lincan/include/can_queue.h
lincan/include/cc_can104.h
lincan/include/constants.h
lincan/include/devcommon.h
lincan/include/finish.h
lincan/include/hms30c7202_can.h
lincan/include/i82527.h
lincan/include/irq.h
lincan/include/m437.h
lincan/include/main.h
lincan/include/msmcan.h
lincan/include/nsi.h
lincan/include/pc-i03.h
lincan/include/pcan_dongle.h
lincan/include/pccan.h
lincan/include/pcccan.h
lincan/include/pcm3680.h
lincan/include/pikronisa.h
lincan/include/pip.h
lincan/include/setup.h
lincan/include/sja1000.h
lincan/include/sja1000p.h
lincan/include/smartcan.h
lincan/include/ssv.h
lincan/include/template.h
lincan/src/Makefile.std
lincan/src/aim104.c
lincan/src/bfadcan.c
lincan/src/c_can.c
lincan/src/c_can_irq.c
lincan/src/can_devrtl.c
lincan/src/cc_can104.c
lincan/src/devcommon.c
lincan/src/ems_cpcpci.c
lincan/src/finish.c
lincan/src/hms30c7202_can.c
lincan/src/i82527.c
lincan/src/ioctl.c
lincan/src/ioctl_rtl.c
lincan/src/irq.c
lincan/src/kv_pcican.c
lincan/src/m437.c
lincan/src/main.c
lincan/src/msmcan.c
lincan/src/nsi.c
lincan/src/open.c
lincan/src/open_rtl.c
lincan/src/pc_i03.c
lincan/src/pcan_dongle.c
lincan/src/pccan.c
lincan/src/pcccan.c
lincan/src/pcm3680.c
lincan/src/pikronisa.c
lincan/src/pip.c
lincan/src/read.c
lincan/src/setup.c
lincan/src/sja1000.c
lincan/src/sja1000p.c
lincan/src/smartcan.c
lincan/src/ssv.c
lincan/src/template.c
lincan/src/unican.c
lincan/src/unican_vme.c
lincan/src/virtual.c

index 4dd71aa39a93f4dc40d996a282cf2e81f02c85b2..0426441da6383abc921deeab0760c3f0217b64db 100644 (file)
@@ -12,7 +12,7 @@ int aim104_release_io(struct candevice_t *candev);
 int aim104_reset(struct candevice_t *candev); 
 int aim104_init_hw_data(struct candevice_t *candev);
 int aim104_init_chip_data(struct candevice_t *candev, int chipnr);
-int aim104_init_obj_data(struct chip_t *chip, int objnr);
+int aim104_init_obj_data(struct canchip_t *chip, int objnr);
 void aim104_write_register(unsigned data, unsigned long address);
 unsigned aim104_read_register(unsigned long address);
 int aim104_program_irq(struct candevice_t *candev);
index 99a4c29284ad6597331d956e75ec37f2cc8d46ec..1c3bb8ff8c04d711ec7f873482b5586cf46fe38e 100644 (file)
@@ -12,7 +12,7 @@
 /* 
  * optimized inline version, may it be, that it can be too fast for the chip
  */
-extern inline void c_can_write_reg_w(const struct chip_t *pchip, u16 data, unsigned reg)
+extern inline void c_can_write_reg_w(const struct canchip_t *pchip, u16 data, unsigned reg)
 {
        u32 address = pchip->chip_base_addr + reg;
     #ifndef CONFIG_OC_LINCAN_DYNAMICIO
@@ -22,7 +22,7 @@ extern inline void c_can_write_reg_w(const struct chip_t *pchip, u16 data, unsig
     #endif /*CONFIG_OC_LINCAN_DYNAMICIO*/
 }
 
-extern inline u16 c_can_read_reg_w(const struct chip_t *pchip, unsigned reg)
+extern inline u16 c_can_read_reg_w(const struct canchip_t *pchip, unsigned reg)
 {
        u32 address = pchip->chip_base_addr + reg;
     #ifndef CONFIG_OC_LINCAN_DYNAMICIO
@@ -37,42 +37,42 @@ extern can_spinlock_t c_can_sprlock; // Spin lock for read operations
 extern can_spinlock_t c_can_if1lock; // spin lock for the if1 register
 extern can_spinlock_t c_can_if2lock; // spin lcok for the if2 register
 
-int c_can_if1_busycheck(struct chip_t *pchip);
-int c_can_if2_busycheck(struct chip_t *pchip);
+int c_can_if1_busycheck(struct canchip_t *pchip);
+int c_can_if2_busycheck(struct canchip_t *pchip);
 
-int c_can_enable_configuration(struct chip_t *pchip);
-int c_can_disable_configuration(struct chip_t *pchip);
-int c_can_chip_config(struct chip_t *pchip);
-int c_can_baud_rate(struct chip_t *chip, int rate, int clock,
+int c_can_enable_configuration(struct canchip_t *pchip);
+int c_can_disable_configuration(struct canchip_t *pchip);
+int c_can_chip_config(struct canchip_t *pchip);
+int c_can_baud_rate(struct canchip_t *chip, int rate, int clock,
                        int sjw, int sampl_pt, int flags);
 int c_can_mask(struct msgobj_t *pmsgobj,
               u32 mask,
               u16 usedirbit);
 int c_can_use_mask(struct msgobj_t *pmsgobj,
                   u16 useflag);
-int c_can_clear_objects(struct chip_t *pchip);
-int c_can_config_irqs(struct chip_t *pchip,
+int c_can_clear_objects(struct canchip_t *pchip);
+int c_can_config_irqs(struct canchip_t *pchip,
                       u16 irqs);
-int c_can_pre_read_config(struct chip_t *chip, struct msgobj_t *obj);
-int c_can_send_msg(struct chip_t *pchip, struct msgobj_t *pmsgobj,
+int c_can_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj);
+int c_can_send_msg(struct canchip_t *pchip, struct msgobj_t *pmsgobj,
                        struct canmsg_t *pmsg);
-int c_can_remote_request(struct chip_t *pchip, struct msgobj_t *pmsgobj );
-int c_can_set_btregs(struct chip_t *chip,
+int c_can_remote_request(struct canchip_t *pchip, struct msgobj_t *pmsgobj );
+int c_can_set_btregs(struct canchip_t *chip,
                      u16 btr0,
                     u16 btr1);
-int c_can_start_chip(struct chip_t *pchip);
-int c_can_stop_chip(struct chip_t *pchip);
-int c_can_check_tx_stat(struct chip_t *pchip);
+int c_can_start_chip(struct canchip_t *pchip);
+int c_can_stop_chip(struct canchip_t *pchip);
+int c_can_check_tx_stat(struct canchip_t *pchip);
 
 int c_can_register(struct chipspecops_t *chipspecops);
 
-void c_can_registerdump(struct chip_t *pchip);
+void c_can_registerdump(struct canchip_t *pchip);
 
-void c_can_irq_sync_activities(struct chip_t *chip, struct msgobj_t *obj);
+void c_can_irq_sync_activities(struct canchip_t *chip, struct msgobj_t *obj);
 
-int c_can_irq_handler(int irq, struct chip_t *chip);
+int c_can_irq_handler(int irq, struct canchip_t *chip);
 
-int c_can_fill_chipspecops(struct chip_t *chip);
+int c_can_fill_chipspecops(struct canchip_t *chip);
 
 /* BasicCAN mode address map */
 #define CCCR      0x0000       /* Control Register */
index 5ed1fe41fc31f5ab30a62ef10810e7ee8828e7e7..859334629b3f96d5f3ab3beca0a51cc490a20f9d 100644 (file)
@@ -273,7 +273,7 @@ int canque_fifo_init_slots(struct canque_fifo_t *fifo);
 
 /* Forward declarations for external types */
 struct msgobj_t;
-struct chip_t;
+struct canchip_t;
 
 /**
  * struct canque_edge_t - CAN message delivery subsystem graph edge
@@ -382,7 +382,7 @@ struct canque_ends_t {
            #endif /*CAN_WITH_RTL*/
                struct {
                        struct msgobj_t *msgobj;
-                       struct chip_t *chip;
+                       struct canchip_t *chip;
                    #ifndef CAN_WITH_RTL
                        wait_queue_head_t daemonq;
                    #else /*CAN_WITH_RTL*/
index 3f2b063fd9a3b1a19676a75b4f5e5f25315c1390..722746a8deccc7bab2749cf963a9051191167860 100644 (file)
@@ -12,7 +12,7 @@ int cc104_release_io(struct candevice_t *candev);
 int cc104_reset(struct candevice_t *candev); 
 int cc104_init_hw_data(struct candevice_t *candev);
 int cc104_init_chip_data(struct candevice_t *candev, int chipnr);
-int cc104_init_obj_data(struct chip_t *chip, int objnr);
+int cc104_init_obj_data(struct canchip_t *chip, int objnr);
 void cc104_write_register(unsigned data, unsigned long address);
 unsigned cc104_read_register(unsigned long address);
 int cc104_program_irq(struct candevice_t *candev);
index aef197deaa2fce7a562ebbd1d35dda357ec977e8..ce3d742fa625c9f03171f9e7736aa6e2ebceaec8 100644 (file)
@@ -72,7 +72,7 @@
   test_and_clear_bit(MSGOBJ_##obj_fl##_b,&(obj)->obj_flags)
 
 
-/* These flags can be used for the chip_t structure flags data entry */
+/* These flags can be used for the canchip_t structure flags data entry */
 #define CHIP_CONFIGURED  (1<<0)
 #define CHIP_SEGMENTED   (1<<1)
 #define CHIP_IRQ_SETUP   (1<<2)
index b4acba795fe037e6311fbc8b805640ceac60e27f..837ffb6b11724964f5014191b430d827e58f93d8 100644 (file)
@@ -11,5 +11,5 @@
 #include "./constants.h"
 #include "./can_queue.h"
 
-int canqueue_ends_init_chip(struct canque_ends_t *qends, struct chip_t *chip, struct msgobj_t *obj);
+int canqueue_ends_init_chip(struct canque_ends_t *qends, struct canchip_t *chip, struct msgobj_t *obj);
 int canqueue_ends_done_chip(struct canque_ends_t *qends);
index 18007a0423b089ae8910c26074131cb263889bf4..87df0465c16f465698cf08238ab5dd909d9b6262 100644 (file)
@@ -8,6 +8,6 @@
  */
 
 void msgobj_done(struct msgobj_t *obj);
-void canchip_done(struct chip_t *chip);
+void canchip_done(struct canchip_t *chip);
 void candevice_done(struct candevice_t *candev);
 void canhardware_done(struct canhardware_t *candev);
index c1aaf43ac9ccb82af0f6981fb150c401a06a1820..9b4704e6bc54d3b7b90ebc878096e32baddf1bf3 100644 (file)
@@ -22,7 +22,7 @@ unsigned hms30c7202_read_register(unsigned long address);
 \r
 \r
 \r
-int hms30c7202_init_obj_data(struct chip_t *chip, int objnr);\r
+int hms30c7202_init_obj_data(struct canchip_t *chip, int objnr);\r
 int hms30c7202_program_irq(struct candevice_t *candev);\r
 \r
 #endif /* __HMS30C7202_CAN__ */\r
index cc1f31494258089769785814415da38b9b85df7e..17473968f0771acdd603bd5fb9637c241f9fb8a0 100644 (file)
@@ -7,32 +7,32 @@
  * Version lincan-0.3  17 Jun 2004
  */
 
-int i82527_enable_configuration(struct chip_t *chip);
-int i82527_disable_configuration(struct chip_t *chip);
-int i82527_chip_config(struct chip_t *chip);
-int i82527_baud_rate(struct chip_t *chip, int rate, int clock, int sjw, 
+int i82527_enable_configuration(struct canchip_t *chip);
+int i82527_disable_configuration(struct canchip_t *chip);
+int i82527_chip_config(struct canchip_t *chip);
+int i82527_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw, 
                                                int sampl_pt, int flags);
-int i82527_standard_mask(struct chip_t *chip, unsigned short code, 
+int i82527_standard_mask(struct canchip_t *chip, unsigned short code, 
                                                        unsigned short mask);
-int i82527_extended_mask(struct chip_t *chip, unsigned long code, 
+int i82527_extended_mask(struct canchip_t *chip, unsigned long code, 
                                                        unsigned long mask);
-int i82527_message15_mask(struct chip_t *chip, unsigned long code, 
+int i82527_message15_mask(struct canchip_t *chip, unsigned long code, 
                                                        unsigned long mask);
-int i82527_clear_objects(struct chip_t *chip);
-int i82527_config_irqs(struct chip_t *chip, short irqs);
-int i82527_pre_read_config(struct chip_t *chip, struct msgobj_t *obj);
-int i82527_pre_write_config(struct chip_t *chip, struct msgobj_t *obj,
+int i82527_clear_objects(struct canchip_t *chip);
+int i82527_config_irqs(struct canchip_t *chip, short irqs);
+int i82527_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj);
+int i82527_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj,
                                                        struct canmsg_t *msg);
-int i82527_send_msg(struct chip_t *chip, struct msgobj_t *obj,
+int i82527_send_msg(struct canchip_t *chip, struct msgobj_t *obj,
                                                        struct canmsg_t *msg);
-int i82527_remote_request(struct chip_t *chip, struct msgobj_t *obj);
-int i82527_set_btregs(struct chip_t *chip, unsigned short btr0, 
+int i82527_remote_request(struct canchip_t *chip, struct msgobj_t *obj);
+int i82527_set_btregs(struct canchip_t *chip, unsigned short btr0, 
                                                        unsigned short btr1);
-int i82527_start_chip(struct chip_t *chip);
-int i82527_stop_chip(struct chip_t *chip);
-int i82527_check_tx_stat(struct chip_t *chip);
-int i82527_irq_handler(int irq, struct chip_t *chip);
-int i82527_fill_chipspecops(struct chip_t *chip);
+int i82527_start_chip(struct canchip_t *chip);
+int i82527_stop_chip(struct canchip_t *chip);
+int i82527_check_tx_stat(struct canchip_t *chip);
+int i82527_irq_handler(int irq, struct canchip_t *chip);
+int i82527_fill_chipspecops(struct canchip_t *chip);
 
 
 #define MSG_OFFSET(object) ((object)*0x10)
@@ -173,5 +173,5 @@ enum i82527_iMSGCFG {
        MCFG_DIR = 1<<3                 // Direction is Transmit
 };
 
-void i82527_seg_write_reg(const struct chip_t *chip, unsigned char data, unsigned address);
-unsigned i82527_seg_read_reg(const struct chip_t *chip, unsigned address);
+void i82527_seg_write_reg(const struct canchip_t *chip, unsigned char data, unsigned address);
+unsigned i82527_seg_read_reg(const struct canchip_t *chip, unsigned address);
index 315336a1ccfe694a717afc85865d420210a67c2b..e2601d7a972d7a846f6b87cdc691dca666eeb38e 100644 (file)
@@ -7,7 +7,7 @@
  * Version lincan-0.3  17 Jun 2004
  */
 
-int i82527_irq_handler(int irq, struct chip_t *chip);
-int sja1000_irq_handler(int irq, struct chip_t *chip);
-int sja1000p_irq_handler(int irq, struct chip_t *chip);
-int dummy_irq_handler(int irq, struct chip_t *chip);
+int i82527_irq_handler(int irq, struct canchip_t *chip);
+int sja1000_irq_handler(int irq, struct canchip_t *chip);
+int sja1000p_irq_handler(int irq, struct canchip_t *chip);
+int dummy_irq_handler(int irq, struct canchip_t *chip);
index ad54ccfc26635da0b45709137488f46cd6b17663..351e3a3cf95186481c2648d0d5c8f9ce87b86e8c 100644 (file)
@@ -14,7 +14,7 @@ int m437_release_io(struct candevice_t *candev);
 int m437_reset(struct candevice_t *candev); 
 int m437_init_hw_data(struct candevice_t *candev);
 int m437_init_chip_data(struct candevice_t *candev, int chipnr);
-int m437_init_obj_data(struct chip_t *chip, int objnr);
+int m437_init_obj_data(struct canchip_t *chip, int objnr);
 void m437_write_register(unsigned data, unsigned long address);
 unsigned m437_read_register(unsigned long address);
 int m437_program_irq(struct candevice_t *candev);
index 3af24c62bf32ba577ea53235e78d54ca07128779..0a12ffe2a0bd4da961618b7c73374e2553ebb070 100644 (file)
@@ -80,7 +80,7 @@ struct candevice_t {
        int nr_all_chips;
        int nr_82527_chips;
        int nr_sja1000_chips;
-       struct chip_t *chip[MAX_HW_CHIPS];
+       struct canchip_t *chip[MAX_HW_CHIPS];
 
        struct hwspecops_t *hwspecops;
 
@@ -96,7 +96,7 @@ struct candevice_t {
 };
 
 /**
- * struct chip_t - CAN chip state and type information
+ * struct canchip_t - CAN chip state and type information
  * @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
@@ -149,7 +149,7 @@ struct candevice_t {
  * chip->hostdevice->hwspecops->read_register)
  * to speedup can_write_reg() and can_read_reg() functions.
  */
-struct chip_t {
+struct canchip_t {
        char *chip_type;
        int chip_idx;   /* chip index in candevice_t.chip[] */
        int chip_irq;
@@ -189,7 +189,7 @@ struct chip_t {
  * struct msgobj_t - structure holding communication object state
  * @obj_base_addr: 
  * @minor: associated device minor number
- * @object: object number in chip_t structure +1
+ * @object: object number in canchip_t structure +1
  * @flags: message object flags
  * @ret: field holding status of the last Tx operation
  * @qends: pointer to message object corresponding ends structure
@@ -201,7 +201,7 @@ struct chip_t {
  * @tx_timeout: can be used by chip driver to check for the transmission timeout
  * @rx_msg: temporary storage to hold received messages before
  *     calling to canque_filter_msg2edges()
- * @hostchip: pointer to the &chip_t structure this object belongs to
+ * @hostchip: pointer to the &canchip_t structure this object belongs to
  * @obj_used: counter of users (associated file structures for Linux
  *     userspace clients) of this object
  * @obj_users: list of user structures of type &canuser_t.
@@ -215,7 +215,7 @@ struct chip_t {
 struct msgobj_t {
        unsigned long obj_base_addr;
        unsigned int minor;     /* associated device minor number  */
-       unsigned int object;    /* object number in chip_t +1 for debug printk */
+       unsigned int object;    /* object number in canchip_t +1 for debug printk */
        unsigned long obj_flags; 
        int ret;
 
@@ -228,7 +228,7 @@ struct msgobj_t {
        
        struct canmsg_t rx_msg;
 
-       struct chip_t *hostchip;
+       struct canchip_t *hostchip;
  
        unsigned long rx_preconfig_id;
 
@@ -278,9 +278,9 @@ struct canuser_t {
  * @init_hw_data: called to initialize &candevice_t structure, mainly 
  *     @res_add, @nr_all_chips, @nr_82527_chips, @nr_sja1000_chips
  *     and @flags fields
- * @init_chip_data: called initialize each &chip_t structure, mainly
+ * @init_chip_data: called initialize each &canchip_t structure, mainly
  *     @chip_type, @chip_base_addr, @clock and chip specific registers.
- *     It is responsible to setup &chip_t->@chipspecops functions
+ *     It is responsible to setup &canchip_t->@chipspecops functions
  *     for non-standard chip types (type other than "i82527", "sja1000" or "sja1000p")
  * @init_obj_data: called initialize each &msgobj_t structure,
  *     mainly @obj_base_addr field.
@@ -295,7 +295,7 @@ struct hwspecops_t {
        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 (*init_obj_data)(struct canchip_t *chip, int objnr);
        int (*program_irq)(struct candevice_t *candev);
        void (*write_register)(unsigned data,unsigned long address);
        unsigned (*read_register)(unsigned long address);
@@ -325,33 +325,33 @@ struct hwspecops_t {
  * @irq_handler: interrupt service routine
  */
 struct chipspecops_t {
-       int (*chip_config)(struct chip_t *chip);
-       int (*baud_rate)(struct chip_t *chip, int rate, int clock, int sjw,
+       int (*chip_config)(struct canchip_t *chip);
+       int (*baud_rate)(struct canchip_t *chip, int rate, int clock, int sjw,
                                                int sampl_pt, int flags);
-       int (*standard_mask)(struct chip_t *chip, unsigned short code, 
+       int (*standard_mask)(struct canchip_t *chip, unsigned short code, 
                                                        unsigned short mask);
-       int (*extended_mask)(struct chip_t *chip, unsigned long code, 
+       int (*extended_mask)(struct canchip_t *chip, unsigned long code, 
                                                        unsigned long mask);
-       int (*message15_mask)(struct chip_t *chip, unsigned long code, 
+       int (*message15_mask)(struct canchip_t *chip, unsigned long code, 
                                                        unsigned long mask);
-       int (*clear_objects)(struct chip_t *chip);
-       int (*config_irqs)(struct chip_t *chip, short irqs);
-       int (*pre_read_config)(struct chip_t *chip, struct msgobj_t *obj);
-       int (*pre_write_config)(struct chip_t *chip, struct msgobj_t *obj,
+       int (*clear_objects)(struct canchip_t *chip);
+       int (*config_irqs)(struct canchip_t *chip, short irqs);
+       int (*pre_read_config)(struct canchip_t *chip, struct msgobj_t *obj);
+       int (*pre_write_config)(struct canchip_t *chip, struct msgobj_t *obj,
                                                        struct canmsg_t *msg);
-       int (*send_msg)(struct chip_t *chip, struct msgobj_t *obj,
+       int (*send_msg)(struct canchip_t *chip, struct msgobj_t *obj,
                                                        struct canmsg_t *msg);
-       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, 
+       int (*remote_request)(struct canchip_t *chip, struct msgobj_t *obj);
+       int (*check_tx_stat)(struct canchip_t *chip);
+       int (*wakeup_tx)(struct canchip_t *chip, struct msgobj_t *obj);
+       int (*filtch_rq)(struct canchip_t *chip, struct msgobj_t *obj);
+       int (*enable_configuration)(struct canchip_t *chip);
+       int (*disable_configuration)(struct canchip_t *chip);
+       int (*set_btregs)(struct canchip_t *chip, unsigned short btr0, 
                                                        unsigned short btr1);
-       int (*start_chip)(struct chip_t *chip);
-       int (*stop_chip)(struct chip_t *chip);
-       int (*irq_handler)(int irq, struct chip_t *chip);
+       int (*start_chip)(struct canchip_t *chip);
+       int (*stop_chip)(struct canchip_t *chip);
+       int (*irq_handler)(int irq, struct canchip_t *chip);
 };
 
 struct mem_addr {
@@ -378,47 +378,47 @@ extern unsigned long io[MAX_HW_CARDS];
 extern int processlocal;
 
 extern struct canhardware_t *hardware_p;
-extern struct chip_t *chips_p[MAX_TOT_CHIPS];
+extern struct canchip_t *chips_p[MAX_TOT_CHIPS];
 extern struct msgobj_t *objects_p[MAX_TOT_MSGOBJS];
 
 extern struct mem_addr *mem_head;
 
 
 #if defined(CONFIG_OC_LINCAN_PORTIO_ONLY)
-extern inline void can_write_reg(const struct chip_t *chip, unsigned char data, unsigned address)
+extern inline void can_write_reg(const struct canchip_t *chip, unsigned char data, unsigned address)
 {
        outb(data, chip->chip_base_addr+address);
 }
-extern inline unsigned can_read_reg(const struct chip_t *chip, unsigned address)
+extern inline unsigned can_read_reg(const struct canchip_t *chip, unsigned address)
 {
        return inb(chip->chip_base_addr+address);
 }
-extern inline void canobj_write_reg(const struct chip_t *chip, const struct msgobj_t *obj,
+extern inline void canobj_write_reg(const struct canchip_t *chip, const struct msgobj_t *obj,
                                unsigned char data, unsigned address)
 {
        outb(data, obj->obj_base_addr+address);
 }
-extern inline unsigned canobj_read_reg(const struct chip_t *chip, const struct msgobj_t *obj,
+extern inline unsigned canobj_read_reg(const struct canchip_t *chip, const struct msgobj_t *obj,
                                unsigned address)
 {
        return inb(obj->obj_base_addr+address);
 }
 
 #elif defined(CONFIG_OC_LINCAN_MEMIO_ONLY)
-extern inline void can_write_reg(const struct chip_t *chip, unsigned char data, unsigned address)
+extern inline void can_write_reg(const struct canchip_t *chip, unsigned char data, unsigned address)
 {
        writeb(data, chip->chip_base_addr+address);
 }
-extern inline unsigned can_read_reg(const struct chip_t *chip, unsigned address)
+extern inline unsigned can_read_reg(const struct canchip_t *chip, unsigned address)
 {
        return readb(chip->chip_base_addr+address);
 }
-extern inline void canobj_write_reg(const struct chip_t *chip, const struct msgobj_t *obj,
+extern inline void canobj_write_reg(const struct canchip_t *chip, const struct msgobj_t *obj,
                                unsigned char data, unsigned address)
 {
        writeb(data, obj->obj_base_addr+address);
 }
-extern inline unsigned canobj_read_reg(const struct chip_t *chip, const struct msgobj_t *obj,
+extern inline unsigned canobj_read_reg(const struct canchip_t *chip, const struct msgobj_t *obj,
                                unsigned address)
 {
        return readb(obj->obj_base_addr+address);
@@ -432,21 +432,21 @@ extern inline unsigned canobj_read_reg(const struct chip_t *chip, const struct m
 /* Inline function to write to the hardware registers. The argument address is 
  * relative to the memory map of the chip and not the absolute memory address.
  */
-extern inline void can_write_reg(const struct chip_t *chip, unsigned char data, unsigned address)
+extern inline void can_write_reg(const struct canchip_t *chip, unsigned char data, unsigned address)
 {
        unsigned long address_to_write;
        address_to_write = chip->chip_base_addr+address;
        chip->write_register(data, address_to_write);
 }
 
-extern inline unsigned can_read_reg(const struct chip_t *chip, unsigned address)
+extern inline unsigned can_read_reg(const struct canchip_t *chip, unsigned address)
 {
        unsigned long address_to_read;
        address_to_read = chip->chip_base_addr+address;
        return chip->read_register(address_to_read);
 }
 
-extern inline void canobj_write_reg(const struct chip_t *chip, const struct msgobj_t *obj,
+extern inline void canobj_write_reg(const struct canchip_t *chip, const struct msgobj_t *obj,
                                unsigned char data, unsigned address)
 {
        unsigned long address_to_write;
@@ -454,7 +454,7 @@ extern inline void canobj_write_reg(const struct chip_t *chip, const struct msgo
        chip->write_register(data, address_to_write);
 }
 
-extern inline unsigned canobj_read_reg(const struct chip_t *chip, const struct msgobj_t *obj,
+extern inline unsigned canobj_read_reg(const struct canchip_t *chip, const struct msgobj_t *obj,
                                unsigned address)
 {
        unsigned long address_to_read;
index f2d2a00999f66dee2aa5b9440877b6bd0b01724d..9f5b3872d382a6058b0e2df1ff4f580cd2a7d5ca 100644 (file)
@@ -12,7 +12,7 @@ int msmcan_release_io(struct candevice_t *candev);
 int msmcan_reset(struct candevice_t *candev); 
 int msmcan_init_hw_data(struct candevice_t *candev);
 int msmcan_init_chip_data(struct candevice_t *candev, int chipnr);
-int msmcan_init_obj_data(struct chip_t *chip, int objnr);
+int msmcan_init_obj_data(struct canchip_t *chip, int objnr);
 void msmcan_write_register(unsigned data, unsigned long address);
 unsigned msmcan_read_register(unsigned long address);
 int msmcan_program_irq(struct candevice_t *candev);
index 8ccc1b192a3b7b4902d340793501a91b876a1fb7..c48e4ef443edec97778855438780814275305c2c 100644 (file)
@@ -12,7 +12,7 @@ int nsi_release_io(struct candevice_t *candev);
 int nsi_reset(struct candevice_t *candev); 
 int nsi_init_hw_data(struct candevice_t *candev);
 int nsi_init_chip_data(struct candevice_t *candev, int chipnr);
-int nsi_init_obj_data(struct chip_t *chip, int objnr);
+int nsi_init_obj_data(struct canchip_t *chip, int objnr);
 void nsi_write_register(unsigned data, unsigned long address);
 unsigned nsi_read_register(unsigned long address);
 int nsi_program_irq(struct candevice_t *candev);
index 6d7b6e7c78b17969380f561ca3ffc490b5b09cf5..0e8ec4f3272a29631b2bfc9872bc5cb87d01be22 100644 (file)
@@ -12,7 +12,7 @@ int pci03_release_io(struct candevice_t *candev);
 int pci03_reset(struct candevice_t *candev); 
 int pci03_init_hw_data(struct candevice_t *candev);
 int pci03_init_chip_data(struct candevice_t *candev, int chipnr);
-int pci03_init_obj_data(struct chip_t *chip, int objnr);
+int pci03_init_obj_data(struct canchip_t *chip, int objnr);
 void pci03_write_register(unsigned data, unsigned long address);
 unsigned pci03_read_register(unsigned long address);
 int pci03_program_irq(struct candevice_t *candev);
index 307071a21ea36208b82073daca40af77d0f0cf71..ca5a14daef4d375e53276fda7f75b485e979715f 100644 (file)
@@ -83,7 +83,7 @@ struct DONGLE_PORT
   int  nMinor;                                             // the associated minor
   char *type;                                              // the literal type of the device, info only
 
-  struct chip_t *chip;
+  struct canchip_t *chip;
 };
 
 
@@ -95,7 +95,7 @@ int pcan_dongle_release_io(struct candevice_t *candev);
 int pcan_dongle_reset(struct candevice_t *candev); 
 int pcan_dongle_init_hw_data(struct candevice_t *candev);
 int pcan_dongle_init_chip_data(struct candevice_t *candev, int chipnr);
-int pcan_dongle_init_obj_data(struct chip_t *chip, int objnr);
+int pcan_dongle_init_obj_data(struct canchip_t *chip, int objnr);
 void pcan_dongle_write_register(unsigned data, unsigned long address);
 unsigned pcan_dongle_read_register(unsigned long address);
 int pcan_dongle_program_irq(struct candevice_t *candev);
index 62561dfae3aa74b3d15f119781903ec038bd6f63..918e7cdf1b1f30d25bb372a448e9cf0a28f2b44c 100644 (file)
@@ -18,7 +18,7 @@ int pccand_reset(struct candevice_t *candev);
 int pccanq_reset(struct candevice_t *candev); 
 int pccan_init_hw_data(struct candevice_t *candev);
 int pccan_init_chip_data(struct candevice_t *candev, int chipnr);
-int pccan_init_obj_data(struct chip_t *chip, int objnr);
+int pccan_init_obj_data(struct canchip_t *chip, int objnr);
 void pccan_write_register(unsigned data, unsigned long address);
 unsigned pccan_read_register(unsigned long address);
 int pccan_program_irq(struct candevice_t *candev);
index 4efb380c0d92cc2edb804e11384940f2d9172d69..50039c1e0a4c6045113a25b69a1578485ee422e1 100644 (file)
@@ -12,7 +12,7 @@ int pcccan_release_io(struct candevice_t *candev);
 int pcccan_reset(struct candevice_t *candev); 
 int pcccan_init_hw_data(struct candevice_t *candev);
 int pcccan_init_chip_data(struct candevice_t *candev, int chipnr);
-int pcccan_init_obj_data(struct chip_t *chip, int objnr);
+int pcccan_init_obj_data(struct canchip_t *chip, int objnr);
 void pcccan_write_register(unsigned data, unsigned long address);
 unsigned pcccan_read_register(unsigned long address);
 int pcccan_program_irq(struct candevice_t *candev);
index 18a13e1e1890ae6871006bc75ccba1fa0feb0d4c..d97cbd2f37317a74394f26a0c0d1527ff5c7cfcc 100644 (file)
@@ -12,7 +12,7 @@ int pcm3680_release_io(struct candevice_t *candev);
 int pcm3680_reset(struct candevice_t *candev); 
 int pcm3680_init_hw_data(struct candevice_t *candev);
 int pcm3680_init_chip_data(struct candevice_t *candev, int chipnr);
-int pcm3680_init_obj_data(struct chip_t *chip, int objnr);
+int pcm3680_init_obj_data(struct canchip_t *chip, int objnr);
 void pcm3680_write_register(unsigned data, unsigned long address);
 unsigned pcm3680_read_register(unsigned long address);
 int pcm3680_program_irq(struct candevice_t *candev);
index 4d2ae68ff7468372ba41a8058e4c2a7a192bb865..a6ba3998a147084e322ee781b68df54de02e8484 100644 (file)
@@ -15,7 +15,7 @@ int pikronisa_release_io(struct candevice_t *candev);
 int pikronisa_reset(struct candevice_t *candev); 
 int pikronisa_init_hw_data(struct candevice_t *candev);
 int pikronisa_init_chip_data(struct candevice_t *candev, int chipnr);
-int pikronisa_init_obj_data(struct chip_t *chip, int objnr);
+int pikronisa_init_obj_data(struct canchip_t *chip, int objnr);
 int pikronisa_program_irq(struct candevice_t *candev);
 void pikronisa_write_register(unsigned data, unsigned long address);
 unsigned pikronisa_read_register(unsigned long address);
index cc77559225a9f1eb00aa86b62cbb92395bfa1bdb..bcec26b3d518b7bea5de83901390a1e283edc6a6 100644 (file)
@@ -12,7 +12,7 @@ int pip5_release_io(struct candevice_t *candev);
 int pip5_reset(struct candevice_t *candev); 
 int pip5_init_hw_data(struct candevice_t *candev);
 int pip5_init_chip_data(struct candevice_t *candev, int chipnr);
-int pip5_init_obj_data(struct chip_t *chip, int objnr);
+int pip5_init_obj_data(struct canchip_t *chip, int objnr);
 void pip5_write_register(unsigned data, unsigned long address);
 unsigned pip5_read_register(unsigned long address);
 int pip5_program_irq(struct candevice_t *candev);
index 4229f20af9322c2ec6625d45fced1040ee084afe..d35a8b1e51192a7d0fd270749478a7479a79cfb8 100644 (file)
@@ -12,5 +12,5 @@ int list_hw(void);
 void *can_checked_malloc(size_t size);
 int can_checked_free(void *address_p);
 int can_del_mem_list(void);
-int can_chip_setup_irq(struct chip_t *chip);
-void can_chip_free_irq(struct chip_t *chip);
+int can_chip_setup_irq(struct canchip_t *chip);
+void can_chip_free_irq(struct canchip_t *chip);
index abc516983b40f7f7245f18a600ffd1c15511ac9f..fa04cce0939f49a3b4b3c373875050ea0c3a5779 100644 (file)
@@ -7,24 +7,24 @@
  * Version lincan-0.3  17 Jun 2004
  */
 
-int sja1000_enable_configuration(struct chip_t *chip);
-int sja1000_disable_configuration(struct chip_t *chip);
-int sja1000_chip_config(struct chip_t *chip);
-int sja1000_standard_mask(struct chip_t *chip, unsigned short code, unsigned short mask);
-int sja1000_baud_rate(struct chip_t *chip, int rate, int clock, int sjw, 
+int sja1000_enable_configuration(struct canchip_t *chip);
+int sja1000_disable_configuration(struct canchip_t *chip);
+int sja1000_chip_config(struct canchip_t *chip);
+int sja1000_standard_mask(struct canchip_t *chip, unsigned short code, unsigned short mask);
+int sja1000_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw, 
                                                int sampl_pt, int flags);
-int sja1000_pre_read_config(struct chip_t *chip, struct msgobj_t *obj);
-int sja1000_pre_write_config(struct chip_t *chip, struct msgobj_t *obj, 
+int sja1000_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj);
+int sja1000_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg);
-int sja1000_send_msg(struct chip_t *chip, struct msgobj_t *obj, 
+int sja1000_send_msg(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg);
-int sja1000_check_tx_stat(struct chip_t *chip);
-int sja1000_set_btregs(struct chip_t *chip, unsigned short btr0, 
+int sja1000_check_tx_stat(struct canchip_t *chip);
+int sja1000_set_btregs(struct canchip_t *chip, unsigned short btr0, 
                                                        unsigned short btr1);
-int sja1000_start_chip(struct chip_t *chip);
-int sja1000_stop_chip(struct chip_t *chip);
-int sja1000_irq_handler(int irq, struct chip_t *chip);
-int sja1000_fill_chipspecops(struct chip_t *chip);
+int sja1000_start_chip(struct canchip_t *chip);
+int sja1000_stop_chip(struct canchip_t *chip);
+int sja1000_irq_handler(int irq, struct canchip_t *chip);
+int sja1000_fill_chipspecops(struct canchip_t *chip);
 
 /* BasicCAN mode address map */
 #define SJACR          0x00    /* Control register */
index cd21c227ea36625abcf489f4af87a510e8e00bff..9ca166b7262feefd3dfcbcf234135be3ebb72dbf 100644 (file)
@@ -9,17 +9,17 @@
  * Version lincan-0.3  17 Jun 2004
  */
 
-int sja1000p_chip_config(struct chip_t *chip);
-int sja1000p_extended_mask(struct chip_t *chip, unsigned long code, unsigned long mask);
-int sja1000p_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
+int sja1000p_chip_config(struct canchip_t *chip);
+int sja1000p_extended_mask(struct canchip_t *chip, unsigned long code, unsigned long mask);
+int sja1000p_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw,
                int sampl_pt, int flags);
-int sja1000p_pre_read_config(struct chip_t *chip, struct msgobj_t *obj);
-int sja1000p_pre_write_config(struct chip_t *chip, struct msgobj_t *obj,
+int sja1000p_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj);
+int sja1000p_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj,
                struct canmsg_t *msg);
-int sja1000p_send_msg(struct chip_t *chip, struct msgobj_t *obj,
+int sja1000p_send_msg(struct canchip_t *chip, struct msgobj_t *obj,
                struct canmsg_t *msg);
-int sja1000p_fill_chipspecops(struct chip_t *chip);
-int sja1000p_irq_handler(int irq, struct chip_t *chip);
+int sja1000p_fill_chipspecops(struct canchip_t *chip);
+int sja1000p_irq_handler(int irq, struct canchip_t *chip);
 
 
 /* PeliCAN mode */
index e5916c2eb0e3dbc6de01bad01e5d635f2103b8cb..58c0d422e4ddc6b56b7158fc15fbcd0229b979a0 100644 (file)
@@ -12,7 +12,7 @@ int smartcan_release_io(struct candevice_t *candev);
 int smartcan_reset(struct candevice_t *candev);
 int smartcan_init_hw_data(struct candevice_t *candev);
 int smartcan_init_chip_data(struct candevice_t *candev, int chipnr);
-int smartcan_init_obj_data(struct chip_t *chip, int objnr);
+int smartcan_init_obj_data(struct canchip_t *chip, int objnr);
 void smartcan_write_register(unsigned data, unsigned long address);
 unsigned smartcan_read_register(unsigned long address);
 
index ca074fad6835a4ab706d984557cc841214c5aa70..63957821e381020bac3ee71d6853a1b6f7a5190b 100644 (file)
@@ -10,7 +10,7 @@ int ssv_release_io(struct candevice_t *candev);
 int ssv_reset(struct candevice_t *candev);
 int ssv_init_hw_data(struct candevice_t *candev);
 int ssv_init_chip_data(struct candevice_t *candev, int chipnr);
-int ssv_init_obj_data(struct chip_t *chip, int objnr);
+int ssv_init_obj_data(struct canchip_t *chip, int objnr);
 void ssv_write_register(unsigned data, unsigned long address);
 unsigned ssv_read_register(unsigned long address);
 int ssv_program_irq(struct candevice_t *candev);
index bccf422dbd2116c422eeb37bb328d3ff95a13c19..88f162c6f0e568bdda3d85727423ebf5a2ed5125 100644 (file)
@@ -12,7 +12,7 @@ int template_release_io(struct candevice_t *candev);
 int template_reset(struct candevice_t *candev); 
 int template_init_hw_data(struct candevice_t *candev);
 int template_init_chip_data(struct candevice_t *candev, int chipnr);
-int template_init_obj_data(struct chip_t *chip, int objnr);
+int template_init_obj_data(struct canchip_t *chip, int objnr);
 void template_write_register(unsigned data, unsigned long address);
 unsigned template_read_register(unsigned long address);
 int template_program_irq(struct candevice_t *candev);
index 296e65972c551af43944713936a1f7f0982c94bf..52069e224ed8883454c5c8252226688d270c7e5b 100644 (file)
@@ -63,8 +63,7 @@ endif
 SUPPORTED_CARDS = pip pccan smartcan nsi cc_can104 \
                  pc_i03 pcm3680 aim104 m437 pcccan ssv \
                  bfadcan pikronisa kv_pcican msmcan virtual template \
-                 unican unican_cl2
-#                ems_cpcpci # compiles only for 2.6 kernels now
+                 unican unican_cl2 ems_cpcpci
 #                hms30c7202_can c_can c_can_irq
 #                pcan_dongle
 
index d406f76316f49cf45e77e58acb9a00cf803b17a4..485186bdaee82071157df9f96ac404bdc7dbd4fb 100644 (file)
@@ -187,7 +187,7 @@ int aim104_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/template.c
  */
-int aim104_init_obj_data(struct chip_t *chip, int objnr)
+int aim104_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr;
        chip->msgobj[objnr]->obj_flags=0;
index d91603cc45ff61d6efeb20b72e6830b885fe973e..39d52e70aad74f4a1836eb9af4521ba8d265c98c 100644 (file)
@@ -105,7 +105,7 @@ int bfadcan_reset(struct candevice_t *candev)
 {
 
        int i;
-       struct chip_t *chip=candev->chip[0];
+       struct canchip_t *chip=candev->chip[0];
        unsigned cdr;
        
        bfadcan_write_register(sjaMOD_RM, chip->chip_base_addr+SJAMOD);
@@ -234,7 +234,7 @@ int bfadcan_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/bfadcan.c
  */
-int bfadcan_init_obj_data(struct chip_t *chip, int objnr)
+int bfadcan_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr+(objnr+1)*0x10;
        
index bb1ee0bce2b21547154e26aac1a8f916e2ab2a24..94456bb08f309ae677857b711b81df72278d8c22 100644 (file)
@@ -28,7 +28,7 @@ can_spinlock_t c_can_if2lock=SPIN_LOCK_UNLOCKED; // spin lcok for the if2 regist
  * c_can_enable_configuration - enable chip configuration mode
  * @pchip: pointer to chip state structure
  */
-int c_can_enable_configuration(struct chip_t *pchip)
+int c_can_enable_configuration(struct canchip_t *pchip)
 {
    int i=0;
    u16 flags;
@@ -60,7 +60,7 @@ int c_can_enable_configuration(struct chip_t *pchip)
 }
 
 ///////////////////////////////////////////////////////////////////////
-int c_can_disable_configuration(struct chip_t *pchip)
+int c_can_disable_configuration(struct canchip_t *pchip)
 {
    int i=0;
    u16 flags;
@@ -90,7 +90,7 @@ int c_can_disable_configuration(struct chip_t *pchip)
 }
 
 ///////////////////////////////////////////////////////////////////////
-int c_can_chip_config(struct chip_t *pchip)
+int c_can_chip_config(struct canchip_t *pchip)
 {
 
    DEBUGMSG("(c%d)calling c_can_chip_config(...)\n", pchip->chip_idx);
@@ -140,7 +140,7 @@ int c_can_chip_config(struct chip_t *pchip)
 /*
  * Checks if the Busy-Bit in the IF1-Command-Request Register is set
  */
-int c_can_if1_busycheck(struct chip_t *pchip)
+int c_can_if1_busycheck(struct canchip_t *pchip)
 {
 
    int i=0;
@@ -166,7 +166,7 @@ int c_can_if1_busycheck(struct chip_t *pchip)
 /*
  * Checks if the Busy-Bit in the IF2-Command-Request Register is set
  */
-int c_can_if2_busycheck(struct chip_t *pchip)
+int c_can_if2_busycheck(struct canchip_t *pchip)
 {
 
    int i=0;
@@ -201,7 +201,7 @@ int c_can_if2_busycheck(struct chip_t *pchip)
  * param sampl_pt sample point in % (0-100) sets (TSEG1+2)/(TSEG1+TSEG2+3) ratio
  * param flags fields BTR1_SAM, OCMODE, OCPOL, OCTP, OCTN, CLK_OFF, CBP
  */
-int c_can_baud_rate(struct chip_t *pchip, int rate, int clock,
+int c_can_baud_rate(struct canchip_t *pchip, int rate, int clock,
                        int sjw, int sampl_pt, int flags)
 {
    int best_error = 1000000000, error;
@@ -406,7 +406,7 @@ int c_can_use_mask(struct msgobj_t *pmsgobj,
 }
 
 ///////////////////////////////////////////////////////////////////////
-int c_can_clear_objects(struct chip_t *pchip)
+int c_can_clear_objects(struct canchip_t *pchip)
 {
    unsigned short i = 0;
    unsigned short tempreg = 0;
@@ -460,7 +460,7 @@ int c_can_clear_objects(struct chip_t *pchip)
 }
 
 ///////////////////////////////////////////////////////////////////////
-int c_can_config_irqs(struct chip_t *pchip,
+int c_can_config_irqs(struct canchip_t *pchip,
                       u16 irqs)
 {
    u16 tempreg;
@@ -480,7 +480,7 @@ int c_can_config_irqs(struct chip_t *pchip,
 }
 
 ///////////////////////////////////////////////////////////////////////
-int c_can_pre_read_config(struct chip_t *pchip, struct msgobj_t *pmsgobj)
+int c_can_pre_read_config(struct canchip_t *pchip, struct msgobj_t *pmsgobj)
 {
    unsigned short readMaskCM = IFXCM_CNTRL | IFXCM_ARB;
    unsigned short writeMaskCM = IFXCM_CNTRL | IFXCM_ARB | IFXCM_WRRD;
@@ -534,7 +534,7 @@ int c_can_pre_read_config(struct chip_t *pchip, struct msgobj_t *pmsgobj)
 }
 
 ///////////////////////////////////////////////////////////////////////
-int c_can_pre_write_config(struct chip_t *chip, struct msgobj_t *obj, 
+int c_can_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj, 
                                struct canmsg_t *msg)
 {
        return 0; 
@@ -546,7 +546,7 @@ int c_can_pre_write_config(struct chip_t *chip, struct msgobj_t *obj,
  *In this version the method also sends the message.
  */
 
-int c_can_send_msg(struct chip_t *pchip, struct msgobj_t *pmsgobj,
+int c_can_send_msg(struct canchip_t *pchip, struct msgobj_t *pmsgobj,
                        struct canmsg_t *pmsg)
 {   
    unsigned short readMaskCM = IFXCM_CNTRL | IFXCM_ARB | IFXCM_DA | IFXCM_DB;
@@ -622,7 +622,7 @@ int c_can_send_msg(struct chip_t *pchip, struct msgobj_t *pmsgobj,
 }
 
 //////////////////////////////////////////////////////////////////////
-int c_can_remote_request(struct chip_t *pchip, struct msgobj_t *pmsgobj )
+int c_can_remote_request(struct canchip_t *pchip, struct msgobj_t *pmsgobj )
 {
    unsigned short readMaskCM = IFXCM_CNTRL;// | IFXCM_ARB;
    //unsigned short writeMaskCM = IFXCM_CNTRL | IFXCM_ARB | IFXCM_WRRD;
@@ -660,7 +660,7 @@ int c_can_remote_request(struct chip_t *pchip, struct msgobj_t *pmsgobj )
 }
 
 ///////////////////////////////////////////////////////////////////////
-int c_can_set_btregs(struct chip_t *pchip,
+int c_can_set_btregs(struct canchip_t *pchip,
                      u16 btr0,
                     u16 btr1)
 {
@@ -691,7 +691,7 @@ int c_can_set_btregs(struct chip_t *pchip,
 /*
  * Starts the Chip, by setting the CAN Enable Bit
  */
-int c_can_start_chip(struct chip_t *pchip)
+int c_can_start_chip(struct canchip_t *pchip)
 {
    u16 flags = 0;
 
@@ -722,7 +722,7 @@ int c_can_start_chip(struct chip_t *pchip)
 /*
  * Stops the Chip, by deleting the CAN Enable Bit
  */
-int c_can_stop_chip(struct chip_t *pchip)
+int c_can_stop_chip(struct canchip_t *pchip)
 {
    u16 flags = 0;
 
@@ -746,7 +746,7 @@ int c_can_stop_chip(struct chip_t *pchip)
 /*
  *Check the TxOK bit of the Status Register and resets it afterwards.
  */
-int c_can_check_tx_stat(struct chip_t *pchip)
+int c_can_check_tx_stat(struct canchip_t *pchip)
 {
    unsigned long tempstat = 0;
 
@@ -770,7 +770,7 @@ int c_can_check_tx_stat(struct chip_t *pchip)
 
 
 ///////////////////////////////////////////////////////////////////////
-int c_can_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
+int c_can_wakeup_tx(struct canchip_t *chip, struct msgobj_t *obj)
 {
        can_preempt_disable();
        
@@ -785,7 +785,7 @@ int c_can_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
 }
 
 ///////////////////////////////////////////////////////////////////////
-int c_can_filtch_rq(struct chip_t *chip, struct msgobj_t *obj)
+int c_can_filtch_rq(struct canchip_t *chip, struct msgobj_t *obj)
 {
        can_preempt_disable();
        
@@ -800,7 +800,7 @@ int c_can_filtch_rq(struct chip_t *chip, struct msgobj_t *obj)
 
 
 ///////////////////////////////////////////////////////////////////////
-void c_can_registerdump(struct chip_t *pchip)
+void c_can_registerdump(struct canchip_t *pchip)
 {
    CANMSG("------------------------------------\n");
    CANMSG("---------C-CAN Register Dump--------\n");
@@ -912,7 +912,7 @@ int c_can_register(struct chipspecops_t *chipspecops)
        return 0;
 }
 
-int c_can_fill_chipspecops(struct chip_t *chip)
+int c_can_fill_chipspecops(struct canchip_t *chip)
 {
        chip->chip_type="c_can";
        chip->max_objects = 32;
index 71e84fcf18855b8f6286763da722f8b1099302cc..eb03ac8f440f680a0f869bf75a8b7236b6b962fc 100644 (file)
@@ -23,11 +23,11 @@ union c_can_data
 
 
 // prototypes
-inline void c_can_irq_read_handler( struct chip_t *pchip, int idxobj, u32 msgid  );
+inline void c_can_irq_read_handler( struct canchip_t *pchip, int idxobj, u32 msgid  );
 
-inline void c_can_irq_write_handler( struct chip_t *pchip, int idxobj);
+inline void c_can_irq_write_handler( struct canchip_t *pchip, int idxobj);
 
-void c_can_irq_rtr_handler( struct chip_t *pchip, int idxobj, u32 msgid );
+void c_can_irq_rtr_handler( struct canchip_t *pchip, int idxobj, u32 msgid );
 
 u16 readMaskCM = IFXCM_ARB | IFXCM_CNTRL | IFXCM_CLRINTPND
   | IFXCM_TRND | IFXCM_DA | IFXCM_DB;
@@ -41,7 +41,7 @@ u16 msgLstWriteMaskCM =  IFXCM_CNTRL | IFXCM_WRRD;
 // Send a message from the output fifo ( if any ).
 //
 
-inline void c_can_irq_write_handler( struct chip_t *pchip, int idxobj)
+inline void c_can_irq_write_handler( struct canchip_t *pchip, int idxobj)
 {
        int cmd;
        struct msgobj_t *pmsgobj = pchip->msgobj[idxobj];
@@ -103,7 +103,7 @@ inline void c_can_irq_write_handler( struct chip_t *pchip, int idxobj)
 // Message received form the line. Write it in the input fifo->
 //
 
-inline void c_can_irq_read_handler( struct chip_t *pchip,
+inline void c_can_irq_read_handler( struct canchip_t *pchip,
                                    int idxobj, u32 msgid  )
 {
        int i=0;
@@ -184,7 +184,7 @@ inline void c_can_irq_read_handler( struct chip_t *pchip,
        // while
 }
 
-void c_can_irq_sync_activities(struct chip_t *chip, struct msgobj_t *obj)
+void c_can_irq_sync_activities(struct canchip_t *chip, struct msgobj_t *obj)
 {
        while(!can_msgobj_test_and_set_fl(obj,TX_LOCK)) {
 
@@ -214,7 +214,7 @@ void c_can_irq_sync_activities(struct chip_t *chip, struct msgobj_t *obj)
 // c_can_irq_handler
 //
 
-int c_can_irq_handler(int irq, struct chip_t *chip)
+int c_can_irq_handler(int irq, struct canchip_t *chip)
 {
        struct rtr_id *rtr_search = hardware_p->rtr_queue;
        u16 chip_status;
@@ -482,7 +482,7 @@ int c_can_irq_handler(int irq, struct chip_t *chip)
 // c_can_irq_rtr_handler
 //
 
-void c_can_irq_rtr_handler( struct chip_t *pchip, int idxobj, u32 msgid   )
+void c_can_irq_rtr_handler( struct canchip_t *pchip, int idxobj, u32 msgid   )
 {
        short int i=0;
        struct rtr_id *prtr_search = hardware_p->rtr_queue;
index 301c52c757d45446eaa0e80bd8cd285373cb7c8a..4557531d38dfa08e5a0bbfc177b04d634b1b7986 100644 (file)
@@ -26,7 +26,7 @@ can_spinlock_t can_irq_manipulation_lock;
 
 unsigned int can_rtl_isr( unsigned int irq_num, struct pt_regs *r )
 {
-       struct chip_t *chip;
+       struct canchip_t *chip;
        struct candevice_t *candev;
        int board_nr;
        int chip_nr;
@@ -80,7 +80,7 @@ rtl_free_global_irq( irq )
 
 void * can_chip_worker_thread(void *arg)
 {
-       struct chip_t *chip = (struct chip_t *) arg;
+       struct canchip_t *chip = (struct canchip_t *) arg;
        struct msgobj_t *obj;
        int ret, i;
        int loop_cnt;
@@ -154,7 +154,7 @@ void * can_chip_worker_thread(void *arg)
 }
 
 
-int can_chip_setup_irq(struct chip_t *chip)
+int can_chip_setup_irq(struct canchip_t *chip)
 {
        int ret;
         struct sched_param sched_param;
@@ -195,7 +195,7 @@ int can_chip_setup_irq(struct chip_t *chip)
 }
 
 
-void can_chip_free_irq(struct chip_t *chip)
+void can_chip_free_irq(struct canchip_t *chip)
 {
        if(chip->worker_thread)
                pthread_delete_np(chip->worker_thread);
index 92a69948299e8ecbde1c76c49d6e28498cab4203..6d0da981ac1477b2594622de34cc0181824b1d8d 100644 (file)
@@ -168,7 +168,7 @@ int cc104_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/template.c
  */
-int cc104_init_obj_data(struct chip_t *chip, int objnr)
+int cc104_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr;
        
index 8cd6424608888b1f02150ef1497c3a410e3f2039..2af0f86e98eecc2e7148b2af9226c40b38b80fdc 100644 (file)
@@ -14,7 +14,7 @@
 
 #ifdef CAN_WITH_RTL
 static inline
-void canqueue_wake_chip_worker(struct canque_ends_t *qends, struct chip_t *chip, struct msgobj_t *obj)
+void canqueue_wake_chip_worker(struct canque_ends_t *qends, struct canchip_t *chip, struct msgobj_t *obj)
 {
        if(qends->endinfo.chipinfo.worker_thread){
                can_msgobj_set_fl(obj,WORKER_WAKE);
@@ -46,7 +46,7 @@ void canqueue_wake_chip_worker(struct canque_ends_t *qends, struct chip_t *chip,
  */
 void canqueue_notify_chip(struct canque_ends_t *qends, struct canque_edge_t *qedge, int what)
 {
-       struct chip_t *chip=qends->endinfo.chipinfo.chip;
+       struct canchip_t *chip=qends->endinfo.chipinfo.chip;
        struct msgobj_t *obj=qends->endinfo.chipinfo.msgobj;
 
        DEBUGMSG("canqueue_notify_chip for edge %d and event %d\n",qedge->edge_num,what);
@@ -93,7 +93,7 @@ void canqueue_notify_chip(struct canque_ends_t *qends, struct canque_edge_t *qed
  * @chip: pointer to the corresponding CAN chip structure
  * @obj: pointer to the corresponding message object structure
  */
-int canqueue_ends_init_chip(struct canque_ends_t *qends, struct chip_t *chip, struct msgobj_t *obj)
+int canqueue_ends_init_chip(struct canque_ends_t *qends, struct canchip_t *chip, struct msgobj_t *obj)
 {
        int ret;
        ret=canqueue_ends_init_gen(qends);
index 893890957d84954efa1dda06659b7714589f004b..d20e2816696ca0ce089275ef87e1c99a33f22e49 100644 (file)
@@ -123,7 +123,7 @@ int ems_cpcpci_request_io(struct candevice_t *candev)
         * can change when resources are temporarily released
         */
        for(i=0;i<candev->nr_all_chips;i++) {
-               struct chip_t *chip=candev->chip[i];
+               struct canchip_t *chip=candev->chip[i];
                if(!chip) continue;
                chip->chip_base_addr = candev->io_addr+
                        0x400 + i*EMS_CPCPCI_BYTES_PER_CIRCUIT;
@@ -183,9 +183,9 @@ unsigned ems_cpcpci_read_register(unsigned long address)
        return readb(address);
 }
 
-int ems_cpcpci_irq_handler(int irq, struct chip_t *chip)
+int ems_cpcpci_irq_handler(int irq, struct canchip_t *chip)
 {
-       //struct chip_t *chip=(struct chip_t *)dev_id;
+       //struct canchip_t *chip=(struct canchip_t *)dev_id;
        struct candevice_t *candev=chip->hostdevice;
        int i;
        unsigned long icr;
@@ -213,7 +213,7 @@ int ems_cpcpci_irq_handler(int irq, struct chip_t *chip)
 int ems_cpcpci_reset(struct candevice_t *candev)
 {
        int i=0,chip_nr;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        unsigned cdr;
 
        DEBUGMSG("Resetting EMS_CPCPCI hardware ...\n");
@@ -343,7 +343,7 @@ int ems_cpcpci_init_chip_data(struct candevice_t *candev, int chipnr)
        return 0;
 }      
 
-int ems_cpcpci_init_obj_data(struct chip_t *chip, int objnr)
+int ems_cpcpci_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr;
        return 0;
index 752b177793ea5db26273da44094cd5d7d47a39e4..0641048b914b522296d5057ac672cf390b6531b6 100644 (file)
@@ -32,7 +32,7 @@ void msgobj_done(struct msgobj_t *obj)
                if(obj->hostchip->msgobj[obj->object-1] == obj)
                        obj->hostchip->msgobj[obj->object-1]=NULL;
                else
-                       CANMSG("msgobj_done: not registered in the chip_t\n");
+                       CANMSG("msgobj_done: not registered in the canchip_t\n");
                obj->hostchip=NULL;
        }
        
@@ -60,7 +60,7 @@ void msgobj_done(struct msgobj_t *obj)
  * canchip_done - destroys one CAN chip representation
  * @chip: pointer to CAN chip structure
  */
-void canchip_done(struct chip_t *chip)
+void canchip_done(struct canchip_t *chip)
 {
 
        int i;
@@ -96,7 +96,7 @@ void canchip_done(struct chip_t *chip)
 void candevice_done(struct candevice_t *candev)
 {
        int i;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        
        for(i=0; i<candev->nr_all_chips; i++){
                if((chip=candev->chip[i])==NULL)
index 4661c3ac743f335f7aad7ea054a9c350cc3120e9..df21d2db2be1002b52a097d9251a36ebd724c3c0 100644 (file)
@@ -143,7 +143,7 @@ int hms30c7202_reset(  struct candevice_t *candev)
 {
        int i=0;
        int enableTest=0, disableTest=0;
-       struct chip_t *pchip = candev->chip[0];
+       struct canchip_t *pchip = candev->chip[0];
        
        enableTest = pchip->chipspecops->enable_configuration(pchip);
        disableTest = pchip->chipspecops->disable_configuration(pchip);
@@ -190,7 +190,7 @@ int hms30c7202_reset(  struct candevice_t *candev)
  * File: src/template.c
  */
 int hms30c7202_init_hw_data(struct candevice_t *candev) 
-/*( struct chip_t *pchip, u16 chip_nr, u16 startminor, u32 baseaddr, u8 irq )*/
+/*( struct canchip_t *pchip, u16 chip_nr, u16 startminor, u32 baseaddr, u8 irq )*/
 {
        //      u32 intCntrVAddr = 0;
        u32 gpioVAddr = 0;
@@ -327,7 +327,7 @@ int hms30c7202_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/template.c
  */
-int hms30c7202_init_obj_data(struct chip_t *chip, int objnr)
+int hms30c7202_init_obj_data(struct canchip_t *chip, int objnr)
 {
 
        DEBUGMSG("(c%d)calling hms30c7202_init_obj_data( ...)\n", chip->chip_idx);
index 3aed30beb49af7f2def0b3c261781cf944ef6fd5..d11a79b740c8d6d8ef86706067b38835ab2d78a6 100644 (file)
@@ -12,7 +12,7 @@
 #include "../include/main.h"
 #include "../include/i82527.h"
 
-void i82527_irq_rtr_handler(struct chip_t *chip, struct msgobj_t *obj, 
+void i82527_irq_rtr_handler(struct canchip_t *chip, struct msgobj_t *obj, 
                            struct rtr_id *rtr_search, unsigned long message_id);
 
 
@@ -23,7 +23,7 @@ extern int mo15mask;
 /* helper functions for segmented cards read and write configuration and status registers
    above 0xf offset */
 
-void i82527_seg_write_reg(const struct chip_t *chip, unsigned char data, unsigned address)
+void i82527_seg_write_reg(const struct canchip_t *chip, unsigned char data, unsigned address)
 {
        if((address > 0xf) && (chip->flags & CHIP_SEGMENTED))
                canobj_write_reg(chip, chip->msgobj[(address>>4)-1],data, address & 0xf);
@@ -31,7 +31,7 @@ void i82527_seg_write_reg(const struct chip_t *chip, unsigned char data, unsigne
                can_write_reg(chip, data, address);
 }
 
-unsigned i82527_seg_read_reg(const struct chip_t *chip, unsigned address)
+unsigned i82527_seg_read_reg(const struct canchip_t *chip, unsigned address)
 {
        if((address > 0xf) && (chip->flags & CHIP_SEGMENTED))
                return canobj_read_reg(chip, chip->msgobj[(address>>4)-1], address & 0xf);
@@ -39,7 +39,7 @@ unsigned i82527_seg_read_reg(const struct chip_t *chip, unsigned address)
                return can_read_reg(chip, address);
 }
 
-int i82527_enable_configuration(struct chip_t *chip)
+int i82527_enable_configuration(struct canchip_t *chip)
 {
        unsigned short flags=0;
 
@@ -49,7 +49,7 @@ int i82527_enable_configuration(struct chip_t *chip)
        return 0;
 }
 
-int i82527_disable_configuration(struct chip_t *chip)
+int i82527_disable_configuration(struct canchip_t *chip)
 {
        unsigned short flags=0;
 
@@ -59,7 +59,7 @@ int i82527_disable_configuration(struct chip_t *chip)
        return 0;
 }
 
-int i82527_chip_config(struct chip_t *chip)
+int i82527_chip_config(struct canchip_t *chip)
 {
        can_write_reg(chip,chip->int_cpu_reg,iCPU); // Configure cpu interface
        can_write_reg(chip,(iCTL_CCE|iCTL_INI),iCTL); // Enable configuration
@@ -121,7 +121,7 @@ int i82527_chip_config(struct chip_t *chip)
  * param sampl_pt sample point in % (0-100) sets (TSEG1+2)/(TSEG1+TSEG2+3) ratio
  * param flags fields BTR1_SAM, OCMODE, OCPOL, OCTP, OCTN, CLK_OFF, CBP
  */
-int i82527_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
+int i82527_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw,
                                                        int sampl_pt, int flags)
 {
        int best_error = 1000000000, error;
@@ -185,7 +185,7 @@ int i82527_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
        return 0;
 }
 
-int i82527_standard_mask(struct chip_t *chip, unsigned short code, unsigned short mask)
+int i82527_standard_mask(struct canchip_t *chip, unsigned short code, unsigned short mask)
 {
        unsigned char mask0, mask1;
 
@@ -200,7 +200,7 @@ int i82527_standard_mask(struct chip_t *chip, unsigned short code, unsigned shor
        return 0;
 }
 
-int i82527_extended_mask(struct chip_t *chip, unsigned long code, unsigned long mask)
+int i82527_extended_mask(struct canchip_t *chip, unsigned long code, unsigned long mask)
 {
        unsigned char mask0, mask1, mask2, mask3;
 
@@ -219,7 +219,7 @@ int i82527_extended_mask(struct chip_t *chip, unsigned long code, unsigned long
        return 0;
 }
 
-int i82527_message15_mask(struct chip_t *chip, unsigned long code, unsigned long mask)
+int i82527_message15_mask(struct canchip_t *chip, unsigned long code, unsigned long mask)
 {
        unsigned char mask0, mask1, mask2, mask3;
 
@@ -240,7 +240,7 @@ int i82527_message15_mask(struct chip_t *chip, unsigned long code, unsigned long
 
 }
 
-int i82527_clear_objects(struct chip_t *chip)
+int i82527_clear_objects(struct canchip_t *chip)
 {
        int i=0,id=0,data=0;
        struct msgobj_t *obj;
@@ -271,14 +271,14 @@ int i82527_clear_objects(struct chip_t *chip)
        return 0;
 }
 
-int i82527_config_irqs(struct chip_t *chip, short irqs)
+int i82527_config_irqs(struct canchip_t *chip, short irqs)
 {
        can_write_reg(chip,irqs,iCTL);
        DEBUGMSG("Configured hardware interrupt delivery\n");
        return 0;
 }
 
-int i82527_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
+int i82527_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj)
 {
        unsigned long id=obj->rx_preconfig_id;
 
@@ -306,7 +306,7 @@ int i82527_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
        return 0;
 }
 
-int i82527_pre_write_config(struct chip_t *chip, struct msgobj_t *obj,
+int i82527_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj,
                                                        struct canmsg_t *msg)
 {
        int i=0,id0=0,id1=0,id2=0,id3=0;
@@ -346,7 +346,7 @@ int i82527_pre_write_config(struct chip_t *chip, struct msgobj_t *obj,
        return 0;
 }
 
-int i82527_send_msg(struct chip_t *chip, struct msgobj_t *obj,
+int i82527_send_msg(struct canchip_t *chip, struct msgobj_t *obj,
                                                        struct canmsg_t *msg)
 {
        canobj_write_reg(chip,obj,(MVAL_SET|TXIE_SET|RXIE_RES|INTPD_RES),iMSGCTL0);
@@ -361,7 +361,7 @@ int i82527_send_msg(struct chip_t *chip, struct msgobj_t *obj,
        return 0;
 }
 
-int i82527_check_tx_stat(struct chip_t *chip)
+int i82527_check_tx_stat(struct canchip_t *chip)
 {
        if (can_read_reg(chip,iSTAT) & iSTAT_TXOK) {
                can_write_reg(chip,0x0,iSTAT);
@@ -373,7 +373,7 @@ int i82527_check_tx_stat(struct chip_t *chip)
        }
 }
 
-int i82527_remote_request(struct chip_t *chip, struct msgobj_t *obj)
+int i82527_remote_request(struct canchip_t *chip, struct msgobj_t *obj)
 {
        canobj_write_reg(chip,obj,(MVAL_SET|TXIE_RES|RXIE_SET|INTPD_RES),iMSGCTL0);
        canobj_write_reg(chip,obj,(RMPD_RES|TXRQ_SET|MLST_RES|NEWD_RES),iMSGCTL1);
@@ -381,7 +381,7 @@ int i82527_remote_request(struct chip_t *chip, struct msgobj_t *obj)
        return 0;
 }
 
-int i82527_set_btregs(struct chip_t *chip, unsigned short btr0,
+int i82527_set_btregs(struct canchip_t *chip, unsigned short btr0,
                                                        unsigned short btr1)
 {
        if (i82527_enable_configuration(chip))
@@ -395,7 +395,7 @@ int i82527_set_btregs(struct chip_t *chip, unsigned short btr0,
        return 0;
 }
 
-int i82527_start_chip(struct chip_t *chip)
+int i82527_start_chip(struct canchip_t *chip)
 {
        unsigned short flags = 0;
 
@@ -405,7 +405,7 @@ int i82527_start_chip(struct chip_t *chip)
        return 0;
 }
 
-int i82527_stop_chip(struct chip_t *chip)
+int i82527_stop_chip(struct canchip_t *chip)
 {
        unsigned short flags = 0;
 
@@ -416,7 +416,7 @@ int i82527_stop_chip(struct chip_t *chip)
 }
 
 static inline 
-void i82527_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
+void i82527_irq_write_handler(struct canchip_t *chip, struct msgobj_t *obj)
 {
        int cmd;
 
@@ -458,7 +458,7 @@ void i82527_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
 }
 
 static inline
-void i82527_irq_read_handler(struct chip_t *chip, struct msgobj_t *obj, int objnum)
+void i82527_irq_read_handler(struct canchip_t *chip, struct msgobj_t *obj, int objnum)
 {
        int i;
        unsigned long message_id;
@@ -565,7 +565,7 @@ void i82527_irq_read_handler(struct chip_t *chip, struct msgobj_t *obj, int objn
 
 
 static inline 
-void i82527_irq_update_filter(struct chip_t *chip, struct msgobj_t *obj)
+void i82527_irq_update_filter(struct canchip_t *chip, struct msgobj_t *obj)
 {
        struct canfilt_t filt;
 
@@ -587,7 +587,7 @@ void i82527_irq_update_filter(struct chip_t *chip, struct msgobj_t *obj)
 }
 
 
-void i82527_irq_sync_activities(struct chip_t *chip, struct msgobj_t *obj)
+void i82527_irq_sync_activities(struct canchip_t *chip, struct msgobj_t *obj)
 {
        while(!can_msgobj_test_and_set_fl(obj,TX_LOCK)) {
 
@@ -611,7 +611,7 @@ void i82527_irq_sync_activities(struct chip_t *chip, struct msgobj_t *obj)
        }
 }
 
-int i82527_irq_handler(int irq, struct chip_t *chip)
+int i82527_irq_handler(int irq, struct canchip_t *chip)
 {
        unsigned char msgcfg;
 
@@ -666,7 +666,7 @@ int i82527_irq_handler(int irq, struct chip_t *chip)
        return CANCHIP_IRQ_HANDLED;
 }
 
-void i82527_irq_rtr_handler(struct chip_t *chip, struct msgobj_t *obj,
+void i82527_irq_rtr_handler(struct canchip_t *chip, struct msgobj_t *obj,
                            struct rtr_id *rtr_search, unsigned long message_id)
 {
        short int i=0;
@@ -698,7 +698,7 @@ void i82527_irq_rtr_handler(struct chip_t *chip, struct msgobj_t *obj,
  * Return Value: negative value reports error.
  * File: src/i82527.c
  */
-int i82527_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
+int i82527_wakeup_tx(struct canchip_t *chip, struct msgobj_t *obj)
 {
        can_preempt_disable();
        
@@ -712,7 +712,7 @@ int i82527_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
        return 0;
 }
 
-int i82527_filtch_rq(struct chip_t *chip, struct msgobj_t *obj)
+int i82527_filtch_rq(struct canchip_t *chip, struct msgobj_t *obj)
 {
        can_preempt_disable();
        
@@ -750,7 +750,7 @@ int i82527_register(struct chipspecops_t *chipspecops)
        return 0;
 }
 
-int i82527_fill_chipspecops(struct chip_t *chip)
+int i82527_fill_chipspecops(struct canchip_t *chip)
 {
        chip->chip_type="i82527";
        chip->max_objects=15;
index caa35170a81bc14a06a28211cba943d5aee0c830..6edca99e5ea2c1e65ca4269770ee31dd09eb95cd 100644 (file)
@@ -20,7 +20,7 @@ int can_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned
        unsigned btr0=0, btr1=0;
        struct canuser_t *canuser = (struct canuser_t*)(file->private_data);
        struct msgobj_t *obj;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        struct canque_ends_t *qends;
        
        if(!canuser || (canuser->magic != CAN_USER_MAGIC)){
index 39b5823d1a032304c524050ed8b12b8ab2e89f21..88c264187c8b75a93284fda0329ac52dc01f11b1 100644 (file)
@@ -26,7 +26,7 @@ int can_ioctl_rtl_posix(struct rtl_file *fptr, unsigned int cmd, unsigned long a
        unsigned short channel=0;
        unsigned btr0=0, btr1=0;
        struct msgobj_t *obj;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        struct canque_ends_t *qends;
        
        if(!canuser || (canuser->magic != CAN_USER_MAGIC)){
index 7793f0101c3fcb7c8d8631bcee643c775dbb017d..a31e67d8a1d695e3ac17c405b3d0374cb21294c0 100644 (file)
@@ -13,7 +13,7 @@
 #include "../include/irq.h"
 
 
-int dummy_irq_handler(int irq, struct chip_t *chip) {
+int dummy_irq_handler(int irq, struct canchip_t *chip) {
        CANMSG("dummy_irq_handler called irq %d \n", irq);
        return CANCHIP_IRQ_NONE;
 }
index eb344b493014a5fdbf8651299384378860f0823e..a3d200089b09fe37ae29b229ba4e602d223fc1b5 100644 (file)
@@ -134,7 +134,7 @@ unsigned kv_pcican_read_register(unsigned long address)
 int kv_pcican_reset(struct candevice_t *candev)
 {
        int i=0,chip_nr;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        unsigned cdr;
 
        DEBUGMSG("Resetting kv_pcican hardware ...\n");
@@ -248,7 +248,7 @@ int kv_pcican_init_chip_data(struct candevice_t *candev, int chipnr)
        return 0;
 }      
 
-int kv_pcican_init_obj_data(struct chip_t *chip, int objnr)
+int kv_pcican_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr;
        return 0;
index 82c03eb61132c9871a6e6a6b5b5cb2d922169813..c67b3dd689638f4657daa707d67199d12b0d7206 100644 (file)
@@ -225,7 +225,7 @@ int m437_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/m437.c
  */
-int m437_init_obj_data(struct chip_t *chip, int objnr)
+int m437_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr+(objnr+1)*0x10;
        
index d8a0cb2c10137427d50223142895a34adbfb285b..9928c15c51e6e2bd83287aaa72b00eb10ed55a72 100644 (file)
@@ -128,7 +128,7 @@ MODULE_AUTHOR("Pavel Pisa <pisa@cmp.felk.cvut.cz>, Arnaud Westenberg");
 /* Global structures, used to describe the installed hardware. */
 struct canhardware_t canhardware;
 struct canhardware_t *hardware_p=&canhardware;
-struct chip_t *chips_p[MAX_TOT_CHIPS];
+struct canchip_t *chips_p[MAX_TOT_CHIPS];
 struct msgobj_t *objects_p[MAX_TOT_MSGOBJS];
 #ifdef CONFIG_DEVFS_FS
 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,60))
@@ -177,7 +177,7 @@ int init_module(void)
 {
        int res=0,i=0, j;
        struct candevice_t *candev;
-       struct chip_t *chip;
+       struct canchip_t *chip;
 
        if (parse_mod_parms())
                return -EINVAL;
index 42513ad093b5aa148839f83de3f9dd01edd0ae21..230e7862788327e6ee474fc92c4cff72f55ecbe7 100644 (file)
@@ -56,7 +56,7 @@ int msmcan_release_io(struct candevice_t *candev)
  */
 int msmcan_reset(struct candevice_t *candev)
 {
-       struct chip_t *chip=candev->chip[0];
+       struct canchip_t *chip=candev->chip[0];
 
        DEBUGMSG("Resetting msmcan hardware ...\n");
        /* we don't use template_write_register because we don't use the two first
@@ -148,7 +148,7 @@ int msmcan_init_chip_data(struct candevice_t *candev, int chipnr)
  * base address.
  * Unless the hardware uses a segmented memory map, flags can be set zero.
  */
-int msmcan_init_obj_data(struct chip_t *chip, int objnr)
+int msmcan_init_obj_data(struct canchip_t *chip, int objnr)
 {
 
        chip->msgobj[objnr]->obj_base_addr=
index 455a3dc39711c8f1f0674a9df44e8508dbcd4815..777850bac2f1c39648e2a1fdbedf2dd8c62c9a21 100644 (file)
@@ -145,7 +145,7 @@ int nsi_init_chip_data(struct candevice_t *candev, int chipnr)
  * base address.
  * Unless the hardware uses a segmented memory map, flags can be set zero.
  */
-int nsi_init_obj_data(struct chip_t *chip, int objnr)
+int nsi_init_obj_data(struct canchip_t *chip, int objnr)
 {
 
        chip->msgobj[objnr]->obj_base_addr=
index 0301ed3c1db0252de1d567f9572dc11aa5587345..127fdea921884eaeea69f0c950aa2583a08ebdfa 100644 (file)
@@ -20,7 +20,7 @@
 int can_open(struct inode *inode, struct file *file)
 {
        struct msgobj_t *obj;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        struct canuser_t *canuser;
        struct canque_ends_t *qends;
        struct canque_edge_t *edge;
index 155cdb013a8b17427822f5090247cdb2a41df2e3..66a5bac20392ef8c821c939b0523c943bc6a92e2 100644 (file)
@@ -25,7 +25,7 @@ static inline
 int can_open_rtl_common(struct canuser_t *canuser, int open_flags)
 {
        struct msgobj_t *obj=canuser->msgobj;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        struct canque_ends_t *qends;
        struct canque_edge_t *edge;
        can_spin_irqflags_t iflags;
@@ -93,7 +93,7 @@ int can_open_rtl_posix(struct rtl_file *fptr)
 {
        int ret;
        struct msgobj_t *obj;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        struct canuser_t *canuser;
        int minor_nr = RTL_MINOR_FROM_FILEPTR(fptr);
        
index 18c9df8e881656f6526ab047274d0f01a966a127..c724068669dc36c8d329c2ae97b818a8d5509460 100644 (file)
@@ -195,7 +195,7 @@ int pci03_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/pc-i03.c
  */
-int pci03_init_obj_data(struct chip_t *chip, int objnr)
+int pci03_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr;
        
index 10b6efa782aa74def0fe4dc8de20648ebf93959e..5e6f92786598e06de775022b70fe56e3c1779790 100644 (file)
@@ -527,7 +527,7 @@ int pcan_dongle_release_io(struct candevice_t *candev)
 int pcan_dongle_reset(struct candevice_t *candev)
 {
        int i=0;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        int chipnr;
        unsigned cdr;
        
@@ -664,7 +664,7 @@ int pcan_dongle_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/template.c
  */
-int pcan_dongle_init_obj_data(struct chip_t *chip, int objnr)
+int pcan_dongle_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr;
        chip->msgobj[objnr]->obj_flags=0;
index 4b23f9b59fcbf49776d6412740f2a8c48f131cb0..4d877c6f419f19c7e23ba03918c96bf1f352196b 100644 (file)
@@ -286,7 +286,7 @@ int pccan_init_chip_data(struct candevice_t *candev, int chipnr)
        return 0;
 }      
 
-int pccan_init_obj_data(struct chip_t *chip, int objnr)
+int pccan_init_obj_data(struct canchip_t *chip, int objnr)
 {
        if (!strcmp(chip->chip_type,"sja1000")) {
                chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr;
index f83b1c55140cc92aa9d42eb6e565423edac35828..a6b3ad080eb625e2215aa83fc20defb2376861e7 100644 (file)
@@ -217,7 +217,7 @@ int pcccan_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/pcccan.c
  */
-int pcccan_init_obj_data(struct chip_t *chip, int objnr)
+int pcccan_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=(objnr+1)*0x10;
        
index 63e855675a8a3fee22f9eb5d7f51cd8305cbc666..5cefafa7a76cdeae537adf8b26bc373906d45e2b 100644 (file)
@@ -85,7 +85,7 @@ int pcm3680_release_io(struct candevice_t *candev)
 int pcm3680_reset(struct candevice_t *candev)
 {
        int i=0;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        int chipnr;
        
        DEBUGMSG("Resetting pcm3680 hardware ...\n");
@@ -201,7 +201,7 @@ int pcm3680_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/template.c
  */
-int pcm3680_init_obj_data(struct chip_t *chip, int objnr)
+int pcm3680_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr;
        
index 67f383f66dbeaf35a9c367d4ca50cae2ccb721ee..de7d4cb9612a6b2073b9b7a23355ec4944c692e0 100644 (file)
@@ -88,7 +88,7 @@ int pikronisa_release_io(struct candevice_t *candev)
 int pikronisa_reset(struct candevice_t *candev)
 {
        int i;
-       struct chip_t *chip=candev->chip[0];
+       struct canchip_t *chip=candev->chip[0];
        unsigned cdr;
        
        pikronisa_write_register(sjaMOD_RM, chip->chip_base_addr+SJAMOD);
@@ -208,7 +208,7 @@ int pikronisa_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/pikronisa.c
  */
-int pikronisa_init_obj_data(struct chip_t *chip, int objnr)
+int pikronisa_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr;
        return 0;
index 5ca28f88d43cc865672a9f29f20b088a7cda10a8..1f3418ebca01bda3e3034226c2111d626dba7e6d 100644 (file)
@@ -141,7 +141,7 @@ int pip_init_chip_data(struct candevice_t *candev, int chipnr)
        return 0;
 }
 
-int pip_init_obj_data(struct chip_t *chip, int objnr)
+int pip_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr+(objnr+1)*0x10;
        
index efc36418ff1c591595d9b16eae0d7850d93d2ddb..384bf1b27295adfc8a323f4f1529993e55ef752b 100644 (file)
@@ -60,7 +60,7 @@ inline ssize_t can_std_read(struct file *file, struct canque_ends_t *qends,
 }
 
 /* This is the 'RTR' read handler for remote transmission request messages */
-inline ssize_t can_rtr_read(struct chip_t *chip, struct msgobj_t *obj, 
+inline ssize_t can_rtr_read(struct canchip_t *chip, struct msgobj_t *obj, 
                                                                char *buffer)
 {
        can_spin_irqflags_t flags;
@@ -128,7 +128,7 @@ ssize_t can_read(struct file *file, char *buffer, size_t length, loff_t *offset)
 {
        struct canuser_t *canuser = (struct canuser_t*)(file->private_data);
        struct msgobj_t *obj;
-       struct chip_t *chip;
+       struct canchip_t *chip;
        struct canmsg_t read_msg;
        struct canque_ends_t *qends;
        int ret=0;
index 670bfc436761b2cd33df6a53ad8610616450ffbc..c77d03cdc7850d61717f5c2587a7e577f5b1be93 100644 (file)
@@ -23,7 +23,7 @@
 int init_hwspecops(struct candevice_t *candev, int *irqnum_p);
 int init_device_struct(int card, int *chan_param_idx_p, int *irq_param_idx_p);
 int init_chip_struct(struct candevice_t *candev, int chipnr, int irq, long baudrate);
-int init_obj_struct(struct candevice_t *candev, struct chip_t *hostchip, int objnr);
+int init_obj_struct(struct candevice_t *candev, struct canchip_t *hostchip, int objnr);
 
 /**
  * can_checked_malloc - memory allocation with registering of requested blocks
@@ -278,7 +278,7 @@ int register_obj_struct(struct msgobj_t *obj, int minorbase)
  *
  * Return Value: returns negative number in the case of fail
  */
-int register_chip_struct(struct chip_t *chip, int minorbase)
+int register_chip_struct(struct canchip_t *chip, int minorbase)
 {
        static int next_chip_slot=0;
        int i;
@@ -403,7 +403,7 @@ int init_device_struct(int card, int *chan_param_idx_p, int *irq_param_idx_p)
 
        for (chipnr=0; chipnr < candev->nr_all_chips; chipnr++) {
                int m=minor[*chan_param_idx_p+chipnr];
-               struct chip_t *chip=candev->chip[chipnr];
+               struct canchip_t *chip=candev->chip[chipnr];
                int objnr;
 
                register_chip_struct(chip, m);
@@ -451,15 +451,15 @@ int init_device_struct(int card, int *chan_param_idx_p, int *irq_param_idx_p)
  */
 int init_chip_struct(struct candevice_t *candev, int chipnr, int irq, long baudrate)
 {
-       struct chip_t *chip;
+       struct canchip_t *chip;
        int objnr;
        int ret;
 
-       candev->chip[chipnr]=(struct chip_t *)can_checked_malloc(sizeof(struct chip_t));
+       candev->chip[chipnr]=(struct canchip_t *)can_checked_malloc(sizeof(struct canchip_t));
        if ((chip=candev->chip[chipnr])==NULL)
                return -ENOMEM;
 
-        memset(chip, 0, sizeof(struct chip_t));
+        memset(chip, 0, sizeof(struct canchip_t));
 
        chip->write_register=candev->hwspecops->write_register;
        chip->read_register=candev->hwspecops->read_register;
@@ -498,7 +498,7 @@ int init_chip_struct(struct candevice_t *candev, int chipnr, int irq, long baudr
  *
  * Return Value: returns negative number in the case of fail
  */
-int init_obj_struct(struct candevice_t *candev, struct chip_t *hostchip, int objnr)
+int init_obj_struct(struct candevice_t *candev, struct canchip_t *hostchip, int objnr)
 {
        struct canque_ends_t *qends;
        struct msgobj_t *obj;
@@ -571,7 +571,7 @@ int init_hwspecops(struct candevice_t *candev, int *irqnum_p)
 can_irqreturn_t can_default_irq_dispatch(int irq, void *dev_id, struct pt_regs *regs)
 {
        int retval;
-       struct chip_t *chip=(struct chip_t *)dev_id;
+       struct canchip_t *chip=(struct canchip_t *)dev_id;
 
        retval=chip->chipspecops->irq_handler(irq, chip);
        return CAN_IRQ_RETVAL(retval);
@@ -583,7 +583,7 @@ can_irqreturn_t can_default_irq_dispatch(int irq, void *dev_id, struct pt_regs *
  *
  * Return Value: returns negative number in the case of fail
  */
-int can_chip_setup_irq(struct chip_t *chip)
+int can_chip_setup_irq(struct canchip_t *chip)
 {
        if(chip==NULL)
                return -1;
@@ -617,7 +617,7 @@ int can_chip_setup_irq(struct chip_t *chip)
  * can_chip_free_irq - unregisters chip interrupt handler from the system
  * @chip: pointer to CAN chip structure
  */
-void can_chip_free_irq(struct chip_t *chip)
+void can_chip_free_irq(struct canchip_t *chip)
 {
        if((chip->flags & CHIP_IRQ_SETUP) && (chip->chip_irq>=0)) {
                if ((chip->flags & CHIP_IRQ_VME) == 0)
index dfc47a290f3df84a0e239ffe4d7c1c61debe6f4b..27eebcabfd9a9c9bd67498f78140f4df84f060fc 100644 (file)
 #include "../include/main.h"
 #include "../include/sja1000.h"
 
-void sja1000_irq_read_handler(struct chip_t *chip, struct msgobj_t *obj);
-void sja1000_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj);
+void sja1000_irq_read_handler(struct canchip_t *chip, struct msgobj_t *obj);
+void sja1000_irq_write_handler(struct canchip_t *chip, struct msgobj_t *obj);
 
-int sja1000_enable_configuration(struct chip_t *chip)
+int sja1000_enable_configuration(struct canchip_t *chip)
 {
        int i=0;
        unsigned flags;
@@ -39,7 +39,7 @@ int sja1000_enable_configuration(struct chip_t *chip)
        return 0;
 }
 
-int sja1000_disable_configuration(struct chip_t *chip)
+int sja1000_disable_configuration(struct canchip_t *chip)
 {
        int i=0;
        unsigned flags;
@@ -62,7 +62,7 @@ int sja1000_disable_configuration(struct chip_t *chip)
        return 0;
 }
 
-int sja1000_chip_config(struct chip_t *chip)
+int sja1000_chip_config(struct canchip_t *chip)
 {
        if (sja1000_enable_configuration(chip))
                return -ENODEV;
@@ -88,7 +88,7 @@ int sja1000_chip_config(struct chip_t *chip)
        return 0;
 }
 
-int sja1000_standard_mask(struct chip_t *chip, unsigned short code, unsigned short mask)
+int sja1000_standard_mask(struct canchip_t *chip, unsigned short code, unsigned short mask)
 {
        unsigned char write_code, write_mask;
 
@@ -123,7 +123,7 @@ int sja1000_standard_mask(struct chip_t *chip, unsigned short code, unsigned sho
  * param sampl_pt sample point in % (0-100) sets (TSEG1+2)/(TSEG1+TSEG2+3) ratio
  * param flags fields BTR1_SAM, OCMODE, OCPOL, OCTP, OCTN, CLK_OFF, CBP
  */
-int sja1000_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
+int sja1000_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw,
                                                        int sampl_pt, int flags)
 {
        int best_error = 1000000000, error;
@@ -186,7 +186,7 @@ int sja1000_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
        return 0;
 }
 
-int sja1000_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
+int sja1000_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj)
 {
        int i;
        
@@ -214,7 +214,7 @@ int sja1000_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
 
 #define MAX_TRANSMIT_WAIT_LOOPS 10
 
-int sja1000_pre_write_config(struct chip_t *chip, struct msgobj_t *obj, 
+int sja1000_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg)
 {
        int i=0, id=0;
@@ -255,7 +255,7 @@ int sja1000_pre_write_config(struct chip_t *chip, struct msgobj_t *obj,
        return 0;
 }
 
-int sja1000_send_msg(struct chip_t *chip, struct msgobj_t *obj, 
+int sja1000_send_msg(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg)
 {
        can_write_reg(chip, sjaCMR_TR, SJACMR);
@@ -263,7 +263,7 @@ int sja1000_send_msg(struct chip_t *chip, struct msgobj_t *obj,
        return 0;
 }
 
-int sja1000_check_tx_stat(struct chip_t *chip)
+int sja1000_check_tx_stat(struct canchip_t *chip)
 {
        if (can_read_reg(chip,SJASR) & sjaSR_TCS)
                return 0;
@@ -271,7 +271,7 @@ int sja1000_check_tx_stat(struct chip_t *chip)
                return 1;
 }
 
-int sja1000_set_btregs(struct chip_t *chip, unsigned short btr0, 
+int sja1000_set_btregs(struct canchip_t *chip, unsigned short btr0, 
                                                        unsigned short btr1)
 {
        if (sja1000_enable_configuration(chip))
@@ -285,7 +285,7 @@ int sja1000_set_btregs(struct chip_t *chip, unsigned short btr0,
        return 0;
 }
 
-int sja1000_start_chip(struct chip_t *chip)
+int sja1000_start_chip(struct canchip_t *chip)
 {
        unsigned short flags = 0;
 
@@ -295,7 +295,7 @@ int sja1000_start_chip(struct chip_t *chip)
        return 0;
 }
 
-int sja1000_stop_chip(struct chip_t *chip)
+int sja1000_stop_chip(struct canchip_t *chip)
 {
        unsigned short flags = 0;
 
@@ -305,33 +305,33 @@ int sja1000_stop_chip(struct chip_t *chip)
        return 0;
 }
 
-int sja1000_remote_request(struct chip_t *chip, struct msgobj_t *obj)
+int sja1000_remote_request(struct canchip_t *chip, struct msgobj_t *obj)
 {
        CANMSG("sja1000_remote_request not implemented\n");
        return -ENOSYS;
 }
 
-int sja1000_extended_mask(struct chip_t *chip, unsigned long code,
+int sja1000_extended_mask(struct canchip_t *chip, unsigned long code,
                unsigned long mask)
 {
        CANMSG("sja1000_extended_mask not implemented\n");
        return -ENOSYS;
 }
 
-int sja1000_clear_objects(struct chip_t *chip)
+int sja1000_clear_objects(struct canchip_t *chip)
 {
        CANMSG("sja1000_clear_objects not implemented\n");
        return -ENOSYS;
 }
 
-int sja1000_config_irqs(struct chip_t *chip, short irqs)
+int sja1000_config_irqs(struct canchip_t *chip, short irqs)
 {
        CANMSG("sja1000_config_irqs not implemented\n");
        return -ENOSYS;
 }
 
 
-int sja1000_irq_handler(int irq, struct chip_t *chip)
+int sja1000_irq_handler(int irq, struct canchip_t *chip)
 {
        unsigned irq_register;
        struct msgobj_t *obj=chip->msgobj[0];
@@ -378,7 +378,7 @@ int sja1000_irq_handler(int irq, struct chip_t *chip)
        return CANCHIP_IRQ_HANDLED;
 }
 
-void sja1000_irq_read_handler(struct chip_t *chip, struct msgobj_t *obj)
+void sja1000_irq_read_handler(struct canchip_t *chip, struct msgobj_t *obj)
 {
        int i=0, id=0, len;
 
@@ -402,7 +402,7 @@ void sja1000_irq_read_handler(struct chip_t *chip, struct msgobj_t *obj)
        } while(can_read_reg(chip, SJASR) & sjaSR_RBS);
 }
 
-void sja1000_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
+void sja1000_irq_write_handler(struct canchip_t *chip, struct msgobj_t *obj)
 {
        int cmd;
        
@@ -448,7 +448,7 @@ void sja1000_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
  * Return Value: negative value reports error.
  * File: src/sja1000.c
  */
-int sja1000_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
+int sja1000_wakeup_tx(struct canchip_t *chip, struct msgobj_t *obj)
 {
        can_preempt_disable();
        
@@ -491,7 +491,7 @@ int sja1000_register(struct chipspecops_t *chipspecops)
        return 0;
 }
 
-int sja1000_fill_chipspecops(struct chip_t *chip)
+int sja1000_fill_chipspecops(struct canchip_t *chip)
 {
        chip->chip_type="sja1000";
        chip->max_objects=1;
index 39dff690ddebe684fdc5abd999bdb254dcc5c2eb..dd9d696ae14f059384dbd8cb4f5d7dbe5a3f96f0 100644 (file)
@@ -18,7 +18,7 @@
  * sja1000p_enable_configuration - enable chip configuration mode
  * @chip: pointer to chip state structure
  */
-int sja1000p_enable_configuration(struct chip_t *chip)
+int sja1000p_enable_configuration(struct canchip_t *chip)
 {
        int i=0;
        enum sja1000_PeliCAN_MOD flags;
@@ -48,7 +48,7 @@ int sja1000p_enable_configuration(struct chip_t *chip)
  * sja1000p_disable_configuration - disable chip configuration mode
  * @chip: pointer to chip state structure
  */
-int sja1000p_disable_configuration(struct chip_t *chip)
+int sja1000p_disable_configuration(struct canchip_t *chip)
 {
        int i=0;
        enum sja1000_PeliCAN_MOD flags;
@@ -86,7 +86,7 @@ int sja1000p_disable_configuration(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_chip_config(struct chip_t *chip)
+int sja1000p_chip_config(struct canchip_t *chip)
 {
        int i;
        unsigned char n, r;
@@ -138,7 +138,7 @@ int sja1000p_chip_config(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_extended_mask(struct chip_t *chip, unsigned long code, unsigned  long mask)
+int sja1000p_extended_mask(struct canchip_t *chip, unsigned long code, unsigned  long mask)
 {
        int i;
 
@@ -173,7 +173,7 @@ int sja1000p_extended_mask(struct chip_t *chip, unsigned long code, unsigned  lo
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
+int sja1000p_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw,
                                                        int sampl_pt, int flags)
 {
        int best_error = 1000000000, error;
@@ -240,7 +240,7 @@ int sja1000p_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
  *
  * File: src/sja1000p.c
  */
-void sja1000p_read(struct chip_t *chip, struct msgobj_t *obj) {
+void sja1000p_read(struct canchip_t *chip, struct msgobj_t *obj) {
        int i, flags, len, datastart;
        do {
                flags = can_read_reg(chip,SJAFRM);
@@ -286,7 +286,7 @@ void sja1000p_read(struct chip_t *chip, struct msgobj_t *obj) {
  *     Positive value indicates immediate reception of message.
  * File: src/sja1000p.c
  */
-int sja1000p_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
+int sja1000p_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj)
 {
        int status;
        status=can_read_reg(chip,SJASR);
@@ -325,7 +325,7 @@ int sja1000p_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_pre_write_config(struct chip_t *chip, struct msgobj_t *obj, 
+int sja1000p_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg)
 {
        int i=0; 
@@ -404,7 +404,7 @@ int sja1000p_pre_write_config(struct chip_t *chip, struct msgobj_t *obj,
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_send_msg(struct chip_t *chip, struct msgobj_t *obj, 
+int sja1000p_send_msg(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg)
 {
        can_write_reg(chip, sjaCMR_TR, SJACMR);
@@ -421,7 +421,7 @@ int sja1000p_send_msg(struct chip_t *chip, struct msgobj_t *obj,
  *     Zero value indicates finishing of all issued transmission requests.
  * File: src/sja1000p.c
  */
-int sja1000p_check_tx_stat(struct chip_t *chip)
+int sja1000p_check_tx_stat(struct canchip_t *chip)
 {
        if (can_read_reg(chip,SJASR) & sjaSR_TCS)
                return 0;
@@ -438,7 +438,7 @@ int sja1000p_check_tx_stat(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_set_btregs(struct chip_t *chip, unsigned short btr0, 
+int sja1000p_set_btregs(struct canchip_t *chip, unsigned short btr0, 
                                                        unsigned short btr1)
 {
        if (sja1000p_enable_configuration(chip))
@@ -459,7 +459,7 @@ int sja1000p_set_btregs(struct chip_t *chip, unsigned short btr0,
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_start_chip(struct chip_t *chip)
+int sja1000p_start_chip(struct canchip_t *chip)
 {
        enum sja1000_PeliCAN_MOD flags;
 
@@ -476,7 +476,7 @@ int sja1000p_start_chip(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_stop_chip(struct chip_t *chip)
+int sja1000p_stop_chip(struct canchip_t *chip)
 {
        enum sja1000_PeliCAN_MOD flags;
 
@@ -495,7 +495,7 @@ int sja1000p_stop_chip(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_remote_request(struct chip_t *chip, struct msgobj_t *obj)
+int sja1000p_remote_request(struct canchip_t *chip, struct msgobj_t *obj)
 {
        CANMSG("sja1000p_remote_request not implemented\n");
        return -ENOSYS;
@@ -510,7 +510,7 @@ int sja1000p_remote_request(struct chip_t *chip, struct msgobj_t *obj)
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_standard_mask(struct chip_t *chip, unsigned short code,
+int sja1000p_standard_mask(struct canchip_t *chip, unsigned short code,
                unsigned short mask)
 {
        CANMSG("sja1000p_standard_mask not implemented\n");
@@ -524,7 +524,7 @@ int sja1000p_standard_mask(struct chip_t *chip, unsigned short code,
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_clear_objects(struct chip_t *chip)
+int sja1000p_clear_objects(struct canchip_t *chip)
 {
        CANMSG("sja1000p_clear_objects not implemented\n");
        return -ENOSYS;
@@ -538,7 +538,7 @@ int sja1000p_clear_objects(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_config_irqs(struct chip_t *chip, short irqs)
+int sja1000p_config_irqs(struct canchip_t *chip, short irqs)
 {
        CANMSG("sja1000p_config_irqs not implemented\n");
        return -ENOSYS;
@@ -555,7 +555,7 @@ int sja1000p_config_irqs(struct chip_t *chip, short irqs)
  * sja1000p_irq_write_handler() for transmit events.
  * File: src/sja1000p.c
  */
-void sja1000p_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
+void sja1000p_irq_write_handler(struct canchip_t *chip, struct msgobj_t *obj)
 {
        int cmd;
        
@@ -601,7 +601,7 @@ void sja1000p_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
  * @irq: interrupt vector number, this value is system specific
  * @dev_id: driver private pointer registered at time of request_irq() call.
  *     The CAN driver uses this pointer to store relationship of interrupt
- *     to chip state structure - @struct chip_t
+ *     to chip state structure - @struct canchip_t
  * @regs: system dependent value pointing to registers stored in exception frame
  * 
  * Interrupt handler is activated when state of CAN controller chip changes,
@@ -611,7 +611,7 @@ void sja1000p_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
  * message queues.
  * File: src/sja1000p.c
  */
-int sja1000p_irq_handler(int irq, struct chip_t *chip)
+int sja1000p_irq_handler(int irq, struct canchip_t *chip)
 {
        int irq_register, status, error_code;
        struct msgobj_t *obj=chip->msgobj[0];
@@ -696,7 +696,7 @@ int sja1000p_irq_handler(int irq, struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/sja1000p.c
  */
-int sja1000p_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
+int sja1000p_wakeup_tx(struct canchip_t *chip, struct msgobj_t *obj)
 {
        
        can_preempt_disable();
@@ -752,7 +752,7 @@ int sja1000p_register(struct chipspecops_t *chipspecops)
  *
  * Return Value: returns negative number in the case of fail
  */
-int sja1000p_fill_chipspecops(struct chip_t *chip)
+int sja1000p_fill_chipspecops(struct canchip_t *chip)
 {
        chip->chip_type="sja1000p";
        chip->max_objects=1;
index f9123fe93a3846bb0e58762fcfb3bdbcf0ea28f8..eddd13dd30f4f718f082d6bf4d8c31062003f5c5 100644 (file)
@@ -92,7 +92,7 @@ int smartcan_init_chip_data(struct candevice_t *candev, int chipnr)
        return 0;
 }
 
-int smartcan_init_obj_data(struct chip_t *chip, int objnr)
+int smartcan_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=(objnr+1)*0x10;
 
index 7f147e116ac8247c014c5c74417116d7e59b2181..3cd003d1b45f64b0871baaeb4e109c124b769b48 100644 (file)
@@ -159,7 +159,7 @@ int ssv_init_chip_data(struct candevice_t *candev, int chipnr)
  * base address.
  * Unless the hardware uses a segmented memory map, flags can be set zero.
  */
-int ssv_init_obj_data(struct chip_t *chip, int objnr)
+int ssv_init_obj_data(struct canchip_t *chip, int objnr)
 {
 
     chip->msgobj[objnr]->obj_base_addr=
index 5999366547955d0e6a555b78156a47f513d2b396..d99033255b2dc51fd50c2e394237e59a2c84edce 100644 (file)
@@ -181,7 +181,7 @@ int template_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/template.c
  */
-int template_init_obj_data(struct chip_t *chip, int objnr)
+int template_init_obj_data(struct canchip_t *chip, int objnr)
 {
        chip->msgobj[objnr]->obj_base_addr=chip->chip_base_addr+(objnr+1)*0x10;
        
index 957d5afd5aa49a773c538bd064d74b5eeaec7965..d93063ab7e92bceb4f668852b08e8b259407ffb7 100644 (file)
@@ -43,12 +43,12 @@ long unican_bus_latency(struct msgobj_t *obj)
 
 /* * * unican Chip Functionality * * */
 
-int unican_enable_configuration(struct chip_t *chip)
+int unican_enable_configuration(struct canchip_t *chip)
 {
        return 0;
 }
 
-int unican_disable_configuration(struct chip_t *chip)
+int unican_disable_configuration(struct canchip_t *chip)
 {
        return 0;
 }
@@ -60,7 +60,7 @@ int unican_disable_configuration(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_chip_config(struct chip_t *chip)
+int unican_chip_config(struct canchip_t *chip)
 {
        int ret;
        sCAN_CARD *chipext = (sCAN_CARD *)chip->chip_data;
@@ -125,7 +125,7 @@ int unican_chip_config(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_extended_mask(struct chip_t *chip, unsigned long code, unsigned  long mask)
+int unican_extended_mask(struct canchip_t *chip, unsigned long code, unsigned  long mask)
 {
        return 0;
 }
@@ -142,7 +142,7 @@ int unican_extended_mask(struct chip_t *chip, unsigned long code, unsigned  long
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
+int unican_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw,
                                                        int sampl_pt, int flags)
 {
        int ret;
@@ -184,7 +184,7 @@ int unican_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
  *
  * File: src/unican.c
  */
-void unican_read(struct chip_t *chip, struct msgobj_t *obj) {
+void unican_read(struct canchip_t *chip, struct msgobj_t *obj) {
        sCAN_CARD *chipext = (sCAN_CARD *)chip->chip_data;
        __u16 *ptr16;
        __u16 u;
@@ -259,7 +259,7 @@ void unican_read(struct chip_t *chip, struct msgobj_t *obj) {
  *     Positive value indicates immediate reception of message.
  * File: src/unican.c
  */
-int unican_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
+int unican_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj)
 {
        return 0;
 }
@@ -274,7 +274,7 @@ int unican_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_pre_write_config(struct chip_t *chip, struct msgobj_t *obj, 
+int unican_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg)
 {
        return 0;
@@ -291,7 +291,7 @@ int unican_pre_write_config(struct chip_t *chip, struct msgobj_t *obj,
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_send_msg(struct chip_t *chip, struct msgobj_t *obj, 
+int unican_send_msg(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg)
 {
        return 0;
@@ -306,7 +306,7 @@ int unican_send_msg(struct chip_t *chip, struct msgobj_t *obj,
  *     Zero value indicates finishing of all issued transmission requests.
  * File: src/unican.c
  */
-int unican_check_tx_stat(struct chip_t *chip)
+int unican_check_tx_stat(struct canchip_t *chip)
 {
        return 0;
 }
@@ -320,7 +320,7 @@ int unican_check_tx_stat(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_set_btregs(struct chip_t *chip, unsigned short btr0, 
+int unican_set_btregs(struct canchip_t *chip, unsigned short btr0, 
                                                        unsigned short btr1)
 {
        int ret;
@@ -342,7 +342,7 @@ int unican_set_btregs(struct chip_t *chip, unsigned short btr0,
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_start_chip(struct chip_t *chip)
+int unican_start_chip(struct canchip_t *chip)
 {
        return 0;
 }
@@ -354,7 +354,7 @@ int unican_start_chip(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_stop_chip(struct chip_t *chip)
+int unican_stop_chip(struct canchip_t *chip)
 {
        return 0;
 }
@@ -368,7 +368,7 @@ int unican_stop_chip(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_remote_request(struct chip_t *chip, struct msgobj_t *obj)
+int unican_remote_request(struct canchip_t *chip, struct msgobj_t *obj)
 {
        CANMSG("unican_remote_request not implemented\n");
        return -ENOSYS;
@@ -383,7 +383,7 @@ int unican_remote_request(struct chip_t *chip, struct msgobj_t *obj)
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_standard_mask(struct chip_t *chip, unsigned short code,
+int unican_standard_mask(struct canchip_t *chip, unsigned short code,
                unsigned short mask)
 {
        CANMSG("unican_standard_mask not implemented\n");
@@ -397,7 +397,7 @@ int unican_standard_mask(struct chip_t *chip, unsigned short code,
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_clear_objects(struct chip_t *chip)
+int unican_clear_objects(struct canchip_t *chip)
 {
        CANMSG("unican_clear_objects not implemented\n");
        return -ENOSYS;
@@ -411,7 +411,7 @@ int unican_clear_objects(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_config_irqs(struct chip_t *chip, short irqs)
+int unican_config_irqs(struct canchip_t *chip, short irqs)
 {
 
        CANMSG("unican_config_irqs not implemented\n");
@@ -429,7 +429,7 @@ int unican_config_irqs(struct chip_t *chip, short irqs)
  * unican_irq_write_handler() for transmit events.
  * File: src/unican.c
  */
-void unican_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
+void unican_irq_write_handler(struct canchip_t *chip, struct msgobj_t *obj)
 {
        int cmd;
        sCAN_CARD *chipext = (sCAN_CARD *)chip->chip_data;
@@ -531,7 +531,7 @@ void unican_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
 
 }
 
-void unican_irq_sync_activities(struct chip_t *chip, struct msgobj_t *obj)
+void unican_irq_sync_activities(struct canchip_t *chip, struct msgobj_t *obj)
 {
        while(!can_msgobj_test_and_set_fl(obj,TX_LOCK)) {
 
@@ -560,7 +560,7 @@ void unican_irq_sync_activities(struct chip_t *chip, struct msgobj_t *obj)
  * @irq: interrupt vector number, this value is system specific
  * @dev_id: driver private pointer registered at time of request_irq() call.
  *     The CAN driver uses this pointer to store relationship of interrupt
- *     to chip state structure - @struct chip_t
+ *     to chip state structure - @struct canchip_t
  * @regs: system dependent value pointing to registers stored in exception frame
  * 
  * Interrupt handler is activated when state of CAN controller chip changes,
@@ -570,7 +570,7 @@ void unican_irq_sync_activities(struct chip_t *chip, struct msgobj_t *obj)
  * message queues.
  * File: src/unican.c
  */
-int unican_irq_handler(int irq, struct chip_t *chip)
+int unican_irq_handler(int irq, struct canchip_t *chip)
 {
        sCAN_CARD *chipext = (sCAN_CARD *)chip->chip_data;
        struct msgobj_t *obj=chip->msgobj[0];
@@ -626,7 +626,7 @@ int unican_irq_handler(int irq, struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/unican.c
  */
-int unican_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
+int unican_wakeup_tx(struct canchip_t *chip, struct msgobj_t *obj)
 {
        can_preempt_disable();
 
@@ -697,7 +697,7 @@ int unican_reset(struct candevice_t *candev)
 {
        int ret;
        int i;
-       struct chip_t *chip = candev->chip[0];
+       struct canchip_t *chip = candev->chip[0];
        sCAN_CARD *chipext;
        
 
@@ -768,7 +768,7 @@ int unican_init_hw_data(struct candevice_t *candev)
  */
 int unican_init_chip_data(struct candevice_t *candev, int chipnr)
 {
-       struct chip_t *chip = candev->chip[chipnr];
+       struct canchip_t *chip = candev->chip[chipnr];
        chip->chip_type = "unican";
        chip->chip_base_addr = 0;
        chip->clock = 10000000;
@@ -809,7 +809,7 @@ int unican_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/unican.c
  */
-int unican_init_obj_data(struct chip_t *chip, int objnr)
+int unican_init_obj_data(struct canchip_t *chip, int objnr)
 {
        struct msgobj_t *obj=chip->msgobj[objnr];
        obj->obj_base_addr=chip->chip_base_addr;
index 94f122bbb61aeac53a6f1064673b8895b7fef83e..a4f9c05eaaef96147c6021c88bcdbf7251de693e 100644 (file)
@@ -20,7 +20,7 @@
 int unican_vme_reset(struct candevice_t *candev)
 {
        int ret;
-       struct chip_t *chip = candev->chip[0];
+       struct canchip_t *chip = candev->chip[0];
 
        ret = unican_reset(candev);
 
@@ -41,7 +41,7 @@ int unican_vme_reset(struct candevice_t *candev)
  */
 int unican_vme_init_chip_data(struct candevice_t *candev, int chipnr)
 {
-       struct chip_t *chip = candev->chip[chipnr];
+       struct canchip_t *chip = candev->chip[chipnr];
 
        unican_init_chip_data(candev, chipnr);
 
index 67fc2763e86dfd780fccfa648de4c18edd28dff4..1281885b29938caf79e3377735c84c9da488729c 100644 (file)
@@ -24,12 +24,12 @@ long virtual_bus_latency(struct msgobj_t *obj)
 
 /* * * Virtual Chip Functionality * * */
 
-int virtual_enable_configuration(struct chip_t *chip)
+int virtual_enable_configuration(struct canchip_t *chip)
 {
        return 0;
 }
 
-int virtual_disable_configuration(struct chip_t *chip)
+int virtual_disable_configuration(struct canchip_t *chip)
 {
        return 0;
 }
@@ -41,7 +41,7 @@ int virtual_disable_configuration(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_chip_config(struct chip_t *chip)
+int virtual_chip_config(struct canchip_t *chip)
 {
        return 0;
 }
@@ -55,7 +55,7 @@ int virtual_chip_config(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_extended_mask(struct chip_t *chip, unsigned long code, unsigned  long mask)
+int virtual_extended_mask(struct canchip_t *chip, unsigned long code, unsigned  long mask)
 {
        return 0;
 }
@@ -72,7 +72,7 @@ int virtual_extended_mask(struct chip_t *chip, unsigned long code, unsigned  lon
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
+int virtual_baud_rate(struct canchip_t *chip, int rate, int clock, int sjw,
                                                        int sampl_pt, int flags)
 {
        return 0;
@@ -85,7 +85,7 @@ int virtual_baud_rate(struct chip_t *chip, int rate, int clock, int sjw,
  *
  * File: src/virtual.c
  */
-void virtual_read(struct chip_t *chip, struct msgobj_t *obj) {
+void virtual_read(struct canchip_t *chip, struct msgobj_t *obj) {
 
 }
 
@@ -98,7 +98,7 @@ void virtual_read(struct chip_t *chip, struct msgobj_t *obj) {
  *     Positive value indicates immediate reception of message.
  * File: src/virtual.c
  */
-int virtual_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
+int virtual_pre_read_config(struct canchip_t *chip, struct msgobj_t *obj)
 {
        return 0;
 }
@@ -113,7 +113,7 @@ int virtual_pre_read_config(struct chip_t *chip, struct msgobj_t *obj)
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_pre_write_config(struct chip_t *chip, struct msgobj_t *obj, 
+int virtual_pre_write_config(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg)
 {
        return 0;
@@ -130,7 +130,7 @@ int virtual_pre_write_config(struct chip_t *chip, struct msgobj_t *obj,
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_send_msg(struct chip_t *chip, struct msgobj_t *obj, 
+int virtual_send_msg(struct canchip_t *chip, struct msgobj_t *obj, 
                                                        struct canmsg_t *msg)
 {
        return 0;
@@ -145,7 +145,7 @@ int virtual_send_msg(struct chip_t *chip, struct msgobj_t *obj,
  *     Zero value indicates finishing of all issued transmission requests.
  * File: src/virtual.c
  */
-int virtual_check_tx_stat(struct chip_t *chip)
+int virtual_check_tx_stat(struct canchip_t *chip)
 {
        return 0;
 }
@@ -159,7 +159,7 @@ int virtual_check_tx_stat(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_set_btregs(struct chip_t *chip, unsigned short btr0, 
+int virtual_set_btregs(struct canchip_t *chip, unsigned short btr0, 
                                                        unsigned short btr1)
 {
        return 0;
@@ -172,7 +172,7 @@ int virtual_set_btregs(struct chip_t *chip, unsigned short btr0,
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_start_chip(struct chip_t *chip)
+int virtual_start_chip(struct canchip_t *chip)
 {
        return 0;
 }
@@ -184,7 +184,7 @@ int virtual_start_chip(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_stop_chip(struct chip_t *chip)
+int virtual_stop_chip(struct canchip_t *chip)
 {
        return 0;
 }
@@ -198,7 +198,7 @@ int virtual_stop_chip(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_remote_request(struct chip_t *chip, struct msgobj_t *obj)
+int virtual_remote_request(struct canchip_t *chip, struct msgobj_t *obj)
 {
        CANMSG("virtual_remote_request not implemented\n");
        return -ENOSYS;
@@ -213,7 +213,7 @@ int virtual_remote_request(struct chip_t *chip, struct msgobj_t *obj)
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_standard_mask(struct chip_t *chip, unsigned short code,
+int virtual_standard_mask(struct canchip_t *chip, unsigned short code,
                unsigned short mask)
 {
        CANMSG("virtual_standard_mask not implemented\n");
@@ -227,7 +227,7 @@ int virtual_standard_mask(struct chip_t *chip, unsigned short code,
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_clear_objects(struct chip_t *chip)
+int virtual_clear_objects(struct canchip_t *chip)
 {
        CANMSG("virtual_clear_objects not implemented\n");
        return -ENOSYS;
@@ -241,7 +241,7 @@ int virtual_clear_objects(struct chip_t *chip)
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_config_irqs(struct chip_t *chip, short irqs)
+int virtual_config_irqs(struct canchip_t *chip, short irqs)
 {
        CANMSG("virtual_config_irqs not implemented\n");
        return -ENOSYS;
@@ -258,7 +258,7 @@ int virtual_config_irqs(struct chip_t *chip, short irqs)
  * virtual_irq_write_handler() for transmit events.
  * File: src/virtual.c
  */
-void virtual_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
+void virtual_irq_write_handler(struct canchip_t *chip, struct msgobj_t *obj)
 {
 
 }
@@ -270,7 +270,7 @@ void virtual_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
  * @irq: interrupt vector number, this value is system specific
  * @dev_id: driver private pointer registered at time of request_irq() call.
  *     The CAN driver uses this pointer to store relationship of interrupt
- *     to chip state structure - @struct chip_t
+ *     to chip state structure - @struct canchip_t
  * @regs: system dependent value pointing to registers stored in exception frame
  * 
  * Interrupt handler is activated when state of CAN controller chip changes,
@@ -280,7 +280,7 @@ void virtual_irq_write_handler(struct chip_t *chip, struct msgobj_t *obj)
  * message queues.
  * File: src/virtual.c
  */
-int virtual_irq_handler(int irq, struct chip_t *chip)
+int virtual_irq_handler(int irq, struct canchip_t *chip)
 {
        return CANCHIP_IRQ_HANDLED;
 }
@@ -346,7 +346,7 @@ void virtual_do_tx_timeout(unsigned long data)
  * Return Value: negative value reports error.
  * File: src/virtual.c
  */
-int virtual_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
+int virtual_wakeup_tx(struct canchip_t *chip, struct msgobj_t *obj)
 {
        /* can_msgobj_set_fl(obj,TX_REQUEST); */
        
@@ -449,7 +449,7 @@ int virtual_init_hw_data(struct candevice_t *candev)
  */
 int virtual_init_chip_data(struct candevice_t *candev, int chipnr)
 {
-       struct chip_t *chip = candev->chip[chipnr];
+       struct canchip_t *chip = candev->chip[chipnr];
        chip->chip_type = CHIP_TYPE;
        chip->chip_base_addr = 0;
        chip->clock = 10000000;
@@ -489,7 +489,7 @@ int virtual_init_chip_data(struct candevice_t *candev, int chipnr)
  * Return Value: The function always returns zero
  * File: src/virtual.c
  */
-int virtual_init_obj_data(struct chip_t *chip, int objnr)
+int virtual_init_obj_data(struct canchip_t *chip, int objnr)
 {
        struct msgobj_t *obj=chip->msgobj[objnr];
        obj->obj_base_addr=chip->chip_base_addr;