dts: drop HAS_DTS
HAS_DTS has become a redundant option. All Zephyr architectures now select this option, meaning devicetree has become a de-facto requirement. In fact, if any board does not provide a devicetree source, the build system uses an empty stub, meaning the devicetree machinery always runs. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
e1137a3e5e
commit
915cb05bb6
10
arch/Kconfig
10
arch/Kconfig
|
@ -19,7 +19,6 @@ source "$(ARCH_DIR)/$(ARCH)/Kconfig"
|
|||
config ARC
|
||||
bool
|
||||
select ARCH_IS_SET
|
||||
select HAS_DTS
|
||||
imply XIP
|
||||
select ARCH_HAS_THREAD_LOCAL_STORAGE
|
||||
select ARCH_SUPPORTS_ROM_START
|
||||
|
@ -30,7 +29,6 @@ config ARM
|
|||
bool
|
||||
select ARCH_IS_SET
|
||||
select ARCH_SUPPORTS_COREDUMP if CPU_CORTEX_M
|
||||
select HAS_DTS
|
||||
# FIXME: current state of the code for all ARM requires this, but
|
||||
# is really only necessary for Cortex-M with ARM MPU!
|
||||
select GEN_PRIV_STACKS
|
||||
|
@ -43,7 +41,6 @@ config ARM64
|
|||
bool
|
||||
select ARCH_IS_SET
|
||||
select 64BIT
|
||||
select HAS_DTS
|
||||
select ARCH_SUPPORTS_COREDUMP
|
||||
select HAS_ARM_SMCCC
|
||||
select ARCH_HAS_THREAD_LOCAL_STORAGE
|
||||
|
@ -58,14 +55,12 @@ config MIPS
|
|||
bool
|
||||
select ARCH_IS_SET
|
||||
select ATOMIC_OPERATIONS_C
|
||||
select HAS_DTS
|
||||
help
|
||||
MIPS architecture
|
||||
|
||||
config SPARC
|
||||
bool
|
||||
select ARCH_IS_SET
|
||||
select HAS_DTS
|
||||
select USE_SWITCH
|
||||
select USE_SWITCH_SUPPORTED
|
||||
select BIG_ENDIAN
|
||||
|
@ -80,7 +75,6 @@ config X86
|
|||
bool
|
||||
select ARCH_IS_SET
|
||||
select ATOMIC_OPERATIONS_BUILTIN
|
||||
select HAS_DTS
|
||||
select ARCH_SUPPORTS_COREDUMP
|
||||
select ARCH_SUPPORTS_ROM_START if !X86_64
|
||||
select CPU_HAS_MMU
|
||||
|
@ -102,7 +96,6 @@ config NIOS2
|
|||
bool
|
||||
select ARCH_IS_SET
|
||||
select ATOMIC_OPERATIONS_C
|
||||
select HAS_DTS
|
||||
imply XIP
|
||||
select ARCH_HAS_TIMING_FUNCTIONS
|
||||
help
|
||||
|
@ -111,7 +104,6 @@ config NIOS2
|
|||
config RISCV
|
||||
bool
|
||||
select ARCH_IS_SET
|
||||
select HAS_DTS
|
||||
select ARCH_SUPPORTS_COREDUMP
|
||||
select ARCH_SUPPORTS_ROM_START if !SOC_SERIES_ESP32C3
|
||||
select ARCH_HAS_CODE_DATA_RELOCATION
|
||||
|
@ -128,7 +120,6 @@ config RISCV
|
|||
config XTENSA
|
||||
bool
|
||||
select ARCH_IS_SET
|
||||
select HAS_DTS
|
||||
select USE_SWITCH
|
||||
select USE_SWITCH_SUPPORTED
|
||||
select IRQ_OFFLOAD_NESTED if IRQ_OFFLOAD
|
||||
|
@ -141,7 +132,6 @@ config XTENSA
|
|||
config ARCH_POSIX
|
||||
bool
|
||||
select ARCH_IS_SET
|
||||
select HAS_DTS
|
||||
select ATOMIC_OPERATIONS_BUILTIN
|
||||
select ARCH_HAS_CUSTOM_SWAP_TO_MAIN
|
||||
select ARCH_HAS_CUSTOM_BUSY_WAIT
|
||||
|
|
|
@ -9,9 +9,6 @@ include(pre_dt)
|
|||
find_package(HostTools)
|
||||
find_package(Dtc 1.4.6)
|
||||
|
||||
# Zephyr code is usually configured using devicetree, but this is
|
||||
# still technically optional (see e.g. CONFIG_HAS_DTS).
|
||||
#
|
||||
# This module makes information from the devicetree available to
|
||||
# various build stages, as well as to other arbitrary Python scripts:
|
||||
#
|
||||
|
@ -125,8 +122,6 @@ set(DTS_CMAKE ${PROJECT_BINARY_DIR}/dts.cmake)
|
|||
# modules.
|
||||
set(VENDOR_PREFIXES dts/bindings/vendor-prefixes.txt)
|
||||
|
||||
# TODO: What to do about non-posix platforms where NOT CONFIG_HAS_DTS (xtensa)?
|
||||
# Drop support for NOT CONFIG_HAS_DTS perhaps?
|
||||
set_ifndef(DTS_SOURCE ${BOARD_DIR}/${BOARD}.dts)
|
||||
if(EXISTS ${DTS_SOURCE})
|
||||
# We found a devicetree. Check for a board revision overlay.
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config HAS_DTS
|
||||
bool
|
||||
help
|
||||
This option specifies that the target platform supports device tree
|
||||
configuration.
|
||||
|
||||
menu "Devicetree Info"
|
||||
|
||||
osource "$(KCONFIG_BINARY_DIR)/Kconfig.dts"
|
||||
|
|
|
@ -1005,7 +1005,6 @@ static inline bool z_impl_device_is_ready(const struct device *dev)
|
|||
\
|
||||
Z_DEVICE_INIT_ENTRY_DEFINE(node_id, dev_id, init_fn, level, prio)
|
||||
|
||||
#if defined(CONFIG_HAS_DTS) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Declare a device for each status "okay" devicetree node.
|
||||
*
|
||||
|
@ -1020,7 +1019,6 @@ static inline bool z_impl_device_is_ready(const struct device *dev)
|
|||
extern const struct device DEVICE_DT_NAME_GET(node_id);
|
||||
|
||||
DT_FOREACH_STATUS_OKAY_NODE(Z_MAYBE_DEVICE_DECLARE_INTERNAL)
|
||||
#endif /* CONFIG_HAS_DTS */
|
||||
|
||||
/** @endcond */
|
||||
|
||||
|
|
|
@ -191,11 +191,9 @@ const struct emul *emul_get_binding(const char *name);
|
|||
* @}
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_HAS_DTS) || defined(__DOXYGEN__)
|
||||
#define Z_MAYBE_EMUL_DECLARE_INTERNAL(node_id) extern const struct emul EMUL_DT_NAME_GET(node_id);
|
||||
|
||||
DT_FOREACH_STATUS_OKAY_NODE(Z_MAYBE_EMUL_DECLARE_INTERNAL);
|
||||
#endif /* CONFIG_HAS_DTS || __DOXYGEN__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1260,8 +1260,6 @@ static inline int64_t sensor_value_to_micro(const struct sensor_value *val)
|
|||
* @}
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_HAS_DTS) || defined(__DOXYGEN__)
|
||||
|
||||
/**
|
||||
* @brief Get the decoder name for the current driver
|
||||
*
|
||||
|
@ -1309,7 +1307,6 @@ static inline int64_t sensor_value_to_micro(const struct sensor_value *val)
|
|||
())
|
||||
|
||||
DT_FOREACH_STATUS_OKAY_NODE(Z_MAYBE_SENSOR_DECODER_DECLARE_INTERNAL)
|
||||
#endif /* defined(CONFIG_HAS_DTS) || defined(__DOXYGEN__) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -18,8 +18,7 @@ config SHELL_BACKEND_SERIAL
|
|||
bool "Serial backend"
|
||||
# Serial (UART) requires interrupts and the RTT backend cannot be used from an ISR context.
|
||||
default n if SHELL_BACKEND_RTT
|
||||
default "$(dt_chosen_enabled,$(DT_CHOSEN_Z_SHELL_UART))" if HAS_DTS
|
||||
default y if !HAS_DTS
|
||||
default "$(dt_chosen_enabled,$(DT_CHOSEN_Z_SHELL_UART))"
|
||||
select SERIAL
|
||||
select RING_BUFFER
|
||||
help
|
||||
|
|
Loading…
Reference in a new issue