soc: esp32: add CCOUNT xtensa rate default value
Xtensa's ESP32 misses this base CCOUNT value, which causes wrong
arch_timing_freq_get() value reference.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
diff --git a/soc/xtensa/esp32/Kconfig.defconfig b/soc/xtensa/esp32/Kconfig.defconfig
index b77235a..00a26ab 100644
--- a/soc/xtensa/esp32/Kconfig.defconfig
+++ b/soc/xtensa/esp32/Kconfig.defconfig
@@ -45,6 +45,9 @@
config MINIMAL_LIBC_OPTIMIZE_STRING_FOR_SIZE
default n
+config XTENSA_CCOUNT_HZ
+ default SYS_CLOCK_HW_CYCLES_PER_SEC
+
if GDBSTUB
# ESP32 GDB expects 420 bytes G-packet.
diff --git a/soc/xtensa/esp32_net/Kconfig.defconfig b/soc/xtensa/esp32_net/Kconfig.defconfig
index 31cd6de..f484e0a 100644
--- a/soc/xtensa/esp32_net/Kconfig.defconfig
+++ b/soc/xtensa/esp32_net/Kconfig.defconfig
@@ -13,4 +13,7 @@
config MINIMAL_LIBC_OPTIMIZE_STRING_FOR_SIZE
default n
+config XTENSA_CCOUNT_HZ
+ default SYS_CLOCK_HW_CYCLES_PER_SEC
+
endif
diff --git a/soc/xtensa/esp32s2/Kconfig.defconfig b/soc/xtensa/esp32s2/Kconfig.defconfig
index 53e9580..d426638 100644
--- a/soc/xtensa/esp32s2/Kconfig.defconfig
+++ b/soc/xtensa/esp32s2/Kconfig.defconfig
@@ -46,4 +46,7 @@
config MINIMAL_LIBC_OPTIMIZE_STRING_FOR_SIZE
default n
+config XTENSA_CCOUNT_HZ
+ default SYS_CLOCK_HW_CYCLES_PER_SEC
+
endif