libmetal
io.h
Go to the documentation of this file.
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
23extern "C" {
24#endif
25
26#ifdef METAL_INTERNAL
27
31static inline void metal_sys_io_mem_map(struct metal_io_region *io)
32{
33 metal_unused(io);
34}
35
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__ */
void * metal_machine_io_mem_map(void *va, metal_phys_addr_t pa, size_t size, unsigned int flags)
Definition: sys.c:64
unsigned long metal_phys_addr_t
Definition: sys.h:30
#define metal_unused(x)
Definition: utilities.h:28
Definition: io.h:73
void metal_sys_io_mem_map(struct metal_io_region *io)
Definition: io.c:14