arch: xtensa: Get CPU clock frequency from DTS
The SoC initialization code used system clock frequency as a CPU clock frequency. This commit corrects that by obtaining the needed value from DTS. Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This commit is contained in:
parent
1161fdf239
commit
f2d84f08ff
5 changed files with 27 additions and 5 deletions
11
soc/xtensa/esp32/dts_fixup.h
Normal file
11
soc/xtensa/esp32/dts_fixup.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* SoC level DTS fixup file */
|
||||
|
||||
#define DT_CPU_CLOCK_FREQUENCY DT_CADENCE_TENSILICA_XTENSA_LX6_0_CLOCK_FREQUENCY
|
||||
|
||||
/* End of SoC Level DTS fixup file */
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
/* SoC level DTS fixup file */
|
||||
|
||||
#define DT_CPU_CLOCK_FREQUENCY DT_CADENCE_TENSILICA_XTENSA_LX6_0_CLOCK_FREQUENCY
|
||||
|
||||
#define DT_UART_NS16550_PORT_0_BASE_ADDR DT_NS16550_80800_BASE_ADDRESS
|
||||
#define DT_UART_NS16550_PORT_0_BAUD_RATE DT_NS16550_80800_CURRENT_SPEED
|
||||
#define DT_UART_NS16550_PORT_0_NAME DT_NS16550_80800_LABEL
|
||||
|
|
11
soc/xtensa/sample_controller/dts_fixup.h
Normal file
11
soc/xtensa/sample_controller/dts_fixup.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Nordic Semiconductor ASA
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* SoC level DTS fixup file */
|
||||
|
||||
#define DT_CPU_CLOCK_FREQUENCY DT_SAMPLE_CONTROLLER_0_CLOCK_FREQUENCY
|
||||
|
||||
/* End of SoC Level DTS fixup file */
|
Loading…
Add table
Add a link
Reference in a new issue