soc: arm: 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 07:06:40 -05:00 committed by Kumar Gala
commit 8b6acb5e91
13 changed files with 14 additions and 36 deletions

View file

@ -241,6 +241,7 @@ static int i2c_cc13xx_cc26xx_transfer(struct device *dev, struct i2c_msg *msgs,
return ret;
}
#define CPU_FREQ DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)
static int i2c_cc13xx_cc26xx_configure(struct device *dev, u32_t dev_config)
{
bool fast;
@ -270,8 +271,7 @@ static int i2c_cc13xx_cc26xx_configure(struct device *dev, u32_t dev_config)
}
/* Enables and configures I2C master */
I2CMasterInitExpClk(get_dev_config(dev)->base,
DT_CPU_CLOCK_FREQUENCY, fast);
I2CMasterInitExpClk(get_dev_config(dev)->base, CPU_FREQ, fast);
#ifdef CONFIG_SYS_POWER_MANAGEMENT
get_dev_data(dev)->dev_config = dev_config;