zephyr: arm: Update reading the flash image reset vector

This change uses the flash functions to read the applications
reset vector. This allow flexibility on which flash device the
application is programmed.
For e.g: MCUBoot can be programmed and running from Internal
Flash while Zephyr can be loaded from a different Flash device.
This change is made for ARM platform, it can be extended to
non-ARM platforms as well.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
diff --git a/boot/zephyr/flash_map_extended.c b/boot/zephyr/flash_map_extended.c
index d0744af..4631da7 100644
--- a/boot/zephyr/flash_map_extended.c
+++ b/boot/zephyr/flash_map_extended.c
@@ -141,8 +141,12 @@
 
 uint8_t flash_area_get_device_id(const struct flash_area *fa)
 {
-	(void)fa;
-	return FLASH_DEVICE_ID;
+#if defined(CONFIG_ARM)
+    return fa->fa_id;
+#else
+    (void)fa;
+    return FLASH_DEVICE_ID;
+#endif
 }
 
 #define ERASED_VAL 0xff