target: Add functions to verify dynamic partition enablement

Change to add functions, to check if dynamic partitions support
is enabled for build.

Change-Id: I4141b67e83fc072fa5f6eb7a03901b0998b6061b
Signed-off-by: Mayank Grover <groverm@codeaurora.org>
diff --git a/include/target.h b/include/target.h
index 0a0e545..d4b2416 100644
--- a/include/target.h
+++ b/include/target.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008 Travis Geiselbrecht
  *
- * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017,2019 The Linux Foundation. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files
@@ -104,6 +104,7 @@
 void pmic_reset_configure(uint8_t reset_type);
 bool is_display_disabled(void);
 bool target_uses_system_as_root(void);
+bool target_dynamic_partition_supported(void);
 struct qmp_reg *target_get_qmp_settings();
 int target_get_qmp_regsize();
 uint32_t target_ddr_cfg_reg();
diff --git a/target/init.c b/target/init.c
index c907da3..ce7e0b8 100644
--- a/target/init.c
+++ b/target/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008 Travis Geiselbrecht
  *
- * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files
@@ -278,6 +278,16 @@
 		return false;
 }
 
+/* Check dynamic partition support is enabled for target */
+bool target_dynamic_partition_supported(void)
+{
+#if DYNAMIC_PARTITION_SUPPORT
+	return true;
+#else
+	return false;
+#endif
+}
+
 /* Default CFG register value */
 uint32_t target_ddr_cfg_reg()
 {