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 45f1605..2d9fb93 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
@@ -51,5 +51,6 @@
 struct mmc_device *target_mmc_device();
 
 bool target_display_panel_node(char *pbuf, uint16_t buf_size);
-
+void target_display_init(void);
+void target_display_shutdown(void);
 #endif
diff --git a/target/apq8084/target_display.c b/target/apq8084/target_display.c
old mode 100644
new mode 100755
index 517ea1b..240ebe9
--- a/target/apq8084/target_display.c
+++ b/target/apq8084/target_display.c
@@ -242,7 +242,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);
@@ -251,7 +251,7 @@
 	}
 }
 
-void display_shutdown(void)
+void target_display_shutdown(void)
 {
 	gcdb_display_shutdown();
 }
diff --git a/target/init.c b/target/init.c
index 7875a4f..026017f 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 uint8_t target_panel_auto_detect_enabled()
 {
 	return 0;
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 bd83019..3c2bc74 100644
--- a/target/msm8226/init.c
+++ b/target/msm8226/init.c
@@ -250,7 +250,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
 
@@ -391,6 +391,8 @@
 
 	if (target_is_ssd_enabled())
 		clock_ce_disable(SSD_CE_INSTANCE);
+
+	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 bf6cb45..79a2c9f 100644
--- a/target/msm8610/init.c
+++ b/target/msm8610/init.c
@@ -166,13 +166,14 @@
 
 	/* Display splash screen if enabled */
 	dprintf(SPEW, "Display Init: Start\n");
-	display_init();
+	target_display_init();
 	dprintf(SPEW, "Display Init: Done\n");
 }
 
 void target_uninit(void)
 {
         mmc_put_card_to_sleep(dev);
+	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 fde805a..4b2a833
--- a/target/msm8610/target_display.c
+++ b/target/msm8610/target_display.c
@@ -162,12 +162,12 @@
 	return 0;
 }
 
-void display_init(void)
+void target_display_init(void)
 {
 	gcdb_display_init(MDP_REV_304, MIPI_FB_ADDR);
 }
 
-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 2e6c151..df3e8fb 100644
--- a/target/msm8974/init.c
+++ b/target/msm8974/init.c
@@ -356,7 +356,7 @@
 	dprintf(INFO, "Display Init: Start\n");
 	if (board_hardware_subtype() != HW_PLATFORM_SUBTYPE_CDP_INTERPOSER)
 	{
-		display_init();
+		target_display_init();
 	}
 	dprintf(INFO, "Display Init: Done\n");
 #endif
@@ -698,6 +698,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) {