diff options
Diffstat (limited to 'platform/drivers/arm/juno_trng/mmio.h')
-rw-r--r-- | platform/drivers/arm/juno_trng/mmio.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/platform/drivers/arm/juno_trng/mmio.h b/platform/drivers/arm/juno_trng/mmio.h new file mode 100644 index 000000000..da8d82fde --- /dev/null +++ b/platform/drivers/arm/juno_trng/mmio.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2013-2021, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Copied from trustedfirmware-a and stripped down to only provide functions + * used by juno_trng.c. + */ + +#ifndef MMIO_H +#define MMIO_H + +#include <stdint.h> + + +static inline void mmio_write_32(uintptr_t addr, uint32_t value) +{ + *(volatile uint32_t*)addr = value; +} + +static inline uint32_t mmio_read_32(uintptr_t addr) +{ + return *(volatile uint32_t*)addr; +} + +#endif /* MMIO_H */ |