blob: edb7720f7bc30c439148aaeabda20e85ea796f8a [file] [log] [blame]
Gabor Ambrus54a10082023-08-14 21:56:06 +02001/*
2 * Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 * Copied from trustedfirmware-a and stripped down.
7 */
8
9#ifndef MMIO_H
10#define MMIO_H
11
12#include <stdint.h>
13
14static inline void mmio_write_32(uintptr_t addr, uint32_t value)
15{
16 *(volatile uint32_t *)addr = value;
17}
18
19static inline uint32_t mmio_read_32(uintptr_t addr)
20{
21 return *(volatile uint32_t *)addr;
22}
23
24#endif /* MMIO_H */