target: Compile UFS and MMC init calls only when they are supported in configuration

Previously initialization calls for both UFS and MMC code compile by default. Add
support to enable disable the initialization of drivers only when defined in the
configuration files for the target.

Change-Id: Icb84546cf97a7030ef4111266502839e73125ad5
diff --git a/target/apq8084/init.c b/target/apq8084/init.c
index 6aa3b33..543951e 100755
--- a/target/apq8084/init.c
+++ b/target/apq8084/init.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -285,13 +285,17 @@
 
 	platform_read_boot_config();
 
+#ifdef MMC_SDHCI_SUPPORT
 	if (platform_boot_dev_isemmc())
 		target_sdc_init();
-	else
+#endif
+#ifdef UFS_SUPPORT
+	if(!platform_boot_dev_isemmc())
 	{
 		ufs_device.base = UFS_BASE;
 		ufs_init(&ufs_device);
 	}
+#endif
 
 	/* Storage initialization is complete, read the partition table info */
 	if (partition_read_table())
diff --git a/target/msm8994/init.c b/target/msm8994/init.c
index 8c9cdaf..4e2e160 100644
--- a/target/msm8994/init.c
+++ b/target/msm8994/init.c
@@ -322,16 +322,19 @@
 
 	platform_read_boot_config();
 
+#ifdef MMC_SDHCI_SUPPORT
 	if (platform_boot_dev_isemmc())
 	{
 		target_sdc_init();
 	}
-	else
+#endif
+#ifdef UFS_SUPPORT
+	if(!platform_boot_dev_isemmc())
 	{
 		ufs_device.base = UFS_BASE;
 		ufs_init(&ufs_device);
 	}
-
+#endif
 	/* Storage initialization is complete, read the partition table info */
 	mmc_read_partition_table(0);
 
diff --git a/target/thulium/init.c b/target/thulium/init.c
index 88ac212..23cd585 100644
--- a/target/thulium/init.c
+++ b/target/thulium/init.c
@@ -222,15 +222,19 @@
 
 	platform_read_boot_config();
 
+#ifdef MMC_SDHCI_SUPPORT
 	if (platform_boot_dev_isemmc())
 	{
 		target_sdc_init();
 	}
-	else
+#endif
+#ifdef UFS_SUPPORT
+	if (!platform_boot_dev_isemmc())
 	{
 		ufs_device.base = UFS_BASE;
 		ufs_init(&ufs_device);
 	}
+#endif
 
 	/* Storage initialization is complete, read the partition table info */
 	mmc_read_partition_table(0);