platform: msm_shared: integrate dload & normal reboot reason in a function

Integrate dload & normal reboot reason in a function, so that it could
avoid the normal reboot reason macro collision with dload mode.

Change-Id: Icc7c9d465e6c993d71e84bd793c5650bf51a4d28
diff --git a/platform/msm_shared/reboot.h b/platform/msm_shared/reboot.h
index 4773255..58085df 100644
--- a/platform/msm_shared/reboot.h
+++ b/platform/msm_shared/reboot.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2016, 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
@@ -28,21 +28,30 @@
  */
 #ifndef __REBOOT_H__
 #define __REBOOT_H__
+
+enum reboot_reason {
 #if USE_PON_REBOOT_REG
-#define RECOVERY_MODE     0x01
-#define FASTBOOT_MODE     0x02
-#define ALARM_BOOT        0x03
-#define DM_VERITY_LOGGING   0x04
-#define DM_VERITY_ENFORCING 0x05
-#define DM_VERITY_KEYSCLEAR 0x06
+	/* hard reset reason */
+	REBOOT_MODE_UNKNOWN	= 0x00,
+	RECOVERY_MODE		= 0x01,
+	FASTBOOT_MODE		= 0x02,
+	ALARM_BOOT		= 0x03,
+	DM_VERITY_LOGGING	= 0x04,
+	DM_VERITY_ENFORCING	= 0x05,
+	DM_VERITY_KEYSCLEAR	= 0x06,
 #else
-#define FASTBOOT_MODE     0x77665500
-#define RECOVERY_MODE     0x77665502
-#define ALARM_BOOT        0x77665503
-#define DM_VERITY_LOGGING    0x77665508
-#define DM_VERITY_ENFORCING  0x77665509
-#define DM_VERITY_KEYSCLEAR  0x7766550A
+	REBOOT_MODE_UNKNOWN	= 0x00,
+	RECOVERY_MODE		= 0x77665502,
+	FASTBOOT_MODE		= 0x77665500,
+	ALARM_BOOT		= 0x77665503,
+	DM_VERITY_LOGGING	= 0x77665508,
+	DM_VERITY_ENFORCING	= 0x77665509,
+	DM_VERITY_KEYSCLEAR	= 0x7766550A,
 #endif
+	/* warm reset start from  0xF0000000 */
+	NORMAL_DLOAD		= 0xF0000001,
+	EMERGENCY_DLOAD,
+};
 
 #define RTC_TRG           4
 #define PON_SOFT_RB_SPARE 0x88F