target : mdm9640 : Fix for eMMC Display

For eMMC targets, EBI2 function selection in TLMM needs to be enabled so that
GPIOs can be used for display.

Change-Id: Idbc65ab1cdd5b3481b5d2db10fae61b47e37b4a0
diff --git a/platform/mdm9640/include/platform/iomap.h b/platform/mdm9640/include/platform/iomap.h
index 3d63543..c5eab42 100644
--- a/platform/mdm9640/include/platform/iomap.h
+++ b/platform/mdm9640/include/platform/iomap.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-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
@@ -193,4 +193,7 @@
 /* QPIC DISPLAY */
 #define QPIC_BASE                   0x7980000
 #define APCS_ALIAS0_IPC_INTERRUPT   0xB011008
+/* eMMC Display */
+#define TLMM_EBI2_EMMC_GPIO_CFG     0x01111000
+#define EBI2_BOOT_SELECT            0x2
 #endif
diff --git a/target/mdm9640/init.c b/target/mdm9640/init.c
index 91c61ef..adaccfd 100644
--- a/target/mdm9640/init.c
+++ b/target/mdm9640/init.c
@@ -143,6 +143,9 @@
 			dprintf(CRITICAL, "Error reading the partition table info\n");
 			ASSERT(0);
 		}
+		/* Below setting is to enable EBI2 function selection in TLMM so
+		   that GPIOs can be used for display */
+		writel((readl(TLMM_EBI2_EMMC_GPIO_CFG) | EBI2_BOOT_SELECT), TLMM_EBI2_EMMC_GPIO_CFG);
 	} else {
 		config.pipes.read_pipe = DATA_PRODUCER_PIPE;
 		config.pipes.write_pipe = DATA_CONSUMER_PIPE;