Platform: Move BL2 trailer base values to platform

This change moves the definition of BOOT_STATUS_MAX_ENTRIES and
BOOT_MAX_IMG_SECTORS from BL2 to the platform specific file
flash_layout.h.

Change-Id: I0e028c3e514a9661850fc9f41b6104089903e207
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/bl2/ext/mcuboot/bootutil/src/bootutil_priv.h b/bl2/ext/mcuboot/bootutil/src/bootutil_priv.h
index 9c3d258..a8969e3 100644
--- a/bl2/ext/mcuboot/bootutil/src/bootutil_priv.h
+++ b/bl2/ext/mcuboot/bootutil/src/bootutil_priv.h
@@ -22,6 +22,7 @@
 
 #include "flash_map/flash_map.h"
 #include "bootutil/image.h"
+#include "flash_layout.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -84,7 +85,6 @@
 };
 
 #define BOOT_STATUS_STATE_COUNT 3
-#define BOOT_STATUS_MAX_ENTRIES 256
 
 #define BOOT_STATUS_SOURCE_NONE    0
 #define BOOT_STATUS_SOURCE_SCRATCH 1
@@ -101,9 +101,6 @@
 /** Number of image slots in flash; currently limited to two. */
 #define BOOT_NUM_SLOTS              2
 
-/** Maximum number of image sectors supported by the bootloader. */
-#define BOOT_MAX_IMG_SECTORS        256
-
 /**
  * Compatibility shim for flash sector type.
  *
diff --git a/bl2/ext/mcuboot/include/target.h b/bl2/ext/mcuboot/include/target.h
index 47d5a84..28e6cac 100644
--- a/bl2/ext/mcuboot/include/target.h
+++ b/bl2/ext/mcuboot/include/target.h
@@ -49,4 +49,12 @@
 #error "BL2 supports CMSIS flash interface and device name must be specified"
 #endif
 
+#ifndef BOOT_STATUS_MAX_ENTRIES
+#error "BOOT_STATUS_MAX_ENTRIES must be defined by the target"
+#endif
+
+#ifndef BOOT_MAX_IMG_SECTORS
+#error "BOOT_MAX_IMG_SECTORS must be defined by the target"
+#endif
+
 #endif