2 * Linux CAN-bus device driver.
3 * Written for new CAN driver version by Pavel Pisa - OCERA team member
4 * email:pisa@cmp.felk.cvut.cz
5 * This software is released under the GPL-License.
6 * Version lincan-0.3 17 Jun 2004
9 /* This file is included in unican.c if CAN_ENABLE_VME_SUPPORT is
14 * unican_vme_init_hw_data - Initialize hardware cards
15 * @candev: Pointer to candevice/board structure
17 * Return Value: The function always returns zero
20 int unican_vme_reset(struct candevice_t *candev)
23 struct canchip_t *chip = candev->chip[0];
25 ret = unican_reset(candev);
27 /* Setup VME interrupt vector */
29 unican_writew(chip->chip_irq, chip->chip_base_addr+CL2_VME_INT_VECTOR);
35 * unican_vme_init_chip_data - Initialize chips
36 * @candev: Pointer to candevice/board structure
37 * @chipnr: Number of the CAN chip on the hardware card
39 * Return Value: The function always returns zero
42 int unican_vme_init_chip_data(struct candevice_t *candev, int chipnr)
44 struct canchip_t *chip = candev->chip[chipnr];
46 unican_init_chip_data(candev, chipnr);
48 chip->flags |= CHIP_IRQ_VME;
49 /*chip->chipspecops->irq_handler=unican_irq_handler;*/
54 int unican_vme_init_hw_data(struct candevice_t *candev)
56 unican_init_hw_data(candev);
57 candev->flags |= CANDEV_PROGRAMMABLE_IRQ;
62 int unican_vme_register(struct hwspecops_t *hwspecops)
64 unican_register(hwspecops);
66 hwspecops->init_hw_data = unican_vme_init_hw_data;
67 hwspecops->init_chip_data = unican_vme_init_chip_data;
68 hwspecops->request_io = unican_request_io;
69 hwspecops->reset = unican_vme_reset;
70 hwspecops->release_io = unican_release_io;