* [PATCH 0/4] LOW power sleep support for OMAP nand driver @ 2013-01-23 9:26 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:26 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, nsekhar, linux-kernel, gururaja.hebbar, linux-mtd, linux-omap, linux-arm-kernel This patch series adds low power transition support for OMAP NAND driver. This includes low power transition support of - GPMC module - ELM module - OMAP2 NAND driver Low power transition support tested on am335x-evm with NAND flash support. This patch series based on [1] and depends on [2] and is available [2] 1. ARM: OMAP2+: AM33XX: Add suspend-resume support http://comments.gmane.org/gmane.linux.ports.arm.omap/91405 2. https://github.com/avinashphilip/am335x_linux/commits/NAND_supend_resume_support Philip Avinash (4): arch: arm: gpmc: gpmc migration support mtd: devices: elm: Low power transition support arm: gpmc: Low power transition support mtd: nand: omap2: Low power transition support arch/arm/mach-omap2/gpmc.c | 22 ++++++++++++++++++++-- arch/arm/mach-omap2/pm34xx.c | 5 ----- drivers/mtd/devices/elm.c | 40 ++++++++++++++++++++++++++++++++++++++++ drivers/mtd/nand/omap2.c | 19 +++++++++++++++++++ 4 files changed, 79 insertions(+), 7 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 0/4] LOW power sleep support for OMAP nand driver @ 2013-01-23 9:26 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:26 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash This patch series adds low power transition support for OMAP NAND driver. This includes low power transition support of - GPMC module - ELM module - OMAP2 NAND driver Low power transition support tested on am335x-evm with NAND flash support. This patch series based on [1] and depends on [2] and is available [2] 1. ARM: OMAP2+: AM33XX: Add suspend-resume support http://comments.gmane.org/gmane.linux.ports.arm.omap/91405 2. https://github.com/avinashphilip/am335x_linux/commits/NAND_supend_resume_support Philip Avinash (4): arch: arm: gpmc: gpmc migration support mtd: devices: elm: Low power transition support arm: gpmc: Low power transition support mtd: nand: omap2: Low power transition support arch/arm/mach-omap2/gpmc.c | 22 ++++++++++++++++++++-- arch/arm/mach-omap2/pm34xx.c | 5 ----- drivers/mtd/devices/elm.c | 40 ++++++++++++++++++++++++++++++++++++++++ drivers/mtd/nand/omap2.c | 19 +++++++++++++++++++ 4 files changed, 79 insertions(+), 7 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 0/4] LOW power sleep support for OMAP nand driver @ 2013-01-23 9:26 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:26 UTC (permalink / raw) To: linux-arm-kernel This patch series adds low power transition support for OMAP NAND driver. This includes low power transition support of - GPMC module - ELM module - OMAP2 NAND driver Low power transition support tested on am335x-evm with NAND flash support. This patch series based on [1] and depends on [2] and is available [2] 1. ARM: OMAP2+: AM33XX: Add suspend-resume support http://comments.gmane.org/gmane.linux.ports.arm.omap/91405 2. https://github.com/avinashphilip/am335x_linux/commits/NAND_supend_resume_support Philip Avinash (4): arch: arm: gpmc: gpmc migration support mtd: devices: elm: Low power transition support arm: gpmc: Low power transition support mtd: nand: omap2: Low power transition support arch/arm/mach-omap2/gpmc.c | 22 ++++++++++++++++++++-- arch/arm/mach-omap2/pm34xx.c | 5 ----- drivers/mtd/devices/elm.c | 40 ++++++++++++++++++++++++++++++++++++++++ drivers/mtd/nand/omap2.c | 19 +++++++++++++++++++ 4 files changed, 79 insertions(+), 7 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 0/4] LOW power sleep support for OMAP nand driver @ 2013-01-23 9:26 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:26 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash This patch series adds low power transition support for OMAP NAND driver. This includes low power transition support of - GPMC module - ELM module - OMAP2 NAND driver Low power transition support tested on am335x-evm with NAND flash support. This patch series based on [1] and depends on [2] and is available [2] 1. ARM: OMAP2+: AM33XX: Add suspend-resume support http://comments.gmane.org/gmane.linux.ports.arm.omap/91405 2. https://github.com/avinashphilip/am335x_linux/commits/NAND_supend_resume_support Philip Avinash (4): arch: arm: gpmc: gpmc migration support mtd: devices: elm: Low power transition support arm: gpmc: Low power transition support mtd: nand: omap2: Low power transition support arch/arm/mach-omap2/gpmc.c | 22 ++++++++++++++++++++-- arch/arm/mach-omap2/pm34xx.c | 5 ----- drivers/mtd/devices/elm.c | 40 ++++++++++++++++++++++++++++++++++++++++ drivers/mtd/nand/omap2.c | 19 +++++++++++++++++++ 4 files changed, 79 insertions(+), 7 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/4] arch: arm: gpmc: gpmc migration support 2013-01-23 9:26 ` Philip Avinash (?) (?) @ 2013-01-23 9:26 ` Philip Avinash -1 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:26 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, nsekhar, linux-kernel, gururaja.hebbar, linux-mtd, linux-omap, linux-arm-kernel With recent GPMC driver conversion, usage of gpmc_save/restore_context can done from gpmc driver itself. Hence removes the usage from pm34xx.c. Also removes the conditional compilation primitives ARCH_OMAP3 for gpmc_save/restore_context. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/mach-omap2/gpmc.c | 2 -- arch/arm/mach-omap2/pm34xx.c | 5 ----- 2 files changed, 7 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index cbf4e0d..aed958a 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1426,7 +1426,6 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev) return IRQ_HANDLED; } -#ifdef CONFIG_ARCH_OMAP3 static struct omap3_gpmc_regs gpmc_context; void omap3_gpmc_save_context(void) @@ -1491,4 +1490,3 @@ void omap3_gpmc_restore_context(void) } } } -#endif /* CONFIG_ARCH_OMAP3 */ diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 60fbf0a..cab4c5d 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -43,7 +43,6 @@ #include "common.h" #include "cm3xxx.h" #include "cm-regbits-34xx.h" -#include "gpmc.h" #include "prm-regbits-34xx.h" #include "prm3xxx.h" #include "pm.h" @@ -84,8 +83,6 @@ static void omap3_core_save_context(void) /* Save the Interrupt controller context */ omap_intc_save_context(); - /* Save the GPMC context */ - omap3_gpmc_save_context(); /* Save the system control module context, padconf already save above*/ omap3_control_save_context(); omap_dma_global_context_save(); @@ -95,8 +92,6 @@ static void omap3_core_restore_context(void) { /* Restore the control module context, padconf restored by h/w */ omap3_control_restore_context(); - /* Restore the GPMC context */ - omap3_gpmc_restore_context(); /* Restore the interrupt controller context */ omap_intc_restore_context(); omap_dma_global_context_restore(); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/4] arch: arm: gpmc: gpmc migration support @ 2013-01-23 9:26 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:26 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash With recent GPMC driver conversion, usage of gpmc_save/restore_context can done from gpmc driver itself. Hence removes the usage from pm34xx.c. Also removes the conditional compilation primitives ARCH_OMAP3 for gpmc_save/restore_context. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/mach-omap2/gpmc.c | 2 -- arch/arm/mach-omap2/pm34xx.c | 5 ----- 2 files changed, 7 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index cbf4e0d..aed958a 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1426,7 +1426,6 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev) return IRQ_HANDLED; } -#ifdef CONFIG_ARCH_OMAP3 static struct omap3_gpmc_regs gpmc_context; void omap3_gpmc_save_context(void) @@ -1491,4 +1490,3 @@ void omap3_gpmc_restore_context(void) } } } -#endif /* CONFIG_ARCH_OMAP3 */ diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 60fbf0a..cab4c5d 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -43,7 +43,6 @@ #include "common.h" #include "cm3xxx.h" #include "cm-regbits-34xx.h" -#include "gpmc.h" #include "prm-regbits-34xx.h" #include "prm3xxx.h" #include "pm.h" @@ -84,8 +83,6 @@ static void omap3_core_save_context(void) /* Save the Interrupt controller context */ omap_intc_save_context(); - /* Save the GPMC context */ - omap3_gpmc_save_context(); /* Save the system control module context, padconf already save above*/ omap3_control_save_context(); omap_dma_global_context_save(); @@ -95,8 +92,6 @@ static void omap3_core_restore_context(void) { /* Restore the control module context, padconf restored by h/w */ omap3_control_restore_context(); - /* Restore the GPMC context */ - omap3_gpmc_restore_context(); /* Restore the interrupt controller context */ omap_intc_restore_context(); omap_dma_global_context_restore(); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/4] arch: arm: gpmc: gpmc migration support @ 2013-01-23 9:26 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:26 UTC (permalink / raw) To: linux-arm-kernel With recent GPMC driver conversion, usage of gpmc_save/restore_context can done from gpmc driver itself. Hence removes the usage from pm34xx.c. Also removes the conditional compilation primitives ARCH_OMAP3 for gpmc_save/restore_context. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/mach-omap2/gpmc.c | 2 -- arch/arm/mach-omap2/pm34xx.c | 5 ----- 2 files changed, 7 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index cbf4e0d..aed958a 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1426,7 +1426,6 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev) return IRQ_HANDLED; } -#ifdef CONFIG_ARCH_OMAP3 static struct omap3_gpmc_regs gpmc_context; void omap3_gpmc_save_context(void) @@ -1491,4 +1490,3 @@ void omap3_gpmc_restore_context(void) } } } -#endif /* CONFIG_ARCH_OMAP3 */ diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 60fbf0a..cab4c5d 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -43,7 +43,6 @@ #include "common.h" #include "cm3xxx.h" #include "cm-regbits-34xx.h" -#include "gpmc.h" #include "prm-regbits-34xx.h" #include "prm3xxx.h" #include "pm.h" @@ -84,8 +83,6 @@ static void omap3_core_save_context(void) /* Save the Interrupt controller context */ omap_intc_save_context(); - /* Save the GPMC context */ - omap3_gpmc_save_context(); /* Save the system control module context, padconf already save above*/ omap3_control_save_context(); omap_dma_global_context_save(); @@ -95,8 +92,6 @@ static void omap3_core_restore_context(void) { /* Restore the control module context, padconf restored by h/w */ omap3_control_restore_context(); - /* Restore the GPMC context */ - omap3_gpmc_restore_context(); /* Restore the interrupt controller context */ omap_intc_restore_context(); omap_dma_global_context_restore(); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/4] arch: arm: gpmc: gpmc migration support @ 2013-01-23 9:26 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:26 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash With recent GPMC driver conversion, usage of gpmc_save/restore_context can done from gpmc driver itself. Hence removes the usage from pm34xx.c. Also removes the conditional compilation primitives ARCH_OMAP3 for gpmc_save/restore_context. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/mach-omap2/gpmc.c | 2 -- arch/arm/mach-omap2/pm34xx.c | 5 ----- 2 files changed, 7 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index cbf4e0d..aed958a 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1426,7 +1426,6 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev) return IRQ_HANDLED; } -#ifdef CONFIG_ARCH_OMAP3 static struct omap3_gpmc_regs gpmc_context; void omap3_gpmc_save_context(void) @@ -1491,4 +1490,3 @@ void omap3_gpmc_restore_context(void) } } } -#endif /* CONFIG_ARCH_OMAP3 */ diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 60fbf0a..cab4c5d 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -43,7 +43,6 @@ #include "common.h" #include "cm3xxx.h" #include "cm-regbits-34xx.h" -#include "gpmc.h" #include "prm-regbits-34xx.h" #include "prm3xxx.h" #include "pm.h" @@ -84,8 +83,6 @@ static void omap3_core_save_context(void) /* Save the Interrupt controller context */ omap_intc_save_context(); - /* Save the GPMC context */ - omap3_gpmc_save_context(); /* Save the system control module context, padconf already save above*/ omap3_control_save_context(); omap_dma_global_context_save(); @@ -95,8 +92,6 @@ static void omap3_core_restore_context(void) { /* Restore the control module context, padconf restored by h/w */ omap3_control_restore_context(); - /* Restore the GPMC context */ - omap3_gpmc_restore_context(); /* Restore the interrupt controller context */ omap_intc_restore_context(); omap_dma_global_context_restore(); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 1/4] arch: arm: gpmc: gpmc migration support 2013-01-23 9:26 ` Philip Avinash (?) @ 2013-02-01 22:05 ` Tony Lindgren -1 siblings, 0 replies; 26+ messages in thread From: Tony Lindgren @ 2013-02-01 22:05 UTC (permalink / raw) To: Philip Avinash Cc: khilman, afzal, linux, nsekhar, linux-kernel, gururaja.hebbar, linux-mtd, linux-omap, dwmw2, linux-arm-kernel * Philip Avinash <avinashphilip@ti.com> [130123 01:28]: > With recent GPMC driver conversion, usage of gpmc_save/restore_context > can done from gpmc driver itself. Hence removes the usage from pm34xx.c. > Also removes the conditional compilation primitives ARCH_OMAP3 for > gpmc_save/restore_context. Hmm I think this will break GPMC for deeper idle modes. Note that we need to save and restore the context every time hitting off-idle, not just for suspend and resume. Or am I missing something here? Regards, Tony ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/4] arch: arm: gpmc: gpmc migration support @ 2013-02-01 22:05 ` Tony Lindgren 0 siblings, 0 replies; 26+ messages in thread From: Tony Lindgren @ 2013-02-01 22:05 UTC (permalink / raw) To: linux-arm-kernel * Philip Avinash <avinashphilip@ti.com> [130123 01:28]: > With recent GPMC driver conversion, usage of gpmc_save/restore_context > can done from gpmc driver itself. Hence removes the usage from pm34xx.c. > Also removes the conditional compilation primitives ARCH_OMAP3 for > gpmc_save/restore_context. Hmm I think this will break GPMC for deeper idle modes. Note that we need to save and restore the context every time hitting off-idle, not just for suspend and resume. Or am I missing something here? Regards, Tony ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/4] arch: arm: gpmc: gpmc migration support @ 2013-02-01 22:05 ` Tony Lindgren 0 siblings, 0 replies; 26+ messages in thread From: Tony Lindgren @ 2013-02-01 22:05 UTC (permalink / raw) To: Philip Avinash Cc: khilman, linux, dwmw2, afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar * Philip Avinash <avinashphilip@ti.com> [130123 01:28]: > With recent GPMC driver conversion, usage of gpmc_save/restore_context > can done from gpmc driver itself. Hence removes the usage from pm34xx.c. > Also removes the conditional compilation primitives ARCH_OMAP3 for > gpmc_save/restore_context. Hmm I think this will break GPMC for deeper idle modes. Note that we need to save and restore the context every time hitting off-idle, not just for suspend and resume. Or am I missing something here? Regards, Tony ^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [PATCH 1/4] arch: arm: gpmc: gpmc migration support 2013-02-01 22:05 ` Tony Lindgren (?) @ 2013-02-06 11:38 ` Philip, Avinash -1 siblings, 0 replies; 26+ messages in thread From: Philip, Avinash @ 2013-02-06 11:38 UTC (permalink / raw) To: Tony Lindgren Cc: Hilman, Kevin, Mohammed, Afzal, linux@arm.linux.org.uk, Nori, Sekhar, linux-kernel@vger.kernel.org, Hiremath, Vaibhav, Hebbar, Gururaja, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org On Sat, Feb 02, 2013 at 03:35:10, Tony Lindgren wrote: > * Philip Avinash <avinashphilip@ti.com> [130123 01:28]: > > With recent GPMC driver conversion, usage of gpmc_save/restore_context > > can done from gpmc driver itself. Hence removes the usage from pm34xx.c. > > Also removes the conditional compilation primitives ARCH_OMAP3 for > > gpmc_save/restore_context. > > Hmm I think this will break GPMC for deeper idle modes. Note that we > need to save and restore the context every time hitting off-idle, not > just for suspend and resume. Or am I missing something here? I understand dependency on idle modes. So I will send a second version with this patch eliminated so that user initiated suspend/resume work for am335x platforms. Thanks Avinash > > Regards, > > Tony > ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/4] arch: arm: gpmc: gpmc migration support @ 2013-02-06 11:38 ` Philip, Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip, Avinash @ 2013-02-06 11:38 UTC (permalink / raw) To: linux-arm-kernel On Sat, Feb 02, 2013 at 03:35:10, Tony Lindgren wrote: > * Philip Avinash <avinashphilip@ti.com> [130123 01:28]: > > With recent GPMC driver conversion, usage of gpmc_save/restore_context > > can done from gpmc driver itself. Hence removes the usage from pm34xx.c. > > Also removes the conditional compilation primitives ARCH_OMAP3 for > > gpmc_save/restore_context. > > Hmm I think this will break GPMC for deeper idle modes. Note that we > need to save and restore the context every time hitting off-idle, not > just for suspend and resume. Or am I missing something here? I understand dependency on idle modes. So I will send a second version with this patch eliminated so that user initiated suspend/resume work for am335x platforms. Thanks Avinash > > Regards, > > Tony > ^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [PATCH 1/4] arch: arm: gpmc: gpmc migration support @ 2013-02-06 11:38 ` Philip, Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip, Avinash @ 2013-02-06 11:38 UTC (permalink / raw) To: Tony Lindgren Cc: Hilman, Kevin, linux@arm.linux.org.uk, dwmw2@infradead.org, Mohammed, Afzal, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Nori, Sekhar, Hebbar, Gururaja, Hiremath, Vaibhav On Sat, Feb 02, 2013 at 03:35:10, Tony Lindgren wrote: > * Philip Avinash <avinashphilip@ti.com> [130123 01:28]: > > With recent GPMC driver conversion, usage of gpmc_save/restore_context > > can done from gpmc driver itself. Hence removes the usage from pm34xx.c. > > Also removes the conditional compilation primitives ARCH_OMAP3 for > > gpmc_save/restore_context. > > Hmm I think this will break GPMC for deeper idle modes. Note that we > need to save and restore the context every time hitting off-idle, not > just for suspend and resume. Or am I missing something here? I understand dependency on idle modes. So I will send a second version with this patch eliminated so that user initiated suspend/resume work for am335x platforms. Thanks Avinash > > Regards, > > Tony > ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 2/4] mtd: devices: elm: Low power transition support 2013-01-23 9:26 ` Philip Avinash (?) (?) @ 2013-01-23 9:45 ` Philip Avinash -1 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, nsekhar, linux-kernel, gururaja.hebbar, linux-mtd, linux-omap, linux-arm-kernel In low power modes of AM335X platforms, peripherals power is cut off. This patch supports low power sleep transition support for ELM driver. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- drivers/mtd/devices/elm.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c index f78f43f..4793cb0 100644 --- a/drivers/mtd/devices/elm.c +++ b/drivers/mtd/devices/elm.c @@ -20,6 +20,7 @@ #include <linux/interrupt.h> #include <linux/io.h> #include <linux/of.h> +#include <linux/sched.h> #include <linux/pm_runtime.h> #include <linux/platform_data/elm.h> @@ -62,6 +63,7 @@ struct elm_info { struct completion elm_completion; struct list_head list; enum bch_ecc bch_type; + bool idle; }; static LIST_HEAD(elm_devices); @@ -86,9 +88,11 @@ void elm_config(struct device *dev, enum bch_ecc bch_type) u32 reg_val; struct elm_info *info = dev_get_drvdata(dev); + info->idle = true; reg_val = (bch_type & ECC_BCH_LEVEL_MASK) | (ELM_ECC_SIZE << 16); elm_write_reg(info, ELM_LOCATION_CONFIG, reg_val); info->bch_type = bch_type; + info->idle = false; } EXPORT_SYMBOL(elm_config); @@ -280,6 +284,7 @@ void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, struct elm_info *info = dev_get_drvdata(dev); u32 reg_val; + info->idle = true; /* Enable page mode interrupt */ reg_val = elm_read_reg(info, ELM_IRQSTATUS); elm_write_reg(info, ELM_IRQSTATUS, reg_val & INTR_STATUS_PAGE_VALID); @@ -298,6 +303,7 @@ void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, reg_val = elm_read_reg(info, ELM_IRQENABLE); elm_write_reg(info, ELM_IRQENABLE, reg_val & ~INTR_EN_PAGE_MASK); elm_error_correction(info, err_vec); + info->idle = false; } EXPORT_SYMBOL(elm_decode_bch_error_page); @@ -368,6 +374,7 @@ static int elm_probe(struct platform_device *pdev) INIT_LIST_HEAD(&info->list); list_add(&info->list, &elm_devices); platform_set_drvdata(pdev, info); + info->idle = false; return ret; } @@ -379,6 +386,38 @@ static int elm_remove(struct platform_device *pdev) return 0; } +static int elm_suspend(struct device *dev) +{ + struct elm_info *info = dev_get_drvdata(dev); + wait_queue_head_t wq; + DECLARE_WAITQUEUE(wait, current); + + init_waitqueue_head(&wq); + while (1) { + /* Make sure that ELM not running */ + if (info->idle) { + add_wait_queue(&wq, &wait); + schedule(); + remove_wait_queue(&wq, &wait); + } else { + break; + } + } + pm_runtime_put_sync(dev); + return 0; +} + +static int elm_resume(struct device *dev) +{ + struct elm_info *info = dev_get_drvdata(dev); + + pm_runtime_get_sync(dev); + elm_config(dev, info->bch_type); + return 0; +} + +static SIMPLE_DEV_PM_OPS(elm_pm_ops, elm_suspend, elm_resume); + #ifdef CONFIG_OF static const struct of_device_id elm_of_match[] = { { .compatible = "ti,am33xx-elm" }, @@ -392,6 +431,7 @@ static struct platform_driver elm_driver = { .name = "elm", .owner = THIS_MODULE, .of_match_table = of_match_ptr(elm_of_match), + .pm = &elm_pm_ops, }, .probe = elm_probe, .remove = elm_remove, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/4] mtd: devices: elm: Low power transition support @ 2013-01-23 9:45 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash In low power modes of AM335X platforms, peripherals power is cut off. This patch supports low power sleep transition support for ELM driver. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- drivers/mtd/devices/elm.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c index f78f43f..4793cb0 100644 --- a/drivers/mtd/devices/elm.c +++ b/drivers/mtd/devices/elm.c @@ -20,6 +20,7 @@ #include <linux/interrupt.h> #include <linux/io.h> #include <linux/of.h> +#include <linux/sched.h> #include <linux/pm_runtime.h> #include <linux/platform_data/elm.h> @@ -62,6 +63,7 @@ struct elm_info { struct completion elm_completion; struct list_head list; enum bch_ecc bch_type; + bool idle; }; static LIST_HEAD(elm_devices); @@ -86,9 +88,11 @@ void elm_config(struct device *dev, enum bch_ecc bch_type) u32 reg_val; struct elm_info *info = dev_get_drvdata(dev); + info->idle = true; reg_val = (bch_type & ECC_BCH_LEVEL_MASK) | (ELM_ECC_SIZE << 16); elm_write_reg(info, ELM_LOCATION_CONFIG, reg_val); info->bch_type = bch_type; + info->idle = false; } EXPORT_SYMBOL(elm_config); @@ -280,6 +284,7 @@ void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, struct elm_info *info = dev_get_drvdata(dev); u32 reg_val; + info->idle = true; /* Enable page mode interrupt */ reg_val = elm_read_reg(info, ELM_IRQSTATUS); elm_write_reg(info, ELM_IRQSTATUS, reg_val & INTR_STATUS_PAGE_VALID); @@ -298,6 +303,7 @@ void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, reg_val = elm_read_reg(info, ELM_IRQENABLE); elm_write_reg(info, ELM_IRQENABLE, reg_val & ~INTR_EN_PAGE_MASK); elm_error_correction(info, err_vec); + info->idle = false; } EXPORT_SYMBOL(elm_decode_bch_error_page); @@ -368,6 +374,7 @@ static int elm_probe(struct platform_device *pdev) INIT_LIST_HEAD(&info->list); list_add(&info->list, &elm_devices); platform_set_drvdata(pdev, info); + info->idle = false; return ret; } @@ -379,6 +386,38 @@ static int elm_remove(struct platform_device *pdev) return 0; } +static int elm_suspend(struct device *dev) +{ + struct elm_info *info = dev_get_drvdata(dev); + wait_queue_head_t wq; + DECLARE_WAITQUEUE(wait, current); + + init_waitqueue_head(&wq); + while (1) { + /* Make sure that ELM not running */ + if (info->idle) { + add_wait_queue(&wq, &wait); + schedule(); + remove_wait_queue(&wq, &wait); + } else { + break; + } + } + pm_runtime_put_sync(dev); + return 0; +} + +static int elm_resume(struct device *dev) +{ + struct elm_info *info = dev_get_drvdata(dev); + + pm_runtime_get_sync(dev); + elm_config(dev, info->bch_type); + return 0; +} + +static SIMPLE_DEV_PM_OPS(elm_pm_ops, elm_suspend, elm_resume); + #ifdef CONFIG_OF static const struct of_device_id elm_of_match[] = { { .compatible = "ti,am33xx-elm" }, @@ -392,6 +431,7 @@ static struct platform_driver elm_driver = { .name = "elm", .owner = THIS_MODULE, .of_match_table = of_match_ptr(elm_of_match), + .pm = &elm_pm_ops, }, .probe = elm_probe, .remove = elm_remove, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/4] mtd: devices: elm: Low power transition support @ 2013-01-23 9:45 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: linux-arm-kernel In low power modes of AM335X platforms, peripherals power is cut off. This patch supports low power sleep transition support for ELM driver. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- drivers/mtd/devices/elm.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c index f78f43f..4793cb0 100644 --- a/drivers/mtd/devices/elm.c +++ b/drivers/mtd/devices/elm.c @@ -20,6 +20,7 @@ #include <linux/interrupt.h> #include <linux/io.h> #include <linux/of.h> +#include <linux/sched.h> #include <linux/pm_runtime.h> #include <linux/platform_data/elm.h> @@ -62,6 +63,7 @@ struct elm_info { struct completion elm_completion; struct list_head list; enum bch_ecc bch_type; + bool idle; }; static LIST_HEAD(elm_devices); @@ -86,9 +88,11 @@ void elm_config(struct device *dev, enum bch_ecc bch_type) u32 reg_val; struct elm_info *info = dev_get_drvdata(dev); + info->idle = true; reg_val = (bch_type & ECC_BCH_LEVEL_MASK) | (ELM_ECC_SIZE << 16); elm_write_reg(info, ELM_LOCATION_CONFIG, reg_val); info->bch_type = bch_type; + info->idle = false; } EXPORT_SYMBOL(elm_config); @@ -280,6 +284,7 @@ void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, struct elm_info *info = dev_get_drvdata(dev); u32 reg_val; + info->idle = true; /* Enable page mode interrupt */ reg_val = elm_read_reg(info, ELM_IRQSTATUS); elm_write_reg(info, ELM_IRQSTATUS, reg_val & INTR_STATUS_PAGE_VALID); @@ -298,6 +303,7 @@ void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, reg_val = elm_read_reg(info, ELM_IRQENABLE); elm_write_reg(info, ELM_IRQENABLE, reg_val & ~INTR_EN_PAGE_MASK); elm_error_correction(info, err_vec); + info->idle = false; } EXPORT_SYMBOL(elm_decode_bch_error_page); @@ -368,6 +374,7 @@ static int elm_probe(struct platform_device *pdev) INIT_LIST_HEAD(&info->list); list_add(&info->list, &elm_devices); platform_set_drvdata(pdev, info); + info->idle = false; return ret; } @@ -379,6 +386,38 @@ static int elm_remove(struct platform_device *pdev) return 0; } +static int elm_suspend(struct device *dev) +{ + struct elm_info *info = dev_get_drvdata(dev); + wait_queue_head_t wq; + DECLARE_WAITQUEUE(wait, current); + + init_waitqueue_head(&wq); + while (1) { + /* Make sure that ELM not running */ + if (info->idle) { + add_wait_queue(&wq, &wait); + schedule(); + remove_wait_queue(&wq, &wait); + } else { + break; + } + } + pm_runtime_put_sync(dev); + return 0; +} + +static int elm_resume(struct device *dev) +{ + struct elm_info *info = dev_get_drvdata(dev); + + pm_runtime_get_sync(dev); + elm_config(dev, info->bch_type); + return 0; +} + +static SIMPLE_DEV_PM_OPS(elm_pm_ops, elm_suspend, elm_resume); + #ifdef CONFIG_OF static const struct of_device_id elm_of_match[] = { { .compatible = "ti,am33xx-elm" }, @@ -392,6 +431,7 @@ static struct platform_driver elm_driver = { .name = "elm", .owner = THIS_MODULE, .of_match_table = of_match_ptr(elm_of_match), + .pm = &elm_pm_ops, }, .probe = elm_probe, .remove = elm_remove, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/4] mtd: devices: elm: Low power transition support @ 2013-01-23 9:45 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash In low power modes of AM335X platforms, peripherals power is cut off. This patch supports low power sleep transition support for ELM driver. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- drivers/mtd/devices/elm.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c index f78f43f..4793cb0 100644 --- a/drivers/mtd/devices/elm.c +++ b/drivers/mtd/devices/elm.c @@ -20,6 +20,7 @@ #include <linux/interrupt.h> #include <linux/io.h> #include <linux/of.h> +#include <linux/sched.h> #include <linux/pm_runtime.h> #include <linux/platform_data/elm.h> @@ -62,6 +63,7 @@ struct elm_info { struct completion elm_completion; struct list_head list; enum bch_ecc bch_type; + bool idle; }; static LIST_HEAD(elm_devices); @@ -86,9 +88,11 @@ void elm_config(struct device *dev, enum bch_ecc bch_type) u32 reg_val; struct elm_info *info = dev_get_drvdata(dev); + info->idle = true; reg_val = (bch_type & ECC_BCH_LEVEL_MASK) | (ELM_ECC_SIZE << 16); elm_write_reg(info, ELM_LOCATION_CONFIG, reg_val); info->bch_type = bch_type; + info->idle = false; } EXPORT_SYMBOL(elm_config); @@ -280,6 +284,7 @@ void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, struct elm_info *info = dev_get_drvdata(dev); u32 reg_val; + info->idle = true; /* Enable page mode interrupt */ reg_val = elm_read_reg(info, ELM_IRQSTATUS); elm_write_reg(info, ELM_IRQSTATUS, reg_val & INTR_STATUS_PAGE_VALID); @@ -298,6 +303,7 @@ void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc, reg_val = elm_read_reg(info, ELM_IRQENABLE); elm_write_reg(info, ELM_IRQENABLE, reg_val & ~INTR_EN_PAGE_MASK); elm_error_correction(info, err_vec); + info->idle = false; } EXPORT_SYMBOL(elm_decode_bch_error_page); @@ -368,6 +374,7 @@ static int elm_probe(struct platform_device *pdev) INIT_LIST_HEAD(&info->list); list_add(&info->list, &elm_devices); platform_set_drvdata(pdev, info); + info->idle = false; return ret; } @@ -379,6 +386,38 @@ static int elm_remove(struct platform_device *pdev) return 0; } +static int elm_suspend(struct device *dev) +{ + struct elm_info *info = dev_get_drvdata(dev); + wait_queue_head_t wq; + DECLARE_WAITQUEUE(wait, current); + + init_waitqueue_head(&wq); + while (1) { + /* Make sure that ELM not running */ + if (info->idle) { + add_wait_queue(&wq, &wait); + schedule(); + remove_wait_queue(&wq, &wait); + } else { + break; + } + } + pm_runtime_put_sync(dev); + return 0; +} + +static int elm_resume(struct device *dev) +{ + struct elm_info *info = dev_get_drvdata(dev); + + pm_runtime_get_sync(dev); + elm_config(dev, info->bch_type); + return 0; +} + +static SIMPLE_DEV_PM_OPS(elm_pm_ops, elm_suspend, elm_resume); + #ifdef CONFIG_OF static const struct of_device_id elm_of_match[] = { { .compatible = "ti,am33xx-elm" }, @@ -392,6 +431,7 @@ static struct platform_driver elm_driver = { .name = "elm", .owner = THIS_MODULE, .of_match_table = of_match_ptr(elm_of_match), + .pm = &elm_pm_ops, }, .probe = elm_probe, .remove = elm_remove, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/4] arm: gpmc: Low power transition support 2013-01-23 9:26 ` Philip Avinash (?) (?) @ 2013-01-23 9:45 ` Philip Avinash -1 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, nsekhar, linux-kernel, gururaja.hebbar, linux-mtd, linux-omap, linux-arm-kernel With GPMC converted to platform driver recently, adds low power transition support in driver itself. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/mach-omap2/gpmc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index aed958a..af10617 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1357,9 +1357,29 @@ static __devexit int gpmc_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int gpmc_suspend(struct platform_device *pdev, pm_message_t state) +{ + omap3_gpmc_save_context(); + clk_disable_unprepare(gpmc_l3_clk); + return 0; +} + +static int gpmc_resume(struct platform_device *pdev) +{ + clk_prepare_enable(gpmc_l3_clk); + omap3_gpmc_restore_context(); + return 0; +} +#endif + static struct platform_driver gpmc_driver = { .probe = gpmc_probe, .remove = __devexit_p(gpmc_remove), +#ifdef CONFIG_PM + .suspend = gpmc_suspend, + .resume = gpmc_resume, +#endif .driver = { .name = DEVICE_NAME, .owner = THIS_MODULE, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/4] arm: gpmc: Low power transition support @ 2013-01-23 9:45 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash With GPMC converted to platform driver recently, adds low power transition support in driver itself. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/mach-omap2/gpmc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index aed958a..af10617 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1357,9 +1357,29 @@ static __devexit int gpmc_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int gpmc_suspend(struct platform_device *pdev, pm_message_t state) +{ + omap3_gpmc_save_context(); + clk_disable_unprepare(gpmc_l3_clk); + return 0; +} + +static int gpmc_resume(struct platform_device *pdev) +{ + clk_prepare_enable(gpmc_l3_clk); + omap3_gpmc_restore_context(); + return 0; +} +#endif + static struct platform_driver gpmc_driver = { .probe = gpmc_probe, .remove = __devexit_p(gpmc_remove), +#ifdef CONFIG_PM + .suspend = gpmc_suspend, + .resume = gpmc_resume, +#endif .driver = { .name = DEVICE_NAME, .owner = THIS_MODULE, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/4] arm: gpmc: Low power transition support @ 2013-01-23 9:45 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: linux-arm-kernel With GPMC converted to platform driver recently, adds low power transition support in driver itself. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/mach-omap2/gpmc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index aed958a..af10617 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1357,9 +1357,29 @@ static __devexit int gpmc_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int gpmc_suspend(struct platform_device *pdev, pm_message_t state) +{ + omap3_gpmc_save_context(); + clk_disable_unprepare(gpmc_l3_clk); + return 0; +} + +static int gpmc_resume(struct platform_device *pdev) +{ + clk_prepare_enable(gpmc_l3_clk); + omap3_gpmc_restore_context(); + return 0; +} +#endif + static struct platform_driver gpmc_driver = { .probe = gpmc_probe, .remove = __devexit_p(gpmc_remove), +#ifdef CONFIG_PM + .suspend = gpmc_suspend, + .resume = gpmc_resume, +#endif .driver = { .name = DEVICE_NAME, .owner = THIS_MODULE, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/4] arm: gpmc: Low power transition support @ 2013-01-23 9:45 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash With GPMC converted to platform driver recently, adds low power transition support in driver itself. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/mach-omap2/gpmc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index aed958a..af10617 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1357,9 +1357,29 @@ static __devexit int gpmc_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int gpmc_suspend(struct platform_device *pdev, pm_message_t state) +{ + omap3_gpmc_save_context(); + clk_disable_unprepare(gpmc_l3_clk); + return 0; +} + +static int gpmc_resume(struct platform_device *pdev) +{ + clk_prepare_enable(gpmc_l3_clk); + omap3_gpmc_restore_context(); + return 0; +} +#endif + static struct platform_driver gpmc_driver = { .probe = gpmc_probe, .remove = __devexit_p(gpmc_remove), +#ifdef CONFIG_PM + .suspend = gpmc_suspend, + .resume = gpmc_resume, +#endif .driver = { .name = DEVICE_NAME, .owner = THIS_MODULE, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 4/4] mtd: nand: omap2: Low power transition support 2013-01-23 9:26 ` Philip Avinash (?) (?) @ 2013-01-23 9:45 ` Philip Avinash -1 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, nsekhar, linux-kernel, gururaja.hebbar, linux-mtd, linux-omap, linux-arm-kernel Add support for Low power transition support in nand driver. Also ensures the current transaction finishes before going to low power mode with _suspend support in mtd layer. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- drivers/mtd/nand/omap2.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 8e820dd..790215b 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -2103,9 +2103,28 @@ static int omap_nand_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int omap_nand_suspend(struct platform_device *pdev, pm_message_t state) +{ + struct mtd_info *mtd = platform_get_drvdata(pdev); + + mtd->_suspend(mtd); + return 0; +} + +static int omap_nand_resume(struct platform_device *pdev) +{ + return 0; +} +#endif + static struct platform_driver omap_nand_driver = { .probe = omap_nand_probe, .remove = omap_nand_remove, +#ifdef CONFIG_PM + .suspend = omap_nand_suspend, + .resume = omap_nand_resume, +#endif .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 4/4] mtd: nand: omap2: Low power transition support @ 2013-01-23 9:45 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash Add support for Low power transition support in nand driver. Also ensures the current transaction finishes before going to low power mode with _suspend support in mtd layer. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- drivers/mtd/nand/omap2.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 8e820dd..790215b 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -2103,9 +2103,28 @@ static int omap_nand_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int omap_nand_suspend(struct platform_device *pdev, pm_message_t state) +{ + struct mtd_info *mtd = platform_get_drvdata(pdev); + + mtd->_suspend(mtd); + return 0; +} + +static int omap_nand_resume(struct platform_device *pdev) +{ + return 0; +} +#endif + static struct platform_driver omap_nand_driver = { .probe = omap_nand_probe, .remove = omap_nand_remove, +#ifdef CONFIG_PM + .suspend = omap_nand_suspend, + .resume = omap_nand_resume, +#endif .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 4/4] mtd: nand: omap2: Low power transition support @ 2013-01-23 9:45 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: linux-arm-kernel Add support for Low power transition support in nand driver. Also ensures the current transaction finishes before going to low power mode with _suspend support in mtd layer. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- drivers/mtd/nand/omap2.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 8e820dd..790215b 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -2103,9 +2103,28 @@ static int omap_nand_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int omap_nand_suspend(struct platform_device *pdev, pm_message_t state) +{ + struct mtd_info *mtd = platform_get_drvdata(pdev); + + mtd->_suspend(mtd); + return 0; +} + +static int omap_nand_resume(struct platform_device *pdev) +{ + return 0; +} +#endif + static struct platform_driver omap_nand_driver = { .probe = omap_nand_probe, .remove = omap_nand_remove, +#ifdef CONFIG_PM + .suspend = omap_nand_suspend, + .resume = omap_nand_resume, +#endif .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 4/4] mtd: nand: omap2: Low power transition support @ 2013-01-23 9:45 ` Philip Avinash 0 siblings, 0 replies; 26+ messages in thread From: Philip Avinash @ 2013-01-23 9:45 UTC (permalink / raw) To: khilman, tony, linux, dwmw2 Cc: afzal, linux-omap, linux-arm-kernel, linux-kernel, linux-mtd, nsekhar, gururaja.hebbar, Philip Avinash Add support for Low power transition support in nand driver. Also ensures the current transaction finishes before going to low power mode with _suspend support in mtd layer. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- drivers/mtd/nand/omap2.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 8e820dd..790215b 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -2103,9 +2103,28 @@ static int omap_nand_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int omap_nand_suspend(struct platform_device *pdev, pm_message_t state) +{ + struct mtd_info *mtd = platform_get_drvdata(pdev); + + mtd->_suspend(mtd); + return 0; +} + +static int omap_nand_resume(struct platform_device *pdev) +{ + return 0; +} +#endif + static struct platform_driver omap_nand_driver = { .probe = omap_nand_probe, .remove = omap_nand_remove, +#ifdef CONFIG_PM + .suspend = omap_nand_suspend, + .resume = omap_nand_resume, +#endif .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 26+ messages in thread
end of thread, other threads:[~2013-02-06 11:40 UTC | newest] Thread overview: 26+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-23 9:26 [PATCH 0/4] LOW power sleep support for OMAP nand driver Philip Avinash 2013-01-23 9:26 ` Philip Avinash 2013-01-23 9:26 ` Philip Avinash 2013-01-23 9:26 ` Philip Avinash 2013-01-23 9:26 ` [PATCH 1/4] arch: arm: gpmc: gpmc migration support Philip Avinash 2013-01-23 9:26 ` Philip Avinash 2013-01-23 9:26 ` Philip Avinash 2013-01-23 9:26 ` Philip Avinash 2013-02-01 22:05 ` Tony Lindgren 2013-02-01 22:05 ` Tony Lindgren 2013-02-01 22:05 ` Tony Lindgren 2013-02-06 11:38 ` Philip, Avinash 2013-02-06 11:38 ` Philip, Avinash 2013-02-06 11:38 ` Philip, Avinash 2013-01-23 9:45 ` [PATCH 2/4] mtd: devices: elm: Low power transition support Philip Avinash 2013-01-23 9:45 ` Philip Avinash 2013-01-23 9:45 ` Philip Avinash 2013-01-23 9:45 ` Philip Avinash 2013-01-23 9:45 ` [PATCH 3/4] arm: gpmc: " Philip Avinash 2013-01-23 9:45 ` Philip Avinash 2013-01-23 9:45 ` Philip Avinash 2013-01-23 9:45 ` Philip Avinash 2013-01-23 9:45 ` [PATCH 4/4] mtd: nand: omap2: " Philip Avinash 2013-01-23 9:45 ` Philip Avinash 2013-01-23 9:45 ` Philip Avinash 2013-01-23 9:45 ` Philip Avinash
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.