#define PCI_SUBVENDOR_ID_HUMUSOFT 0x186c
#define PCI_SUBDEVICE_DEVICE 0x0000
+#define STATUS_OFFSET 0x10
+#define STATUS_T5INTE (u32) (1 << 19)
+#define STATUS_T5 (u32) (1 << 18)
+#define STATUS_CCINTE (u32) (1 << 3)
+#define STATUS_CC (u32) (1 << 2)
+
static irqreturn_t mf614_irq_handler(int irq, struct uio_info *dev_info)
+{
+ void __iomem *status_reg = dev_info->priv + STATUS_OFFSET;
+
+ if ((status_reg & STATUS_T5INTE) && (status_reg & STATUS_T5)) {
+ iowrite8(ioread8(status_reg) & ~STATUS_T5, status_reg);
+ return IRQ_HANDLED;
+ }
+
+ if ((status_reg & STATUS_CCINTE) && (status_reg & STATUS_CC)) {
+ iowrite8(ioread8(status_reg) & ~STATUS_CC, status_reg);
+ return IRQ_HANDLED;
+ }
+
+ return IRQ_NONE;
+}
static int __devinit mf614_pci_probe(struct pci_dev *dev,
const struct pci_device_id *id)
goto out_release;
info->port[0].size = pci_resource_len(dev, 0);
+ info->port[1].porttype = UIO_PORT_X86;
+ info->port[1].start = pci_resource_start(dev, 2);
+ if (!info->port[1].start)
+ goto out_release;
+ info->port[1].size = pci_resource_len(dev, 2);
+
+ info->priv = pci_iomap(dev, 2, 0);
+ if (!info->priv)
+ goto out_release;
+
info->mem[1].addr = pci_resource_start(dev, 4);
if (!info->mem[1].addr)
goto out_release;
module_exit(mf614_exit_module);
MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Rostislav Lisovy");
+MODULE_AUTHOR("Rostislav Lisovy <lisovy@gmail.com>");