soc: riscv: openisa_rv32m1: Conver to new devicetree macros

Convert DT_CODE_PARTITION_{OFFSET,SIZE} to use new
DT_REG_ADDR/DT_REG_SIZE macros instead based on
DT_CHOSEN(zephyr_code_partition).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-04-28 11:29:40 -05:00 committed by Kumar Gala
commit 52a950bbe6

View file

@ -33,15 +33,15 @@
#ifdef CONFIG_BOOTLOADER_MCUBOOT
#define ROM_BASE (DT_CODE_PARTITION_OFFSET)
#define ROM_SIZE (DT_CODE_PARTITION_SIZE)
#define ROM_BASE (DT_REG_ADDR(DT_CHOSEN(zephyr_code_partition)))
#define ROM_SIZE (DT_REG_SIZE(DT_CHOSEN(zephyr_code_partition)))
#define VECTOR_BASE (ROM_BASE + CONFIG_TEXT_SECTION_OFFSET)
#else
#define ROM_BASE DT_CODE_PARTITION_OFFSET
#define ROM_SIZE (DT_CODE_PARTITION_SIZE - VECTOR_SIZE)
#define ROM_BASE (DT_REG_ADDR(DT_CHOSEN(zephyr_code_partition)))
#define ROM_SIZE (DT_REG_SIZE(DT_CHOSEN(zephyr_code_partition)) - VECTOR_BASE)
#define VECTOR_BASE (ROM_BASE + ROM_SIZE)