1 /* 2 * Copyright 2025 NXP 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <metal/io.h> 8 9 /* 10 * Description of a single physical page from the I/O region. 11 * Local address is remap to remote address - 12 * according to the memory map from the reference manual. 13 */ 14 struct phys_page_info { 15 const metal_phys_addr_t addr; /* local address */ 16 const metal_phys_addr_t remote_addr; /* remote address */ 17 const size_t size; 18 }; 19 20 /* 21 * Table of base physical addresses, local and remote, 22 * of the pages in the I/O region, along with size (no_pages) 23 */ 24 struct phys_pages { 25 size_t no_pages; /* number of pages */ 26 const struct phys_page_info *map; /* table of pages */ 27 }; 28 29 /** 30 * @brief Return generic I/O operations 31 * 32 * @param phys Physical base address of the I/O region 33 * @return metal_io_ops struct 34 */ 35 const struct metal_io_ops *addr_translation_get_ops(metal_phys_addr_t phys); 36