-
-int pip5_request_io(struct candevice_t *candev)
-{
- if (candev->io_addr != 0x8000) {
- CANMSG("Invalid base io address\n");
- CANMSG("The PIP5 uses a fixed base address of 0x8000,\n");
- CANMSG("please consult your user manual.\n");
- return -ENODEV;
- }
- if (!can_request_io_region(candev->io_addr,0x100,DEVICE_NAME)) {
- CANMSG("Unable to open port: 0x%lx\n",candev->io_addr);
- return -ENODEV;
- }
- else if(!can_request_io_region(candev->io_addr+0x102,0x01,DEVICE_NAME)) {
- can_release_io_region(candev->io_addr,0x100);
- CANMSG("Unable to open port: 0x%lx\n",candev->io_addr+0x102);
- return -ENODEV;
- }
- else {
- DEBUGMSG("Registered IO-memory: 0x%lx - 0x%lx\n", candev->io_addr, candev->io_addr + 0x100 - 1);
- DEBUGMSG("Registered IO-memory: 0x%lx\n", candev->io_addr+0x102);
- }
- return 0;
-}
-
-int pip6_request_io(struct candevice_t *candev)
+/* PIP Specific Extension registers */
+#define PIP_CANRES_REG 0x804 /* CAN Resources */
+#define PIP_CANCTRL_REG (PIP_CANRES_REG+1) /* CAN Control */
+/* Interrupt maps for the various PIP variants, see user manual */
+#define PIP5_IRQ_MAP 0x4F6D
+#define PIP6_IRQ_MAP 0xDEF8
+#define PIP7_IRQ_MAP 0x3768
+#define PIP8_IRQ_MAP 0x3768
+
+int pip_request_io(struct candevice_t *candev)