docs/PORTING.md: Update APIs needed for porting MCUboot
Signed-off-by: Rajiv Ranganath <rajiv.ranganath@atihita.com>
diff --git a/docs/PORTING.md b/docs/PORTING.md
index ad2b885..bf68d6d 100644
--- a/docs/PORTING.md
+++ b/docs/PORTING.md
@@ -117,12 +117,24 @@
int flash_area_erase(const struct flash_area *, uint32_t off, uint32_t len);
/*< Returns this `flash_area`s alignment */
uint8_t flash_area_align(const struct flash_area *);
-/*< Initializes an array of flash_area elements for the slot's sectors */
-int flash_area_to_sectors(int idx, int *cnt, struct flash_area *ret);
-/*< Returns the `fa_id` for slot, where slot is 0 (primary) or 1 (secondary) */
-int flash_area_id_from_image_slot(int slot);
-/*< Returns the slot, for the `fa_id` supplied */
-int flash_area_id_to_image_slot(int area_id);
+/*< What is value is read from erased flash bytes. */
+uint8_t flash_area_erased_val(const struct flash_area *);
+/*< Reads len bytes from off, and checks if the read data is erased. Returns
+ 1 if empty (that is containing erased value), 0 if not-empty, and -1 on
+ failure. */
+int flash_area_read_is_empty(const struct flash_area *fa, uint32_t off,
+ void *dst, uint32_t len);
+/*< Given flash area ID, return info about sectors within the area. */
+int flash_area_get_sectors(int fa_id, uint32_t *count,
+ struct flash_sector *sectors);
+/*< Returns the `fa_id` for slot, where slot is 0 (primary) or 1 (secondary).
+ `image_index` (0 or 1) is the index of the image. Image index is
+ relevant only when multi-image support support is enabled */
+int flash_area_id_from_multi_image_slot(int image_index, int slot);
+/*< Returns the slot (0 for primary or 1 for secondary), for the supplied
+ `image_index` and `area_id`. `area_id` is unique and is represented by
+ `fa_id` in the `flash_area` struct. */
+int flash_area_id_to_multi_image_slot(int image_index, int area_id);
```
## Memory management for mbed TLS