aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2013-03-19 14:14:36 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2013-03-19 14:14:36 -0700
commit0ac339d7a1215572496b330e1a70e4d8b505267a (patch)
treefc3b638dfacc5fa3f40477c0f7596be2c589f1c6
parent333db8c479d639fa6667ba385624b758b985d8ae (diff)
parent07f157106c8ad7e9f676bfee4303e6d146344492 (diff)
downloadlk-0ac339d7a1215572496b330e1a70e4d8b505267a.tar.gz
Merge "target: msm8974: Add support to configure reset based on the pmic version."
-rw-r--r--target/msm8974/init.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/target/msm8974/init.c b/target/msm8974/init.c
index cde6b56f..f2bdc68d 100644
--- a/target/msm8974/init.c
+++ b/target/msm8974/init.c
@@ -49,6 +49,7 @@
extern bool target_use_signed_kernel(void);
static unsigned int target_id;
+static uint32_t pmic_ver;
#define PMIC_ARB_CHANNEL_NUM 0
#define PMIC_ARB_OWNER_ID 0
@@ -108,7 +109,7 @@ static int target_volume_up()
uint32_t target_volume_down()
{
/* Volume down button is tied in with RESIN on MSM8974. */
- if (pm8x41_get_pmic_rev() == PMIC_VERSION_V2)
+ if (pmic_ver == PMIC_VERSION_V2)
return pm8x41_resin_bark_workaround_status();
else
return pm8x41_resin_status();
@@ -162,6 +163,9 @@ void target_init(void)
spmi_init(PMIC_ARB_CHANNEL_NUM, PMIC_ARB_OWNER_ID);
+ /* Save PM8941 version info. */
+ pmic_ver = pm8x41_get_pmic_rev();
+
target_keystatus();
if (target_use_signed_kernel())
@@ -317,7 +321,10 @@ void reboot_device(unsigned reboot_reason)
writel(reboot_reason, RESTART_REASON_ADDR);
/* Configure PMIC for warm reset */
- pm8x41_reset_configure(PON_PSHOLD_WARM_RESET);
+ if (pmic_ver == PMIC_VERSION_V2)
+ pm8x41_v2_reset_configure(PON_PSHOLD_WARM_RESET);
+ else
+ pm8x41_reset_configure(PON_PSHOLD_WARM_RESET);
/* Disable Watchdog Debug.
* Required becuase of a H/W bug which causes the system to