kconfig: Convert device tree chosen properties to new kconfigfunctions

Convert how we get the various chosen properties like "zephyr,console"
to use the new kconfig functions like dt_chosen_to_label.

Because of how kconfig parses things we define a set of variables of the
form DT_CHOSEN_Z_<PROP> since comma's are parsed as field seperators in
macros.

This conversion allows us to remove code in gen_defines.py for the
following chosen properties:

zephyr,console
zephyr,shell-uart
zephyr,bt-uart
zephyr,uart-pipe
zephyr,bt-mon-uart
zephyr,uart-mcumgr
zephyr,bt-c2h-uart

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-08-28 09:29:26 -05:00 committed by Kumar Gala
commit 8ce0cf0126
11 changed files with 59 additions and 47 deletions

View file

@ -178,8 +178,11 @@ if FLASH
config SOC_FLASH_RV32M1
default y
# Workaround for not being able to have commas in macro arguments
DT_CHOSEN_Z_FLASH := zephyr,flash
config FLASH_BASE_ADDRESS
default $(dt_hex_val,DT_FLASH_BASE_ADDRESS)
default $(dt_chosen_reg_addr,$(DT_CHOSEN_Z_FLASH))
endif # FLASH