target: rename splash screen display configuration functions

Display initialization and shutdown functions for specific MSM targets
are defined in the corresponding target folders.  However, these
functions share the same name as the generic display_init and
display_shutdown function defined as the platform level api.
Rename these to target_display_init and target_display_shutdown to
be in line with the other target specific APIs.

Change-Id: I63797952182315f1006e22ec47e08a25a786daa4
diff --git a/include/target.h b/include/target.h
index df1bf3f..c2783fc 100644
--- a/include/target.h
+++ b/include/target.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2008 Travis Geiselbrecht
  *
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, 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
@@ -52,6 +52,9 @@
 uint32_t target_boot_device_emmc();
 
 bool target_display_panel_node(char *pbuf, uint16_t buf_size);
+void target_display_init(void);
+void target_display_shutdown(void);
+
 uint32_t target_get_boot_device();
 
 const char * target_usb_controller();
diff --git a/target/apq8084/init.c b/target/apq8084/init.c
index 4a8c577..6b61f98 100644
--- a/target/apq8084/init.c
+++ b/target/apq8084/init.c
@@ -178,6 +178,8 @@
 		mmc_put_card_to_sleep(dev);
 		sdhci_mode_disable(&dev->host);
 	}
+
+	target_display_shutdown();
 }
 
 /* Do target specific usb initialization */
@@ -334,7 +336,7 @@
 	/* Display splash screen if enabled */
 #if DISPLAY_SPLASH_SCREEN
 	dprintf(INFO, "Display Init: Start\n");
-	display_init();
+	target_display_init();
 	dprintf(INFO, "Display Init: Done\n");
 #endif
 }
diff --git a/target/apq8084/target_display.c b/target/apq8084/target_display.c
old mode 100644
new mode 100755
index 3321073..ec1b523
--- a/target/apq8084/target_display.c
+++ b/target/apq8084/target_display.c
@@ -241,7 +241,7 @@
 	return NO_ERROR;
 }
 
-void display_init(void)
+void target_display_init(void)
 {
 	uint32_t ret = 0;
 	ret = gcdb_display_init(MDP_REV_50, MIPI_FB_ADDR);
@@ -250,7 +250,7 @@
 	}
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	gcdb_display_shutdown();
 }
diff --git a/target/init.c b/target/init.c
index c5a202c..939a9bb 100644
--- a/target/init.c
+++ b/target/init.c
@@ -146,6 +146,14 @@
 	return false;
 }
 
+__WEAK void target_display_init(void)
+{
+}
+
+__WEAK void target_display_shutdown(void)
+{
+}
+
 __WEAK uint32_t target_boot_device_emmc()
 {
 	return 1;
diff --git a/target/msm7627a/init.c b/target/msm7627a/init.c
index 502cb54..d44e6a5 100644
--- a/target/msm7627a/init.c
+++ b/target/msm7627a/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2014, 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
@@ -169,6 +169,11 @@
 
 int target_is_emmc_boot(void);
 
+void target_uninit(void)
+{
+	target_display_shutdown();
+}
+
 void target_init(void)
 {
 	unsigned offset;
@@ -188,7 +193,7 @@
 
 	/* Display splash screen if enabled */
 #if DISPLAY_SPLASH_SCREEN
-	display_init();
+	target_display_init();
 	dprintf(SPEW, "Diplay initialized\n");
 #endif
 
diff --git a/target/msm7627a/target_display.c b/target/msm7627a/target_display.c
old mode 100644
new mode 100755
index 0c4d073..2fcb04c
--- a/target/msm7627a/target_display.c
+++ b/target/msm7627a/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012, 2014, 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
@@ -69,7 +69,7 @@
 	}
 	return ret;
 }
-void display_init(void)
+void target_display_init(void)
 {
 	unsigned mach_type;
 	mach_type = board_machtype();
@@ -155,7 +155,7 @@
 	display_enabled = 1;
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	dprintf(SPEW, "display_shutdown()\n");
 	if (display_enabled)
diff --git a/target/msm8226/init.c b/target/msm8226/init.c
index aab5d8e..6a4593a 100644
--- a/target/msm8226/init.c
+++ b/target/msm8226/init.c
@@ -258,7 +258,7 @@
 	/* Display splash screen if enabled */
 #if DISPLAY_SPLASH_SCREEN
 	dprintf(SPEW, "Display Init: Start\n");
-	display_init();
+	target_display_init();
 	dprintf(SPEW, "Display Init: Done\n");
 #endif
 
@@ -429,6 +429,8 @@
 
 	if (crypto_initialized())
 		crypto_eng_cleanup();
+
+	target_display_shutdown();
 }
 
 void target_usb_init(void)
diff --git a/target/msm8226/target_display.c b/target/msm8226/target_display.c
index c89c1ac..772f8d1 100755
--- a/target/msm8226/target_display.c
+++ b/target/msm8226/target_display.c
@@ -341,7 +341,7 @@
 	return ret;
 }
 
-void display_init(void)
+void target_display_init(void)
 {
         uint32_t panel_loop = 0;
         uint32_t ret = 0;
@@ -359,7 +359,7 @@
 
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	gcdb_display_shutdown();
 }
diff --git a/target/msm8610/init.c b/target/msm8610/init.c
index 78412fb..fe45ba4 100644
--- a/target/msm8610/init.c
+++ b/target/msm8610/init.c
@@ -176,7 +176,7 @@
 
 	/* Display splash screen if enabled */
 	dprintf(SPEW, "Display Init: Start\n");
-	display_init();
+	target_display_init();
 	dprintf(SPEW, "Display Init: Done\n");
 
 	if (target_use_signed_kernel())
@@ -189,6 +189,8 @@
 
 	if (crypto_initialized())
 		crypto_eng_cleanup();
+
+	target_display_shutdown();
 }
 
 #define SSD_CE_INSTANCE         1
diff --git a/target/msm8610/target_display.c b/target/msm8610/target_display.c
old mode 100644
new mode 100755
index 8a74e42..5e121ff
--- a/target/msm8610/target_display.c
+++ b/target/msm8610/target_display.c
@@ -162,7 +162,7 @@
 	return 0;
 }
 
-void display_init(void)
+void target_display_init(void)
 {
 	uint32_t panel_loop = 0;
 	uint32_t ret = 0;
@@ -180,7 +180,7 @@
 
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	gcdb_display_shutdown();
 }
diff --git a/target/msm8960/init.c b/target/msm8960/init.c
index 72d9463..f0514c7 100755
--- a/target/msm8960/init.c
+++ b/target/msm8960/init.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2009, Google Inc.
  * All rights reserved.
- * Copyright (c) 2009-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009-2014, 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
@@ -90,6 +90,11 @@
 	dprintf(CRITICAL, "Shutdown failed.\n");
 }
 
+void target_uninit(void)
+{
+	target_display_shutdown();
+}
+
 void target_init(void)
 {
 	unsigned base_addr;
@@ -144,7 +149,7 @@
 
 	/* Display splash screen if enabled */
 #if DISPLAY_SPLASH_SCREEN
-	display_init();
+	target_display_init();
 	dprintf(SPEW, "Diplay initialized\n");
 #endif
 
diff --git a/target/msm8960/target_display.c b/target/msm8960/target_display.c
old mode 100644
new mode 100755
index 39a3aeb..7ec91d2
--- a/target/msm8960/target_display.c
+++ b/target/msm8960/target_display.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2014, 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
@@ -255,7 +255,7 @@
 	return 0;
 }
 
-void display_init(void)
+void target_display_init(void)
 {
 	int target_id = board_target_id();
 
@@ -345,7 +345,7 @@
 	display_enable = 1;
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	if (display_enable) {
 		msm_display_off();
diff --git a/target/msm8974/init.c b/target/msm8974/init.c
index d60d477..55cec2a 100644
--- a/target/msm8974/init.c
+++ b/target/msm8974/init.c
@@ -328,7 +328,7 @@
 	/* Display splash screen if enabled */
 #if DISPLAY_SPLASH_SCREEN
 	dprintf(INFO, "Display Init: Start\n");
-	display_init();
+	target_display_init();
 	dprintf(INFO, "Display Init: Done\n");
 #endif
 
@@ -683,6 +683,8 @@
 
 	/* Disable HC mode before jumping to kernel */
 	sdhci_mode_disable(&dev->host);
+
+	target_display_shutdown();
 }
 
 void shutdown_device()
diff --git a/target/msm8974/target_display.c b/target/msm8974/target_display.c
old mode 100644
new mode 100755
index c32cef0..e939f34
--- a/target/msm8974/target_display.c
+++ b/target/msm8974/target_display.c
@@ -330,7 +330,7 @@
 	return 0;
 }
 
-void display_init(void)
+void target_display_init(void)
 {
 	uint32_t hw_id = board_hardware_id();
 	uint32_t panel_loop = 0;
@@ -366,7 +366,7 @@
 	}
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	uint32_t hw_id = board_hardware_id();
 	switch (hw_id) {