diff options
Diffstat (limited to 'drivers/staging/xillybus/xillybus.h')
-rw-r--r-- | drivers/staging/xillybus/xillybus.h | 48 |
1 files changed, 14 insertions, 34 deletions
diff --git a/drivers/staging/xillybus/xillybus.h b/drivers/staging/xillybus/xillybus.h index 78a749a7a1c1..a0806b5ee2cb 100644 --- a/drivers/staging/xillybus/xillybus.h +++ b/drivers/staging/xillybus/xillybus.h @@ -25,33 +25,12 @@ struct xilly_endpoint_hardware; -struct xilly_page { - struct list_head node; - unsigned long addr; - unsigned int order; -}; - -struct xilly_dma { - struct list_head node; - struct pci_dev *pdev; - struct device *dev; - dma_addr_t dma_addr; - size_t size; - int direction; -}; - struct xilly_buffer { void *addr; dma_addr_t dma_addr; int end_offset; /* Counting elements, not bytes */ }; -struct xilly_cleanup { - struct list_head to_kfree; - struct list_head to_pagefree; - struct list_head to_unmap; -}; - struct xilly_idt_handle { unsigned char *chandesc; unsigned char *idt; @@ -120,15 +99,12 @@ struct xilly_endpoint { struct list_head ep_list; int dma_using_dac; /* =1 if 64-bit DMA is used, =0 otherwise. */ - __iomem u32 *registers; + __iomem void *registers; int fatal_error; struct mutex register_mutex; wait_queue_head_t ep_wait; - /* List of memory allocations, to make release easy */ - struct xilly_cleanup cleanup; - /* Channels and message handling */ struct cdev cdev; @@ -156,18 +132,22 @@ struct xilly_endpoint_hardware { dma_addr_t, size_t, int); - dma_addr_t (*map_single)(struct xilly_cleanup *, - struct xilly_endpoint *, - void *, - size_t, - int); - void (*unmap_single)(struct xilly_dma *entry); + int (*map_single)(struct xilly_endpoint *, + void *, + size_t, + int, + dma_addr_t *); }; -irqreturn_t xillybus_isr(int irq, void *data); +struct xilly_mapping { + void *device; + dma_addr_t dma_addr; + size_t size; + int direction; +}; -void xillybus_do_cleanup(struct xilly_cleanup *mem, - struct xilly_endpoint *endpoint); + +irqreturn_t xillybus_isr(int irq, void *data); struct xilly_endpoint *xillybus_init_endpoint(struct pci_dev *pdev, struct device *dev, |