msm8974: Implement fastboot reboot functionality

Use PMIC to reset the device using PS_HOLD warm reset

Change-Id: I860eef7a8510c898bba3c44c3f88f9226d6fb382
diff --git a/target/copper/init.c b/target/copper/init.c
index ec5e29e..b5922c3 100644
--- a/target/copper/init.c
+++ b/target/copper/init.c
@@ -177,3 +177,19 @@
 
 	return restart_reason;
 }
+
+void reboot_device(unsigned reboot_reason)
+{
+	/* Write the reboot reason */
+	writel(reboot_reason, RESTART_REASON_ADDR);
+
+	/* Configure PMIC for warm reset */
+	pm8x41_reset_configure(PON_PSHOLD_WARM_RESET);
+
+	/* Drop PS_HOLD for MSM */
+	writel(0x00, MPM2_MPM_PS_HOLD);
+
+	mdelay(5000);
+
+	dprintf(CRITICAL, "Rebooting failed\n");
+}