* [PATCH 0/1] OMAP3: DMA: Enable idlemodes for DMA OCP
@ 2008-12-01 8:55 Kalle Jokiniemi
2008-12-01 8:55 ` [PATCH 1/1] " Kalle Jokiniemi
0 siblings, 1 reply; 6+ messages in thread
From: Kalle Jokiniemi @ 2008-12-01 8:55 UTC (permalink / raw)
To: linux-omap; +Cc: khilman, tony
Enabling smart idle modes in DMA4_OCP_SYSCONFIG enables sDMA to enter
standby if only synchronized dma transfers are programmed and no transfer
is active. This is needed to enable CORE power domain inactivity during
audio playback.
Compile tested with omap_3430sdp_defconfig on l-o master. Compile+boot+audio
playback (aplay) tested on custom omap3 HW.
IMO, this could go to linux-omap directly, but PM-branch is ok as well.
Kalle Jokiniemi (1):
OMAP3: DMA: Enable idlemodes for DMA OCP
arch/arm/plat-omap/dma.c | 13 +++++++++++++
arch/arm/plat-omap/include/mach/dma.h | 15 +++++++++++++++
2 files changed, 28 insertions(+)
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/1] OMAP3: DMA: Enable idlemodes for DMA OCP 2008-12-01 8:55 [PATCH 0/1] OMAP3: DMA: Enable idlemodes for DMA OCP Kalle Jokiniemi @ 2008-12-01 8:55 ` Kalle Jokiniemi 2008-12-01 9:06 ` Högander Jouni 0 siblings, 1 reply; 6+ messages in thread From: Kalle Jokiniemi @ 2008-12-01 8:55 UTC (permalink / raw) To: linux-omap; +Cc: khilman, tony, Kalle Jokiniemi This patch enables MStandby smart-idle mode, autoidle smartidle mode, and the autoidle bit for DMA4_OCP_SYSCONFIG. Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> --- arch/arm/plat-omap/dma.c | 13 +++++++++++++ arch/arm/plat-omap/include/mach/dma.h | 15 +++++++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index c4e5ba3..9d8d28c 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -2420,6 +2420,19 @@ static int __init omap_init_dma(void) if (cpu_class_is_omap2()) setup_irq(INT_24XX_SDMA_IRQ0, &omap24xx_dma_irq); + /* Enable smartidle idlemodes and autoidle */ + if (cpu_is_omap34xx()) { + u32 v = dma_read(OCP_SYSCONFIG); + v &= ~(DMA_SYSCONFIG_MIDLEMODE_MASK | + DMA_SYSCONFIG_SIDLEMODE_MASK | + DMA_SYSCONFIG_AUTOIDLE); + v |= (DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | + DMA_SYSCONFIG_SIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | + DMA_SYSCONFIG_AUTOIDLE); + dma_write(v , OCP_SYSCONFIG); + } + + /* FIXME: Update LCD DMA to work on 24xx */ if (cpu_class_is_omap1()) { r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, diff --git a/arch/arm/plat-omap/include/mach/dma.h b/arch/arm/plat-omap/include/mach/dma.h index 54fe966..224b077 100644 --- a/arch/arm/plat-omap/include/mach/dma.h +++ b/arch/arm/plat-omap/include/mach/dma.h @@ -387,6 +387,21 @@ #define DMA_THREAD_FIFO_25 (0x02 << 14) #define DMA_THREAD_FIFO_50 (0x03 << 14) +/* DMA4_OCP_SYSCONFIG bits */ +#define DMA_SYSCONFIG_MIDLEMODE_MASK (3 << 12) +#define DMA_SYSCONFIG_CLOCKACTIVITY_MASK (3 << 8) +#define DMA_SYSCONFIG_EMUFREE (1 << 5) +#define DMA_SYSCONFIG_SIDLEMODE_MASK (3 << 3) +#define DMA_SYSCONFIG_SOFTRESET (1 << 2) +#define DMA_SYSCONFIG_AUTOIDLE (1 << 0) + +#define DMA_SYSCONFIG_MIDLEMODE(n) ((n) << 12) +#define DMA_SYSCONFIG_SIDLEMODE(n) ((n) << 3) + +#define DMA_IDLEMODE_SMARTIDLE 0x2 +#define DMA_IDLEMODE_NO_IDLE 0x1 +#define DMA_IDLEMODE_FORCE_IDLE 0x0 + /* Chaining modes*/ #ifndef CONFIG_ARCH_OMAP1 #define OMAP_DMA_STATIC_CHAIN 0x1 -- 1.5.4.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] OMAP3: DMA: Enable idlemodes for DMA OCP 2008-12-01 8:55 ` [PATCH 1/1] " Kalle Jokiniemi @ 2008-12-01 9:06 ` Högander Jouni 2008-12-01 10:50 ` Kalle Jokiniemi 0 siblings, 1 reply; 6+ messages in thread From: Högander Jouni @ 2008-12-01 9:06 UTC (permalink / raw) To: ext Kalle Jokiniemi; +Cc: linux-omap, khilman, tony "ext Kalle Jokiniemi" <ext-kalle.jokiniemi@nokia.com> writes: > This patch enables MStandby smart-idle mode, autoidle smartidle mode, > and the autoidle bit for DMA4_OCP_SYSCONFIG. > > Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> > --- > arch/arm/plat-omap/dma.c | 13 +++++++++++++ > arch/arm/plat-omap/include/mach/dma.h | 15 +++++++++++++++ > 2 files changed, 28 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c > index c4e5ba3..9d8d28c 100644 > --- a/arch/arm/plat-omap/dma.c > +++ b/arch/arm/plat-omap/dma.c > @@ -2420,6 +2420,19 @@ static int __init omap_init_dma(void) > if (cpu_class_is_omap2()) > setup_irq(INT_24XX_SDMA_IRQ0, &omap24xx_dma_irq); > > + /* Enable smartidle idlemodes and autoidle */ > + if (cpu_is_omap34xx()) { I think this can be done for omap2 also. > + u32 v = dma_read(OCP_SYSCONFIG); > + v &= ~(DMA_SYSCONFIG_MIDLEMODE_MASK | > + DMA_SYSCONFIG_SIDLEMODE_MASK | > + DMA_SYSCONFIG_AUTOIDLE); > + v |= (DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | > + DMA_SYSCONFIG_SIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | > + DMA_SYSCONFIG_AUTOIDLE); > + dma_write(v , OCP_SYSCONFIG); > + } > + > + > /* FIXME: Update LCD DMA to work on 24xx */ > if (cpu_class_is_omap1()) { > r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, > diff --git a/arch/arm/plat-omap/include/mach/dma.h > b/arch/arm/plat-omap/include/mach/dma.h -- Jouni Högander -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] OMAP3: DMA: Enable idlemodes for DMA OCP 2008-12-01 9:06 ` Högander Jouni @ 2008-12-01 10:50 ` Kalle Jokiniemi 2008-12-01 17:03 ` Kalle Jokiniemi 0 siblings, 1 reply; 6+ messages in thread From: Kalle Jokiniemi @ 2008-12-01 10:50 UTC (permalink / raw) To: Högander Jouni; +Cc: linux-omap, khilman, tony On ma, 2008-12-01 at 11:06 +0200, Högander Jouni wrote: > "ext Kalle Jokiniemi" <ext-kalle.jokiniemi@nokia.com> writes: > > > This patch enables MStandby smart-idle mode, autoidle smartidle mode, > > and the autoidle bit for DMA4_OCP_SYSCONFIG. > > > > Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> > > --- > > arch/arm/plat-omap/dma.c | 13 +++++++++++++ > > arch/arm/plat-omap/include/mach/dma.h | 15 +++++++++++++++ > > 2 files changed, 28 insertions(+), 0 deletions(-) > > > > diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c > > index c4e5ba3..9d8d28c 100644 > > --- a/arch/arm/plat-omap/dma.c > > +++ b/arch/arm/plat-omap/dma.c > > @@ -2420,6 +2420,19 @@ static int __init omap_init_dma(void) > > if (cpu_class_is_omap2()) > > setup_irq(INT_24XX_SDMA_IRQ0, &omap24xx_dma_irq); > > > > + /* Enable smartidle idlemodes and autoidle */ > > + if (cpu_is_omap34xx()) { > > I think this can be done for omap2 also. Probably true. If no other comments come today, I'll post a new patch with this change. - Kalle > > > + u32 v = dma_read(OCP_SYSCONFIG); > > + v &= ~(DMA_SYSCONFIG_MIDLEMODE_MASK | > > + DMA_SYSCONFIG_SIDLEMODE_MASK | > > + DMA_SYSCONFIG_AUTOIDLE); > > + v |= (DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | > > + DMA_SYSCONFIG_SIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | > > + DMA_SYSCONFIG_AUTOIDLE); > > + dma_write(v , OCP_SYSCONFIG); > > + } > > + > > + > > /* FIXME: Update LCD DMA to work on 24xx */ > > if (cpu_class_is_omap1()) { > > r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, > > diff --git a/arch/arm/plat-omap/include/mach/dma.h > > b/arch/arm/plat-omap/include/mach/dma.h > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] OMAP3: DMA: Enable idlemodes for DMA OCP 2008-12-01 10:50 ` Kalle Jokiniemi @ 2008-12-01 17:03 ` Kalle Jokiniemi 2008-12-16 0:07 ` Tony Lindgren 0 siblings, 1 reply; 6+ messages in thread From: Kalle Jokiniemi @ 2008-12-01 17:03 UTC (permalink / raw) To: Högander Jouni; +Cc: linux-omap, khilman, tony On ma, 2008-12-01 at 12:50 +0200, Kalle Jokiniemi wrote: > On ma, 2008-12-01 at 11:06 +0200, Högander Jouni wrote: > > "ext Kalle Jokiniemi" <ext-kalle.jokiniemi@nokia.com> writes: > > > > > This patch enables MStandby smart-idle mode, autoidle smartidle mode, > > > and the autoidle bit for DMA4_OCP_SYSCONFIG. > > > > > > Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> > > > --- > > > arch/arm/plat-omap/dma.c | 13 +++++++++++++ > > > arch/arm/plat-omap/include/mach/dma.h | 15 +++++++++++++++ > > > 2 files changed, 28 insertions(+), 0 deletions(-) > > > > > > diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c > > > index c4e5ba3..9d8d28c 100644 > > > --- a/arch/arm/plat-omap/dma.c > > > +++ b/arch/arm/plat-omap/dma.c > > > @@ -2420,6 +2420,19 @@ static int __init omap_init_dma(void) > > > if (cpu_class_is_omap2()) > > > setup_irq(INT_24XX_SDMA_IRQ0, &omap24xx_dma_irq); > > > > > > + /* Enable smartidle idlemodes and autoidle */ > > > + if (cpu_is_omap34xx()) { > > > > I think this can be done for omap2 also. > > Probably true. If no other comments come today, I'll post a new patch > with this change. Now that I re-checked, there is no SIDLEMODE for omap2. Also in omap2, setting MIDLEMODE to smartidle cannot be done if cam DMA is used. So, I think the patch should be as it is, omap3 only. - Kalle > > - Kalle > > > > > > + u32 v = dma_read(OCP_SYSCONFIG); > > > + v &= ~(DMA_SYSCONFIG_MIDLEMODE_MASK | > > > + DMA_SYSCONFIG_SIDLEMODE_MASK | > > > + DMA_SYSCONFIG_AUTOIDLE); > > > + v |= (DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | > > > + DMA_SYSCONFIG_SIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | > > > + DMA_SYSCONFIG_AUTOIDLE); > > > + dma_write(v , OCP_SYSCONFIG); > > > + } > > > + > > > + > > > /* FIXME: Update LCD DMA to work on 24xx */ > > > if (cpu_class_is_omap1()) { > > > r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, > > > diff --git a/arch/arm/plat-omap/include/mach/dma.h > > > b/arch/arm/plat-omap/include/mach/dma.h > > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] OMAP3: DMA: Enable idlemodes for DMA OCP 2008-12-01 17:03 ` Kalle Jokiniemi @ 2008-12-16 0:07 ` Tony Lindgren 0 siblings, 0 replies; 6+ messages in thread From: Tony Lindgren @ 2008-12-16 0:07 UTC (permalink / raw) To: Kalle Jokiniemi; +Cc: Högander Jouni, linux-omap, khilman * Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> [081201 09:00]: > On ma, 2008-12-01 at 12:50 +0200, Kalle Jokiniemi wrote: > > On ma, 2008-12-01 at 11:06 +0200, Högander Jouni wrote: > > > "ext Kalle Jokiniemi" <ext-kalle.jokiniemi@nokia.com> writes: > > > > > > > This patch enables MStandby smart-idle mode, autoidle smartidle mode, > > > > and the autoidle bit for DMA4_OCP_SYSCONFIG. > > > > > > > > Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> > > > > --- > > > > arch/arm/plat-omap/dma.c | 13 +++++++++++++ > > > > arch/arm/plat-omap/include/mach/dma.h | 15 +++++++++++++++ > > > > 2 files changed, 28 insertions(+), 0 deletions(-) > > > > > > > > diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c > > > > index c4e5ba3..9d8d28c 100644 > > > > --- a/arch/arm/plat-omap/dma.c > > > > +++ b/arch/arm/plat-omap/dma.c > > > > @@ -2420,6 +2420,19 @@ static int __init omap_init_dma(void) > > > > if (cpu_class_is_omap2()) > > > > setup_irq(INT_24XX_SDMA_IRQ0, &omap24xx_dma_irq); > > > > > > > > + /* Enable smartidle idlemodes and autoidle */ > > > > + if (cpu_is_omap34xx()) { > > > > > > I think this can be done for omap2 also. > > > > Probably true. If no other comments come today, I'll post a new patch > > with this change. > > Now that I re-checked, there is no SIDLEMODE for omap2. Also in omap2, > setting MIDLEMODE to smartidle cannot be done if cam DMA is used. > > So, I think the patch should be as it is, omap3 only. OK. Pushing to l-o tree and queuing for upstream. Regards, Tony > > - Kalle > > > > > - Kalle > > > > > > > > > + u32 v = dma_read(OCP_SYSCONFIG); > > > > + v &= ~(DMA_SYSCONFIG_MIDLEMODE_MASK | > > > > + DMA_SYSCONFIG_SIDLEMODE_MASK | > > > > + DMA_SYSCONFIG_AUTOIDLE); > > > > + v |= (DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | > > > > + DMA_SYSCONFIG_SIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | > > > > + DMA_SYSCONFIG_AUTOIDLE); > > > > + dma_write(v , OCP_SYSCONFIG); > > > > + } > > > > + > > > > + > > > > /* FIXME: Update LCD DMA to work on 24xx */ > > > > if (cpu_class_is_omap1()) { > > > > r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, > > > > diff --git a/arch/arm/plat-omap/include/mach/dma.h > > > > b/arch/arm/plat-omap/include/mach/dma.h > > > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-16 0:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-12-01 8:55 [PATCH 0/1] OMAP3: DMA: Enable idlemodes for DMA OCP Kalle Jokiniemi 2008-12-01 8:55 ` [PATCH 1/1] " Kalle Jokiniemi 2008-12-01 9:06 ` Högander Jouni 2008-12-01 10:50 ` Kalle Jokiniemi 2008-12-01 17:03 ` Kalle Jokiniemi 2008-12-16 0:07 ` Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox