1*34b686b2SFrançois Tigeot /* 2*34b686b2SFrançois Tigeot * Copyright (c) 2015 François Tigeot 3*34b686b2SFrançois Tigeot * All rights reserved. 4*34b686b2SFrançois Tigeot * 5*34b686b2SFrançois Tigeot * Redistribution and use in source and binary forms, with or without 6*34b686b2SFrançois Tigeot * modification, are permitted provided that the following conditions 7*34b686b2SFrançois Tigeot * are met: 8*34b686b2SFrançois Tigeot * 1. Redistributions of source code must retain the above copyright 9*34b686b2SFrançois Tigeot * notice unmodified, this list of conditions, and the following 10*34b686b2SFrançois Tigeot * disclaimer. 11*34b686b2SFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright 12*34b686b2SFrançois Tigeot * notice, this list of conditions and the following disclaimer in the 13*34b686b2SFrançois Tigeot * documentation and/or other materials provided with the distribution. 14*34b686b2SFrançois Tigeot * 15*34b686b2SFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16*34b686b2SFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17*34b686b2SFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18*34b686b2SFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19*34b686b2SFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20*34b686b2SFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21*34b686b2SFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22*34b686b2SFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23*34b686b2SFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24*34b686b2SFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25*34b686b2SFrançois Tigeot */ 26*34b686b2SFrançois Tigeot 27*34b686b2SFrançois Tigeot #ifndef _ASM_PCI_DMA_COMPAT_H_ 28*34b686b2SFrançois Tigeot #define _ASM_PCI_DMA_COMPAT_H_ 29*34b686b2SFrançois Tigeot 30*34b686b2SFrançois Tigeot #include <vm/vm_page.h> 31*34b686b2SFrançois Tigeot 32*34b686b2SFrançois Tigeot static inline dma_addr_t 33*34b686b2SFrançois Tigeot pci_map_page(struct pci_dev *hwdev, struct vm_page *page, 34*34b686b2SFrançois Tigeot unsigned long offset, size_t size, int direction) 35*34b686b2SFrançois Tigeot { 36*34b686b2SFrançois Tigeot return VM_PAGE_TO_PHYS(page) + offset; 37*34b686b2SFrançois Tigeot } 38*34b686b2SFrançois Tigeot 39*34b686b2SFrançois Tigeot static inline void 40*34b686b2SFrançois Tigeot pci_unmap_page(struct pci_dev *hwdev, dma_addr_t dma_address, 41*34b686b2SFrançois Tigeot size_t size, int direction) 42*34b686b2SFrançois Tigeot { 43*34b686b2SFrançois Tigeot } 44*34b686b2SFrançois Tigeot 45*34b686b2SFrançois Tigeot #endif /* _ASM_PCI_DMA_COMPAT_H_ */ 46