From patchwork Sun Aug 14 16:41:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjarne Steinsbo X-Patchwork-Id: 1066052 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7EGfo3h027562 for ; Sun, 14 Aug 2011 16:41:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753934Ab1HNQlk (ORCPT ); Sun, 14 Aug 2011 12:41:40 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:50258 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753632Ab1HNQlj (ORCPT ); Sun, 14 Aug 2011 12:41:39 -0400 Received: by vws1 with SMTP id 1so3472124vws.19 for ; Sun, 14 Aug 2011 09:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=1Yzs4jppjlMin/mB1fu8TmJe9p0JKOFYPEjNN34jzCc=; b=q1I74Asvo3/RPWUm4Eq89gs4l9QiqTMSsmsI5xG+xIQd2FrGCmkhc6b23ZwC5FoYcr o5J5UuR+eSxQzIXW23pD8sDCRY6ghClzfTeOxSZyLwBFTiwCGzBmx0qIlDQ1RYoff/og yx88vzmK4mWqNeidIvmBQhdGaST+BA8g+dW18= MIME-Version: 1.0 Received: by 10.220.39.195 with SMTP id h3mr782792vce.202.1313340098714; Sun, 14 Aug 2011 09:41:38 -0700 (PDT) Received: by 10.220.203.138 with HTTP; Sun, 14 Aug 2011 09:41:38 -0700 (PDT) Date: Sun, 14 Aug 2011 18:41:38 +0200 Message-ID: Subject: [PATCH] ARM: mach-omap2: Kconfig: select SUSPEND and PM_SLEEP if PM for omap3 From: Bjarne Steinsbo To: linux-omap@vger.kernel.org Cc: Tony Lindgren Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 14 Aug 2011 16:41:50 +0000 (UTC) It's conceivable to configure a kernel with CONFIG_PM, but without CONFIG_PM_SLEEP. - If CONFIG_PM is defined, pm34xx.c calls cpu_suspend() in line 430. - cpu_suspend() is a static inline defined in asm/suspend.h, calling __cpu_suspend() to do the real job. - But __cpu_suspend (in kernel/sleep.S) is only linked in if CONFIG_PM_SLEEP is defined. The result is a link error: arch/arm/mach-omap2/built-in.o: In function `cpu_suspend': arch/arm/include/asm/suspend.h:17: undefined reference to `__cpu_suspend' There is a similar dependency error with a call to cpu_resume() in sleep34xx.S, line 534. Since the code obviously assumes that PM_SLEEP should be defined if PM, change the omap2 Kconfig to reflect this. The existing selection of PM_OPP if PM serves as a precedent for this solution. When selecting PM_SLEEP, also select SUSPEND, which PM_SLEEP depends on. Signed-off-by: Bjarne Steinsbo --- arch/arm/mach-omap2/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 57b66d5..04a3a83 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -36,6 +36,8 @@ config ARCH_OMAP3 select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4 select ARCH_HAS_OPP select PM_OPP if PM + select SUSPEND if PM + select PM_SLEEP if PM config ARCH_OMAP4 bool "TI OMAP4"