msm: restart: respect download_mode boot parameter
The download_mode flag works correctly when set as a runtime parameter,
but not when set from boot. It would work during "normal" restarts, such
as during panic, but not during watchdog bites.
Change-Id: I2e3140e7f97b2bc7e38e8021097a5640fde77486
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
diff --git a/arch/arm/mach-msm/restart.c b/arch/arm/mach-msm/restart.c
index 06e3d37..5382102 100644
--- a/arch/arm/mach-msm/restart.c
+++ b/arch/arm/mach-msm/restart.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -241,7 +241,7 @@
dload_mode_addr = MSM_IMEM_BASE + DLOAD_MODE_ADDR;
/* Reset detection is switched on below.*/
- set_dload_mode(1);
+ set_dload_mode(download_mode);
#endif
msm_tmr0_base = msm_timer_get_timer0_base();
restart_reason = MSM_IMEM_BASE + RESTART_REASON_ADDR;