Skip to content

Commit 3671184

Browse files
etienne-lmsnashif
authored andcommitted
bl2: mcuboot: fix build warning related to flash_map
Declare flash_area_sector_from_off() and flash_area_get_sector() that where added in MCUBoot and declared in mainline TF-M repository from commit 1329d18 ("BL2: Update MCUboot tag to v2.2.0-rc1") nut not considered in the Zephyr TF-M 2.2.x branch when bumping to MCUBoot 2.2.x in commit 969addd ("BL2: MCUboot: Use v2.2.0"). Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
1 parent 9f2b1bd commit 3671184

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bl2/ext/mcuboot/include/flash_map/flash_map.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,22 @@ uint32_t flash_area_align(const struct flash_area *area);
165165
int flash_area_get_sectors(int fa_id, uint32_t *count,
166166
struct flash_sector *sectors);
167167

168+
/* Retrieve the flash sector a given offset belongs to.
169+
*
170+
* Returns 0 on success, or an error code on failure.
171+
*/
172+
int flash_area_sector_from_off(uint32_t off, struct flash_sector *sector);
173+
174+
/* Retrieve the flash sector a given offset, within flash area.
175+
*
176+
* @param fa flash area.
177+
* @param off offset of sector.
178+
* @param sector pointer to structure for obtained information.
179+
* Returns 0 on success, or an error code on failure.
180+
*/
181+
int flash_area_get_sector(const struct flash_area *fa, uint32_t off,
182+
struct flash_sector *sector);
183+
168184
/*
169185
* Similar to flash_area_get_sectors(), but return the values in an
170186
* array of struct flash_area instead.

0 commit comments

Comments
 (0)