1 /* 2 * Copyright (c) 2017, Linaro Limited. and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /* 8 * @file zephyr/io.h 9 * @brief Zephyr specific io definitions. 10 */ 11 12 #ifndef __METAL_IO__H__ 13 #error "Include metal/io.h instead of metal/zephyr/io.h" 14 #endif 15 16 #ifndef __METAL_ZEPHYR_IO__H__ 17 #define __METAL_ZEPHYR_IO__H__ 18 19 #include <stdlib.h> 20 #include <metal/utilities.h> 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 #ifdef METAL_INTERNAL 27 28 /** 29 * @brief memory mapping for an I/O region 30 */ metal_sys_io_mem_map(struct metal_io_region * io)31static inline void metal_sys_io_mem_map(struct metal_io_region *io) 32 { 33 metal_unused(io); 34 } 35 36 /** 37 * @brief memory mapping 38 */ metal_machine_io_mem_map(void * va,metal_phys_addr_t pa,size_t size,unsigned int flags)39static inline void *metal_machine_io_mem_map(void *va, metal_phys_addr_t pa, 40 size_t size, unsigned int flags) 41 { 42 metal_unused(pa); 43 metal_unused(size); 44 metal_unused(flags); 45 46 return va; 47 } 48 49 #endif 50 51 #ifdef __cplusplus 52 } 53 #endif 54 55 #endif /* __METAL_ZEPHYR_IO__H__ */ 56