arch: xtensa: replace DT_CPU_CLOCK_FREQUENCY with new dt macros

Replace DT_CPU_CLOCK_FREQUENCY with a PATH based reference to cpu@0
(DT_PATH(cpus, cpu_0)) and than getting the clock_frequency property:

DT_CPU_CLOCK_FREQUENCY -> DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)

This lets us remove DT_CPU_CLOCK_FREQUENCY from dts_fixup.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-04-22 06:57:19 -05:00 committed by Kumar Gala
commit 6784558b22
5 changed files with 2 additions and 25 deletions

View file

@ -47,7 +47,7 @@
#endif
#undef XT_CLOCK_FREQ
#define XT_CLOCK_FREQ DT_CPU_CLOCK_FREQUENCY
#define XT_CLOCK_FREQ DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)
#ifndef XT_TIMER_INDEX
#if defined configXT_TIMER_INDEX

View file

@ -115,7 +115,7 @@
* anyway!).
*/
#if defined(XT_SIMULATOR) && !defined(XT_CLOCK_FREQ)
#define XT_CLOCK_FREQ DT_CPU_CLOCK_FREQUENCY
#define XT_CLOCK_FREQ DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)
#endif
#if !defined(XT_CLOCK_FREQ) && !defined(XT_BOARD)