/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Copyright (C) 2020 Google, Inc3*/45#ifndef _ASM_RISCV_CLINT_H6#define _ASM_RISCV_CLINT_H78#include <linux/types.h>9#include <asm/mmio.h>1011#ifdef CONFIG_RISCV_M_MODE12/*13* This lives in the CLINT driver, but is accessed directly by timex.h to avoid14* any overhead when accessing the MMIO timer.15*16* The ISA defines mtime as a 64-bit memory-mapped register that increments at17* a constant frequency, but it doesn't define some other constraints we depend18* on (most notably ordering constraints, but also some simpler stuff like the19* memory layout). Thus, this is called "clint_time_val" instead of something20* like "riscv_mtime", to signify that these non-ISA assumptions must hold.21*/22extern u64 __iomem *clint_time_val;23#endif2425#endif262728