diff --git a/arch/risc-v/src/litex/Kconfig b/arch/risc-v/src/litex/Kconfig index 1f20f37372..846bed7109 100644 --- a/arch/risc-v/src/litex/Kconfig +++ b/arch/risc-v/src/litex/Kconfig @@ -5,6 +5,12 @@ comment "LITEX Configuration Options" +config LITEX_SYS_CORE_FREQ_HZ + int "Risc-V system core frequency (Hz)" + default 100000000 + ---help--- + This value should match default frequency of the FPGA fabric system clock. + menu "LITEX Peripheral Support" # These "hidden" settings determine whether a peripheral option is available diff --git a/arch/risc-v/src/litex/litex_clockconfig.c b/arch/risc-v/src/litex/litex_clockconfig.c index 00bc573e88..c72f9e2e43 100644 --- a/arch/risc-v/src/litex/litex_clockconfig.c +++ b/arch/risc-v/src/litex/litex_clockconfig.c @@ -50,7 +50,7 @@ uint32_t litex_get_hfclk(void) { /* fpga fabric default sys frequency */ - return 100000000UL; + return CONFIG_LITEX_SYS_CORE_FREQ_HZ; } /****************************************************************************