* [PATCH] SDMA: Fixing bug in omap_dma_set_global_params()
@ 2009-09-23 7:19 Anuj Aggarwal
2009-09-23 8:24 ` Venkatraman S
0 siblings, 1 reply; 3+ messages in thread
From: Anuj Aggarwal @ 2009-09-23 7:19 UTC (permalink / raw)
To: linux-omap, linux-kernel; +Cc: Anuj Aggarwal
Argument tparams was not being used to program
global register GCR.HI_THREAD_RESERVED. This patch fixes the same.
Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
---
arch/arm/plat-omap/dma.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index bf08634..7a7b6df 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -829,10 +829,10 @@ EXPORT_SYMBOL(omap_free_dma);
*
* @param arb_rate
* @param max_fifo_depth
- * @param tparams - Number of thereads to reserve : DMA_THREAD_RESERVE_NORM
- * DMA_THREAD_RESERVE_ONET
- * DMA_THREAD_RESERVE_TWOT
- * DMA_THREAD_RESERVE_THREET
+ * @param tparams - Number of threads to reserve : DMA_THREAD_RESERVE_NORM
+ * DMA_THREAD_RESERVE_ONET
+ * DMA_THREAD_RESERVE_TWOT
+ * DMA_THREAD_RESERVE_THREET
*/
void
omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams)
@@ -847,8 +847,9 @@ omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams)
if (arb_rate == 0)
arb_rate = 1;
- reg = (arb_rate & 0xff) << 16;
- reg |= (0xff & max_fifo_depth);
+ reg = 0xff & max_fifo_depth;
+ reg |= (0x3 & tparams) << 12;
+ reg |= (arb_rate & 0xff) << 16;
dma_write(reg, GCR);
}
--
1.6.2.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] SDMA: Fixing bug in omap_dma_set_global_params()
2009-09-23 7:19 [PATCH] SDMA: Fixing bug in omap_dma_set_global_params() Anuj Aggarwal
@ 2009-09-23 8:24 ` Venkatraman S
2009-10-02 21:42 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Venkatraman S @ 2009-09-23 8:24 UTC (permalink / raw)
To: Anuj Aggarwal; +Cc: linux-omap, linux-kernel
On Wed, Sep 23, 2009 at 12:49 PM, Anuj Aggarwal <anuj.aggarwal@ti.com> wrote:
> Argument tparams was not being used to program
> global register GCR.HI_THREAD_RESERVED. This patch fixes the same.
>
> Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
> ---
> arch/arm/plat-omap/dma.c | 13 +++++++------
> 1 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index bf08634..7a7b6df 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -829,10 +829,10 @@ EXPORT_SYMBOL(omap_free_dma);
> *
> * @param arb_rate
> * @param max_fifo_depth
> - * @param tparams - Number of thereads to reserve : DMA_THREAD_RESERVE_NORM
> - * DMA_THREAD_RESERVE_ONET
> - * DMA_THREAD_RESERVE_TWOT
> - * DMA_THREAD_RESERVE_THREET
> + * @param tparams - Number of threads to reserve : DMA_THREAD_RESERVE_NORM
> + * DMA_THREAD_RESERVE_ONET
> + * DMA_THREAD_RESERVE_TWOT
> + * DMA_THREAD_RESERVE_THREET
> */
> void
> omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams)
> @@ -847,8 +847,9 @@ omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams)
> if (arb_rate == 0)
> arb_rate = 1;
>
> - reg = (arb_rate & 0xff) << 16;
> - reg |= (0xff & max_fifo_depth);
> + reg = 0xff & max_fifo_depth;
> + reg |= (0x3 & tparams) << 12;
> + reg |= (arb_rate & 0xff) << 16;
>
> dma_write(reg, GCR);
> }
max_fifo_depth should not be set to zero. Perhaps it deserves a check
similar to arb_rate ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SDMA: Fixing bug in omap_dma_set_global_params()
2009-09-23 8:24 ` Venkatraman S
@ 2009-10-02 21:42 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2009-10-02 21:42 UTC (permalink / raw)
To: Venkatraman S; +Cc: Anuj Aggarwal, linux-omap, linux-kernel
* Venkatraman S <svenkatr@ti.com> [090923 01:25]:
> On Wed, Sep 23, 2009 at 12:49 PM, Anuj Aggarwal <anuj.aggarwal@ti.com> wrote:
> > Argument tparams was not being used to program
> > global register GCR.HI_THREAD_RESERVED. This patch fixes the same.
> >
> > Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
> > ---
> > arch/arm/plat-omap/dma.c | 13 +++++++------
> > 1 files changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> > index bf08634..7a7b6df 100644
> > --- a/arch/arm/plat-omap/dma.c
> > +++ b/arch/arm/plat-omap/dma.c
> > @@ -829,10 +829,10 @@ EXPORT_SYMBOL(omap_free_dma);
> > *
> > * @param arb_rate
> > * @param max_fifo_depth
> > - * @param tparams - Number of thereads to reserve : DMA_THREAD_RESERVE_NORM
> > - * DMA_THREAD_RESERVE_ONET
> > - * DMA_THREAD_RESERVE_TWOT
> > - * DMA_THREAD_RESERVE_THREET
> > + * @param tparams - Number of threads to reserve : DMA_THREAD_RESERVE_NORM
> > + * DMA_THREAD_RESERVE_ONET
> > + * DMA_THREAD_RESERVE_TWOT
> > + * DMA_THREAD_RESERVE_THREET
> > */
> > void
> > omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams)
> > @@ -847,8 +847,9 @@ omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams)
> > if (arb_rate == 0)
> > arb_rate = 1;
> >
> > - reg = (arb_rate & 0xff) << 16;
> > - reg |= (0xff & max_fifo_depth);
> > + reg = 0xff & max_fifo_depth;
> > + reg |= (0x3 & tparams) << 12;
> > + reg |= (arb_rate & 0xff) << 16;
> >
> > dma_write(reg, GCR);
> > }
>
> max_fifo_depth should not be set to zero. Perhaps it deserves a check
> similar to arb_rate ?
Any news on updating this patch to also check the max_fifo_depth?
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-02 21:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-23 7:19 [PATCH] SDMA: Fixing bug in omap_dma_set_global_params() Anuj Aggarwal
2009-09-23 8:24 ` Venkatraman S
2009-10-02 21:42 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox