From 9673b883c261b055433527e9249781b43172c103 Mon Sep 17 00:00:00 2001 From: Alexandre Bounine Date: Tue, 22 Mar 2016 14:25:54 -0700 Subject: 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 Cc: Matt Porter Cc: Aurelien Jacquiot Cc: Andre van Herk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/rapidio/devices/tsi721.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'drivers/rapidio/devices/tsi721.h') diff --git a/drivers/rapidio/devices/tsi721.h b/drivers/rapidio/devices/tsi721.h index 355f356e5347..f81d01149b39 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 -- cgit v1.2.3