1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef ASM_POWERPC_DMA_DIRECT_H 3*4882a593Smuzhiyun #define ASM_POWERPC_DMA_DIRECT_H 1 4*4882a593Smuzhiyun phys_to_dma(struct device * dev,phys_addr_t paddr)5*4882a593Smuzhiyunstatic inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) 6*4882a593Smuzhiyun { 7*4882a593Smuzhiyun return paddr + dev->archdata.dma_offset; 8*4882a593Smuzhiyun } 9*4882a593Smuzhiyun dma_to_phys(struct device * dev,dma_addr_t daddr)10*4882a593Smuzhiyunstatic inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) 11*4882a593Smuzhiyun { 12*4882a593Smuzhiyun return daddr - dev->archdata.dma_offset; 13*4882a593Smuzhiyun } 14*4882a593Smuzhiyun #endif /* ASM_POWERPC_DMA_DIRECT_H */ 15