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/dload_util.c b/platform/msm_shared/dload_util.c
index 7455a19..58f498a 100644
--- a/platform/msm_shared/dload_util.c
+++ b/platform/msm_shared/dload_util.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013, 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
@@ -38,7 +38,7 @@
#define EMERGENCY_DLOAD_COOKIE_2 0x77777777
void dload_util_write_cookie(uint32_t target_dload_mode_addr,
- enum dload_mode mode)
+ enum reboot_reason mode)
{
if (mode == NORMAL_DLOAD)
{
@@ -46,7 +46,7 @@
writel(NORMAL_DLOAD_COOKIE_1,
target_dload_mode_addr + sizeof(uint32_t));
}
- else
+ else if (mode == EMERGENCY_DLOAD)
{
writel(EMERGENCY_DLOAD_COOKIE_0, target_dload_mode_addr);
writel(EMERGENCY_DLOAD_COOKIE_1,