return 0;
}
-static int tpci200_request_irq(struct ipack_device *dev, int vector,
+static int tpci200_request_irq(struct ipack_device *dev,
irqreturn_t (*handler)(void *), void *arg)
{
int res = 0;
* Read the User Manual of your IndustryPack device to know
* where to write the vector in memory.
*/
- slot_irq->vector = vector;
slot_irq->handler = handler;
slot_irq->arg = arg;
slot_irq->holder = dev;
tpci200->number = tpci200->info->ipack_bus->bus_nr;
dev_set_drvdata(&pdev->dev, tpci200);
- /*
- * Give the same IRQ number as the slot number.
- * The TPCI200 has assigned his own two IRQ by PCI bus driver
- */
for (i = 0; i < TPCI200_NB_SLOT; i++)
- ipack_device_register(tpci200->info->ipack_bus, i, i);
+ ipack_device_register(tpci200->info->ipack_bus, i);
return 0;
out_err_bus_register:
};
static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
- unsigned int slot, unsigned int vector)
+ unsigned int slot)
{
int res = 0;
int i;
* Depending of the carrier these addresses are accesible or not.
* More info in the datasheet.
*/
- ipoctal->dev->bus->ops->request_irq(ipoctal->dev, vector,
+ ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
ipoctal_irq_handler, ipoctal);
- iowrite8(vector, ipoctal->dev->mem_space.address + 1);
+ /* Dummy write */
+ iowrite8(1, ipoctal->dev->mem_space.address + 1);
/* Register the TTY device */
return -ENOMEM;
ipoctal->dev = dev;
- res = ipoctal_inst_slot(ipoctal, dev->bus_nr, dev->slot, dev->irq);
+ res = ipoctal_inst_slot(ipoctal, dev->bus_nr, dev->slot);
if (res)
goto out_uninst;
}
struct ipack_device *ipack_device_register(struct ipack_bus_device *bus,
- int slot, int irqv)
+ int slot)
{
int ret;
struct ipack_device *dev;
dev->dev.parent = bus->parent;
dev->slot = slot;
dev->bus_nr = bus->bus_nr;
- dev->irq = irqv;
dev->bus = bus;
dev_set_name(&dev->dev,
"ipack-dev.%u.%u", dev->bus_nr, dev->slot);
*
* @bus_nr: IP bus number where the device is plugged
* @slot: Slot where the device is plugged in the carrier board
- * @irq: IRQ vector
* @bus: ipack_bus_device where the device is plugged to.
* @id_space: Virtual address to ID space.
* @io_space: Virtual address to IO space.
struct ipack_device {
unsigned int bus_nr;
unsigned int slot;
- unsigned int irq;
struct ipack_bus_device *bus;
struct ipack_addr_space id_space;
struct ipack_addr_space io_space;
struct ipack_bus_ops {
int (*map_space) (struct ipack_device *dev, unsigned int memory_size, int space);
int (*unmap_space) (struct ipack_device *dev, int space);
- int (*request_irq) (struct ipack_device *dev, int vector,
+ int (*request_irq) (struct ipack_device *dev,
irqreturn_t (*handler)(void *), void *arg);
int (*free_irq) (struct ipack_device *dev);
int (*get_clockrate) (struct ipack_device *dev);
*
* @bus: ipack bus device it is plugged to.
* @slot: slot position in the bus device.
- * @irqv: IRQ vector for the mezzanine.
*
* Register a new ipack device (mezzanine device). The call is done by
* the carrier device driver.
*/
-struct ipack_device *ipack_device_register(struct ipack_bus_device *bus,
- int slot, int irqv);
+struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, int slot);
void ipack_device_unregister(struct ipack_device *dev);
/**