1# Copyright (c) 2014-2015 Wind River Systems, Inc. 2# Copyright (c) 2016 Cadence Design Systems, Inc. 3# Copyright (c) 2019-2023 Intel Corp. 4# SPDX-License-Identifier: Apache-2.0 5 6config RISCV_MACHINE_TIMER 7 bool "RISCV Machine Timer" 8 default y 9 depends on DT_HAS_ANDESTECH_MACHINE_TIMER_ENABLED || \ 10 DT_HAS_NEORV32_MACHINE_TIMER_ENABLED || \ 11 DT_HAS_NUCLEI_SYSTIMER_ENABLED || \ 12 DT_HAS_SIFIVE_CLINT0_ENABLED || \ 13 DT_HAS_TELINK_MACHINE_TIMER_ENABLED || \ 14 DT_HAS_LOWRISC_MACHINE_TIMER_ENABLED || \ 15 DT_HAS_NIOSV_MACHINE_TIMER_ENABLED 16 select TICKLESS_CAPABLE 17 select TIMER_HAS_64BIT_CYCLE_COUNTER 18 help 19 This module implements a kernel device driver for the generic RISCV machine 20 timer driver. It provides the standard "system clock driver" interfaces. 21 22if RISCV_MACHINE_TIMER 23 24config RISCV_MACHINE_TIMER_SYSTEM_CLOCK_DIVIDER 25 int 26 default 0 27 help 28 Specifies the division ratio of the system clock supplied to the Machine Timer. 29 30 A clock obtained by dividing the system clock by a value of [2^N] is 31 supplied to the timer. Where N is this parameter's value. 32 When N=2, it is divided by 4, and when N=5, it is divided by 32. 33 Default case is N=0, this means use system clock as machine timer clock. 34 It is normal configuration for RISC-V machine clock. 35 36 This parameter usually depends on the hardware configuration. 37 The division ratio should define in devicetree, 38 and it is desirable usage that references it with using a function such as 39 dt_node_int_prop_int from Kconfig. (Tune in the conf file is not preferable.) 40 41endif 42