From 10d1c647f8e94d298ce00cc7fcbcc8c02e2c3780 Mon Sep 17 00:00:00 2001 From: Wayne Zou Date: Thu, 2 Jun 2011 13:11:10 +0800 Subject: ENGR00144428 mx51BBG: fix segment fault when suspend for no da9053 mx51BBG: fix segment fault when suspend for no da9053 present Signed-off-by: Wayne Zou --- arch/arm/mach-mx5/pm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-mx5/pm.c b/arch/arm/mach-mx5/pm.c index cd6a1243aced..13bd979c3af8 100644 --- a/arch/arm/mach-mx5/pm.c +++ b/arch/arm/mach-mx5/pm.c @@ -117,9 +117,9 @@ static int mx5_suspend_enter(suspend_state_t state) flush_cache_all(); if (cpu_is_mx51() || cpu_is_mx53()) { - if ((machine_is_mx53_smd() || - machine_is_mx53_loco()) && - (!board_is_mx53_loco_mc34708())) { + if (machine_is_mx53_smd() || + (machine_is_mx53_loco() && + (!board_is_mx53_loco_mc34708()))) { if (board_is_rev(BOARD_REV_4) || machine_is_mx53_loco()) { mx53_smd_loco_irq_wake_fixup(); @@ -138,9 +138,11 @@ static int mx5_suspend_enter(suspend_state_t state) } /* Run the suspend code from iRAM. */ suspend_in_iram(suspend_param1); - - if (da9053_get_chip_version()) - da9053_restore_volt_settings(); + if (machine_is_mx53_smd() || + (machine_is_mx53_loco() && + (!board_is_mx53_loco_mc34708()))) + if (da9053_get_chip_version()) + da9053_restore_volt_settings(); /*clear the EMPGC0/1 bits */ __raw_writel(0, MXC_SRPG_EMPGC0_SRPGCR); __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR); -- cgit v1.2.3