From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 2/2] ARM: imx: Add suspend codes for imx7D
Date: Mon, 27 Jul 2015 21:28:02 +0800 [thread overview]
Message-ID: <20150727132802.GK12927@tiger> (raw)
In-Reply-To: <1437584859-64203-3-git-send-email-shenwei.wang@freescale.com>
On Wed, Jul 22, 2015 at 12:07:39PM -0500, Shenwei Wang wrote:
> IMX7D contains a new version of GPC IP block (GPCv2). It has two
> major functions: power management and wakeup source management.
>
> GPCv2 provides low power mode control for Cortex-A7 and Cortex-M4
> domains. And it can support WAIT, STOP, and DSM(Deep Sleep Mode) modes.
> After configuring the GPCv2 module, the platform can enter into a
> selected mode either automatically triggered by ARM WFI instruction or
> manually by software. The system will exit the low power states
> by the predefined wakeup sources which are managed by the gpcv2
> irqchip driver.
>
> This patch adds a new suspend driver to manage the power states on IMX7D.
> It currently supports "SUSPEND_STANDBY" and "SUSPEND_MEM" states.
>
> Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com>
> Signed-off-by: Anson Huang <b20788@freescale.com>
> ---
> arch/arm/mach-imx/Kconfig | 1 +
> arch/arm/mach-imx/Makefile | 2 +
> arch/arm/mach-imx/pm-imx7.c | 765 +++++++++++++++++++++++++++++++++++++++
> arch/arm/mach-imx/suspend-imx7.S | 529 +++++++++++++++++++++++++++
> 4 files changed, 1297 insertions(+)
> create mode 100644 arch/arm/mach-imx/pm-imx7.c
> create mode 100644 arch/arm/mach-imx/suspend-imx7.S
>
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index 5ccc9ea..4269c1e 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -552,6 +552,7 @@ config SOC_IMX7D
> bool "i.MX7 Dual support"
> select PINCTRL_IMX7D
> select ARM_GIC
> + select IMX_GPCV2
Yes, the existing list is already a bit out of order, but please do not
make it worse. Add it after HAVE_IMX_MMDC to keep them sort
alphabetically.
> select HAVE_IMX_ANATOP
> select HAVE_IMX_MMDC
> help
> diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
> index 37c502a..b2ad476 100644
> --- a/arch/arm/mach-imx/Makefile
> +++ b/arch/arm/mach-imx/Makefile
> @@ -87,6 +87,8 @@ obj-$(CONFIG_SOC_IMX7D) += mach-imx7d.o
>
> ifeq ($(CONFIG_SUSPEND),y)
> AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
> +AFLAGS_suspend-imx7.o :=-Wa,-march=armv7-a
> +obj-$(CONFIG_IMX_GPCV2) += suspend-imx7.o pm-imx7.o
Shouldn't it be controlled by CONFIG_SOC_IMX7D instead?
> obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
> obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o
> endif
> diff --git a/arch/arm/mach-imx/pm-imx7.c b/arch/arm/mach-imx/pm-imx7.c
> new file mode 100644
> index 0000000..50b9af4
> --- /dev/null
> +++ b/arch/arm/mach-imx/pm-imx7.c
> @@ -0,0 +1,765 @@
> +
Drop this new line.
> +/*
> + * Copyright (C) 2015 Freescale Semiconductor, Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include <linux/of_address.h>
> +#include <linux/of_irq.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
> +#include <linux/slab.h>
> +
Ditto
> +#include <linux/suspend.h>
> +#include <asm/suspend.h>
> +#include <asm/fncpy.h>
> +
> +#include <soc/imx/gpcv2.h>
> +
> +extern struct imx_gpcv2_irq *gpcv2_irq_instance;
Will this give a checkpatch warning?
> +static struct imx_gpcv2 *gpcv2_instance;
I stop right here, as I need to understand why we need to have header
soc/imx/gpcv2.h shared between irqchip driver and pm code.
Shawn
WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo@kernel.org>
To: Shenwei Wang <shenwei.wang@freescale.com>
Cc: shawn.guo@linaro.org, tglx@linutronix.de, jason@lakedaemon.net,
b20788@freescale.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 2/2] ARM: imx: Add suspend codes for imx7D
Date: Mon, 27 Jul 2015 21:28:02 +0800 [thread overview]
Message-ID: <20150727132802.GK12927@tiger> (raw)
In-Reply-To: <1437584859-64203-3-git-send-email-shenwei.wang@freescale.com>
On Wed, Jul 22, 2015 at 12:07:39PM -0500, Shenwei Wang wrote:
> IMX7D contains a new version of GPC IP block (GPCv2). It has two
> major functions: power management and wakeup source management.
>
> GPCv2 provides low power mode control for Cortex-A7 and Cortex-M4
> domains. And it can support WAIT, STOP, and DSM(Deep Sleep Mode) modes.
> After configuring the GPCv2 module, the platform can enter into a
> selected mode either automatically triggered by ARM WFI instruction or
> manually by software. The system will exit the low power states
> by the predefined wakeup sources which are managed by the gpcv2
> irqchip driver.
>
> This patch adds a new suspend driver to manage the power states on IMX7D.
> It currently supports "SUSPEND_STANDBY" and "SUSPEND_MEM" states.
>
> Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com>
> Signed-off-by: Anson Huang <b20788@freescale.com>
> ---
> arch/arm/mach-imx/Kconfig | 1 +
> arch/arm/mach-imx/Makefile | 2 +
> arch/arm/mach-imx/pm-imx7.c | 765 +++++++++++++++++++++++++++++++++++++++
> arch/arm/mach-imx/suspend-imx7.S | 529 +++++++++++++++++++++++++++
> 4 files changed, 1297 insertions(+)
> create mode 100644 arch/arm/mach-imx/pm-imx7.c
> create mode 100644 arch/arm/mach-imx/suspend-imx7.S
>
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index 5ccc9ea..4269c1e 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -552,6 +552,7 @@ config SOC_IMX7D
> bool "i.MX7 Dual support"
> select PINCTRL_IMX7D
> select ARM_GIC
> + select IMX_GPCV2
Yes, the existing list is already a bit out of order, but please do not
make it worse. Add it after HAVE_IMX_MMDC to keep them sort
alphabetically.
> select HAVE_IMX_ANATOP
> select HAVE_IMX_MMDC
> help
> diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
> index 37c502a..b2ad476 100644
> --- a/arch/arm/mach-imx/Makefile
> +++ b/arch/arm/mach-imx/Makefile
> @@ -87,6 +87,8 @@ obj-$(CONFIG_SOC_IMX7D) += mach-imx7d.o
>
> ifeq ($(CONFIG_SUSPEND),y)
> AFLAGS_suspend-imx6.o :=-Wa,-march=armv7-a
> +AFLAGS_suspend-imx7.o :=-Wa,-march=armv7-a
> +obj-$(CONFIG_IMX_GPCV2) += suspend-imx7.o pm-imx7.o
Shouldn't it be controlled by CONFIG_SOC_IMX7D instead?
> obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
> obj-$(CONFIG_SOC_IMX53) += suspend-imx53.o
> endif
> diff --git a/arch/arm/mach-imx/pm-imx7.c b/arch/arm/mach-imx/pm-imx7.c
> new file mode 100644
> index 0000000..50b9af4
> --- /dev/null
> +++ b/arch/arm/mach-imx/pm-imx7.c
> @@ -0,0 +1,765 @@
> +
Drop this new line.
> +/*
> + * Copyright (C) 2015 Freescale Semiconductor, Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include <linux/of_address.h>
> +#include <linux/of_irq.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
> +#include <linux/slab.h>
> +
Ditto
> +#include <linux/suspend.h>
> +#include <asm/suspend.h>
> +#include <asm/fncpy.h>
> +
> +#include <soc/imx/gpcv2.h>
> +
> +extern struct imx_gpcv2_irq *gpcv2_irq_instance;
Will this give a checkpatch warning?
> +static struct imx_gpcv2 *gpcv2_instance;
I stop right here, as I need to understand why we need to have header
soc/imx/gpcv2.h shared between irqchip driver and pm code.
Shawn
next prev parent reply other threads:[~2015-07-27 13:28 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 17:07 [PATCH v6 0/2] IMX GPCv2 drivers for wakeup source and suspend Shenwei Wang
2015-07-22 17:07 ` Shenwei Wang
2015-07-22 17:07 ` [PATCH v6 1/2] irqchip: imx-gpcv2: IMX GPCv2 driver for wakeup sources Shenwei Wang
2015-07-22 17:07 ` Shenwei Wang
2015-07-26 11:48 ` Thomas Gleixner
2015-07-26 11:48 ` Thomas Gleixner
2015-07-27 13:58 ` Shenwei Wang
2015-07-27 13:58 ` Shenwei Wang
2015-07-27 13:40 ` Shawn Guo
2015-07-27 13:40 ` Shawn Guo
2015-07-27 14:13 ` Shenwei Wang
2015-07-27 14:13 ` Shenwei Wang
2015-07-27 14:35 ` Shawn Guo
2015-07-27 14:35 ` Shawn Guo
2015-07-27 14:50 ` Shenwei Wang
2015-07-27 14:50 ` Shenwei Wang
2015-07-28 0:47 ` Shawn Guo
2015-07-28 0:47 ` Shawn Guo
2015-07-28 14:24 ` Shenwei Wang
2015-07-28 14:24 ` Shenwei Wang
2015-07-22 17:07 ` [PATCH v6 2/2] ARM: imx: Add suspend codes for imx7D Shenwei Wang
2015-07-22 17:07 ` Shenwei Wang
2015-07-27 13:28 ` Shawn Guo [this message]
2015-07-27 13:28 ` Shawn Guo
2015-07-27 18:24 ` Shenwei Wang
2015-07-27 18:24 ` Shenwei Wang
2015-07-28 1:02 ` Shawn Guo
2015-07-28 1:02 ` Shawn Guo
2015-07-28 14:16 ` Shenwei Wang
2015-07-28 14:16 ` Shenwei Wang
2015-07-28 14:30 ` Shawn Guo
2015-07-28 14:30 ` Shawn Guo
2015-07-28 15:14 ` Shenwei Wang
2015-07-28 15:14 ` Shenwei Wang
2015-07-28 16:39 ` Zhi Li
2015-07-28 16:39 ` Zhi Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150727132802.GK12927@tiger \
--to=shawnguo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.