/** * struct uio_mem - description of a UIO memory region * @name: name of the memory region for identification * @addr: address of the device's memory rounded to page * size (phys_addr is used since addr can be * logical, virtual, or physical & phys_addr_t * should always be large enough to handle any of * the address types) * @dma_addr: DMA handle set by dma_alloc_coherent, used with * UIO_MEM_DMA_COHERENT only (@addr should be the * void * returned from the same dma_alloc_coherent call) * @offs: offset of device memory within the page * @size: size of IO (multiple of page size) * @memtype: type of memory addr points to * @internal_addr: ioremap-ped version of addr, for driver internal use * @dma_device: device struct that was passed to dma_alloc_coherent, * used with UIO_MEM_DMA_COHERENT only * @map: for use by the UIO core only.
*/ struct uio_mem { constchar *name;
phys_addr_t addr;
dma_addr_t dma_addr; unsignedlong offs;
resource_size_t size; int memtype; void __iomem *internal_addr; struct device *dma_device; struct uio_map *map;
};
#define MAX_UIO_MAPS 5
struct uio_portio;
/** * struct uio_port - description of a UIO port region * @name: name of the port region for identification * @start: start of port region * @size: size of port region * @porttype: type of port (see UIO_PORT_* below) * @portio: for use by the UIO core only.
*/ struct uio_port { constchar *name; unsignedlong start; unsignedlong size; int porttype; struct uio_portio *portio;
};
/** * struct uio_info - UIO device capabilities * @uio_dev: the UIO device this info belongs to * @name: device name * @version: device driver version * @mem: list of mappable memory regions, size==0 for end of list * @port: list of port regions, size==0 for end of list * @irq: interrupt number or UIO_IRQ_CUSTOM * @irq_flags: flags for request_irq() * @priv: optional private data * @handler: the device's irq handler * @mmap: mmap operation for this uio device * @open: open operation for this uio device * @release: release operation for this uio device * @irqcontrol: disable/enable irqs when 0/1 is written to /dev/uioX
*/ struct uio_info { struct uio_device *uio_dev; constchar *name; constchar *version; struct uio_mem mem[MAX_UIO_MAPS]; struct uio_port port[MAX_UIO_PORT_REGIONS]; long irq; unsignedlong irq_flags; void *priv;
irqreturn_t (*handler)(int irq, struct uio_info *dev_info); int (*mmap)(struct uio_info *info, struct vm_area_struct *vma); int (*open)(struct uio_info *info, struct inode *inode); int (*release)(struct uio_info *info, struct inode *inode); int (*irqcontrol)(struct uio_info *info, s32 irq_on);
};
/* defines for uio_mem->memtype */ #define UIO_MEM_NONE 0 #define UIO_MEM_PHYS 1 #define UIO_MEM_LOGICAL 2 #define UIO_MEM_VIRTUAL 3 #define UIO_MEM_IOVA 4 /* * UIO_MEM_DMA_COHERENT exists for legacy drivers that had been getting by with * improperly mapping DMA coherent allocations through the other modes. * Do not use in new drivers.
*/ #define UIO_MEM_DMA_COHERENT 5
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.