From patchwork Mon Dec 26 13:31:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Miao X-Patchwork-Id: 5975 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9444423E03 for ; Mon, 26 Dec 2011 13:32:12 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 79C4BA18450 for ; Mon, 26 Dec 2011 13:32:12 +0000 (UTC) Received: by eaac11 with SMTP id c11so9045909eaa.11 for ; Mon, 26 Dec 2011 05:32:12 -0800 (PST) Received: by 10.204.156.219 with SMTP id y27mr5538557bkw.71.1324906332121; Mon, 26 Dec 2011 05:32:12 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs149050bkc; Mon, 26 Dec 2011 05:32:11 -0800 (PST) Received: by 10.52.67.76 with SMTP id l12mr9699782vdt.84.1324906329833; Mon, 26 Dec 2011 05:32:09 -0800 (PST) Received: from mail-vx0-f178.google.com (mail-vx0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id dp8si10535410vdc.17.2011.12.26.05.32.09 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Dec 2011 05:32:09 -0800 (PST) Received-SPF: pass (google.com: domain of eric.y.miao@gmail.com designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of eric.y.miao@gmail.com designates 209.85.220.178 as permitted sender) smtp.mail=eric.y.miao@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by vcbfo11 with SMTP id fo11so10990149vcb.37 for ; Mon, 26 Dec 2011 05:32:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=RPDI2EMR0W01fX38U3P2YR5FCzJfWGszlHA8qgMC3DY=; b=jSTqkSwP1MfiyAIis1GxCqZfP/4pfFJTUXkfwa4qVnJxk9fCEvKQZZ/2u3xz7/4b5o ZdIxp80/P6vMj5rlTJSMSTFjidG6zKZZp+s7oOp2MDUFOhtFzDykmbUhuP5NnMw5f0cw WfeIKnRXetK0rO1Z6qR1+JZ/PDYbrV9mXjEq0= Received: by 10.220.155.147 with SMTP id s19mr14500486vcw.14.1324906329224; Mon, 26 Dec 2011 05:32:09 -0800 (PST) MIME-Version: 1.0 Sender: eric.y.miao@gmail.com Received: by 10.52.110.99 with HTTP; Mon, 26 Dec 2011 05:31:48 -0800 (PST) In-Reply-To: <1324478303-3899-1-git-send-email-eric.miao@linaro.org> References: <1324478303-3899-1-git-send-email-eric.miao@linaro.org> From: Eric Miao Date: Mon, 26 Dec 2011 21:31:48 +0800 X-Google-Sender-Auth: CWHf5vLJGPYqpb6tmlvoxfyhjqk Message-ID: Subject: Fwd: [PATCH] ARM: imx6q: build pm code only when CONFIG_PM selected To: patches@linaro.org ---------- Forwarded message ---------- From: Eric Miao Date: Wed, Dec 21, 2011 at 10:38 PM Subject: [PATCH] ARM: imx6q: build pm code only when CONFIG_PM selected To: linux-arm-kernel Cc: Eric Miao , Shawn Guo Cc: Shawn Guo Signed-off-by: Eric Miao ---  arch/arm/mach-imx/Kconfig               |    1 +  arch/arm/mach-imx/Makefile              |    6 +++++-  arch/arm/mach-imx/head-v7.S             |    2 ++  arch/arm/plat-mxc/include/mach/common.h |    8 +++++++-  4 files changed, 15 insertions(+), 2 deletions(-) -- 1.7.5.4 diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c44aa97..6ee6803 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -602,6 +602,7 @@ config SOC_IMX6Q        select HAVE_IMX_GPC        select HAVE_IMX_MMDC        select HAVE_IMX_SRC +       select ARM_CPU_SUSPEND if PM        select USE_OF        help diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index aba7321..7a739bb 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile @@ -70,4 +70,8 @@ AFLAGS_head-v7.o :=-Wa,-march=armv7-a  obj-$(CONFIG_SMP) += platsmp.o  obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o  obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o -obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o pm-imx6q.o +obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o + +ifeq ($(CONFIG_PM),y) +obj-$(CONFIG_SOC_IMX6Q) += pm-imx6q.o +endif diff --git a/arch/arm/mach-imx/head-v7.S b/arch/arm/mach-imx/head-v7.S index 6229efb..a59cae7 100644 --- a/arch/arm/mach-imx/head-v7.S +++ b/arch/arm/mach-imx/head-v7.S @@ -71,6 +71,7 @@ ENTRY(v7_secondary_startup)  ENDPROC(v7_secondary_startup)  #endif +#ifdef CONFIG_PM  /*  * The following code is located into the .data section.  This is to  * allow phys_l2x0_saved_regs to be accessed with a relative load @@ -97,3 +98,4 @@ ENDPROC(v7_cpu_resume)        .globl  phys_l2x0_saved_regs  phys_l2x0_saved_regs:         .long   0 +#endif diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index c75f254..f4ebdb8 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h @@ -131,6 +131,12 @@ extern void imx53_evk_common_init(void);  extern void imx53_qsb_common_init(void);  extern void imx53_smd_common_init(void);  extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); -extern void imx6q_pm_init(void);  extern void imx6q_clock_map_io(void); + +#ifdef CONFIG_PM +extern void imx6q_pm_init(void); +#else +static inline void imx6q_pm_init(void) {} +#endif +  #endif