Skip to content
Commit 69c15f0e authored by Findlay Feng's avatar Findlay Feng Committed by Kumar Gala
Browse files

dts: flash_map: Automatically generate of the list of flash area



This Patch add functionality for automatic generation of the flash map
using DTS description. Automatic generation allows to replace
C-hardcoded flash_map.

We generate a set of defines based on the index of a partiion:
	#define DT_FLASH_AREA_<IDX>_OFFSET	0
	#define DT_FLASH_AREA_<IDX>_SIZE	131072
	#define DT_FLASH_AREA_<IDX>_DEV		"FLASH_CTRL"
	#define DT_FLASH_AREA_<IDX>_LABEL	MCUBOOT

Additionally we also define:
	#define DT_FLASH_AREA_NUM		4

and:
	#define DT_FLASH_AREA_<PARTNAME>_ID	0

Signed-off-by: default avatarFindlay Feng <i@fengch.me>
Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent 85c8c0fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment