1 // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 3 * ioremap implementation. 4 * 5 * Copyright (C) 2015 Cadence Design Systems I 6 */ 7 8 #include <linux/io.h> 9 #include <linux/pgtable.h> 10 #include <asm/cacheflush.h> 11 #include <asm/io.h> 12 13 void __iomem *ioremap_prot(phys_addr_t phys_ad 14 unsigned long prot) 15 { 16 unsigned long pfn = __phys_to_pfn((phy 17 WARN_ON(pfn_valid(pfn)); 18 19 return generic_ioremap_prot(phys_addr, 20 } 21 EXPORT_SYMBOL(ioremap_prot); 22 23 void iounmap(volatile void __iomem *addr) 24 { 25 unsigned long va = (unsigned long) add 26 27 if ((va >= XCHAL_KIO_CACHED_VADDR && 28 va - XCHAL_KIO_CACHED_VADDR < XC 29 (va >= XCHAL_KIO_BYPASS_VADDR && 30 va - XCHAL_KIO_BYPASS_VADDR < XC 31 return; 32 33 generic_iounmap(addr); 34 } 35 EXPORT_SYMBOL(iounmap); 36
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.