summaryrefslogtreecommitdiff
path: root/drivers/rapidio/devices/tsi721.h
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2016-03-22 21:25:54 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-22 22:36:02 (GMT)
commit9673b883c261b055433527e9249781b43172c103 (patch)
tree21609818c2c8e191e7086bf5c4f33f3a18f7d626 /drivers/rapidio/devices/tsi721.h
parentba5d141b55ff0c02127cabd344585622bbaa5d02 (diff)
downloadlinux-9673b883c261b055433527e9249781b43172c103.tar.xz
rapidio/tsi721: add option to configure direct mapping of IB window
Add an option to configure mapping of Inbound Window without RIO-to-PCIe address translation. If a local memory buffer is not properly aligned to meet HW requirements for RapidIO address mapping with address translation, caller can request an inbound window with matching RapidIO address assigned to it. This implementation selects RapidIO base address and size for inbound window that are capable to accommodate the local memory buffer. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Andre van Herk <andre.van.herk@prodrive-technologies.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rapidio/devices/tsi721.h')
-rw-r--r--drivers/rapidio/devices/tsi721.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/rapidio/devices/tsi721.h b/drivers/rapidio/devices/tsi721.h
index 355f356..f81d011 100644
--- a/drivers/rapidio/devices/tsi721.h
+++ b/drivers/rapidio/devices/tsi721.h
@@ -808,11 +808,18 @@ struct msix_irq {
};
#endif /* CONFIG_PCI_MSI */
+struct tsi721_ib_win_mapping {
+ struct list_head node;
+ dma_addr_t lstart;
+};
+
struct tsi721_ib_win {
u64 rstart;
u32 size;
dma_addr_t lstart;
bool active;
+ bool xlat;
+ struct list_head mappings;
};
struct tsi721_device {
@@ -853,7 +860,7 @@ struct tsi721_device {
/* Inbound Mapping Windows */
struct tsi721_ib_win ib_win[TSI721_IBWIN_NUM];
- spinlock_t win_lock;
+ int ibwin_cnt;
};
#ifdef CONFIG_RAPIDIO_DMA_ENGINE