* [PATCH] ARM: OMAP1: DMA: Correct the number of logical channels
@ 2017-01-03 11:22 Peter Ujfalusi
2017-01-05 17:31 ` Tony Lindgren
2017-01-05 21:47 ` Aaro Koskinen
0 siblings, 2 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2017-01-03 11:22 UTC (permalink / raw)
To: aaro.koskinen, tony; +Cc: dmaengine, linux-kernel, linux-omap, linux-arm-kernel
OMAP1510, OMAP5910 and OMAP310 have only 9 logical channels.
OMAP1610, OMAP5912, OMAP1710, OMAP730, and OMAP850 have 16 logical channels
available.
The wired 17 for the lch_count must have been used to cover the 16 + 1
dedicated LCD channel, in reality we can only use 9 or 16 channels.
The d->chan_count is not used by the omap-dma stack, so we can skip the
setup. chan_count was configured to the number of logical channels and not
the actual number of physical channels anyways.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
arch/arm/mach-omap1/dma.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index f6ba589cd312..c821c1d5610e 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -32,7 +32,6 @@
#include "soc.h"
#define OMAP1_DMA_BASE (0xfffed800)
-#define OMAP1_LOGICAL_DMA_CH_COUNT 17
static u32 enable_1510_mode;
@@ -348,8 +347,6 @@ static int __init omap1_system_dma_init(void)
goto exit_iounmap;
}
- d->lch_count = OMAP1_LOGICAL_DMA_CH_COUNT;
-
/* Valid attributes for omap1 plus processors */
if (cpu_is_omap15xx())
d->dev_caps = ENABLE_1510_MODE;
@@ -366,13 +363,14 @@ static int __init omap1_system_dma_init(void)
d->dev_caps |= CLEAR_CSR_ON_READ;
d->dev_caps |= IS_WORD_16;
- if (cpu_is_omap15xx())
- d->chan_count = 9;
- else if (cpu_is_omap16xx() || cpu_is_omap7xx()) {
- if (!(d->dev_caps & ENABLE_1510_MODE))
- d->chan_count = 16;
+ /* available logical channels */
+ if (cpu_is_omap15xx()) {
+ d->lch_count = 9;
+ } else {
+ if (d->dev_caps & ENABLE_1510_MODE)
+ d->lch_count = 9;
else
- d->chan_count = 9;
+ d->lch_count = 16;
}
p = dma_plat_info;
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: OMAP1: DMA: Correct the number of logical channels
2017-01-03 11:22 [PATCH] ARM: OMAP1: DMA: Correct the number of logical channels Peter Ujfalusi
@ 2017-01-05 17:31 ` Tony Lindgren
2017-01-05 21:47 ` Aaro Koskinen
1 sibling, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2017-01-05 17:31 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: aaro.koskinen, dmaengine, linux-kernel, linux-omap, linux-arm-kernel
* Peter Ujfalusi <peter.ujfalusi@ti.com> [170103 03:22]:
> OMAP1510, OMAP5910 and OMAP310 have only 9 logical channels.
> OMAP1610, OMAP5912, OMAP1710, OMAP730, and OMAP850 have 16 logical channels
> available.
>
> The wired 17 for the lch_count must have been used to cover the 16 + 1
> dedicated LCD channel, in reality we can only use 9 or 16 channels.
>
> The d->chan_count is not used by the omap-dma stack, so we can skip the
> setup. chan_count was configured to the number of logical channels and not
> the actual number of physical channels anyways.
Aaro care to ack?
Tony
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> arch/arm/mach-omap1/dma.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
> index f6ba589cd312..c821c1d5610e 100644
> --- a/arch/arm/mach-omap1/dma.c
> +++ b/arch/arm/mach-omap1/dma.c
> @@ -32,7 +32,6 @@
> #include "soc.h"
>
> #define OMAP1_DMA_BASE (0xfffed800)
> -#define OMAP1_LOGICAL_DMA_CH_COUNT 17
>
> static u32 enable_1510_mode;
>
> @@ -348,8 +347,6 @@ static int __init omap1_system_dma_init(void)
> goto exit_iounmap;
> }
>
> - d->lch_count = OMAP1_LOGICAL_DMA_CH_COUNT;
> -
> /* Valid attributes for omap1 plus processors */
> if (cpu_is_omap15xx())
> d->dev_caps = ENABLE_1510_MODE;
> @@ -366,13 +363,14 @@ static int __init omap1_system_dma_init(void)
> d->dev_caps |= CLEAR_CSR_ON_READ;
> d->dev_caps |= IS_WORD_16;
>
> - if (cpu_is_omap15xx())
> - d->chan_count = 9;
> - else if (cpu_is_omap16xx() || cpu_is_omap7xx()) {
> - if (!(d->dev_caps & ENABLE_1510_MODE))
> - d->chan_count = 16;
> + /* available logical channels */
> + if (cpu_is_omap15xx()) {
> + d->lch_count = 9;
> + } else {
> + if (d->dev_caps & ENABLE_1510_MODE)
> + d->lch_count = 9;
> else
> - d->chan_count = 9;
> + d->lch_count = 16;
> }
>
> p = dma_plat_info;
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: OMAP1: DMA: Correct the number of logical channels
2017-01-03 11:22 [PATCH] ARM: OMAP1: DMA: Correct the number of logical channels Peter Ujfalusi
2017-01-05 17:31 ` Tony Lindgren
@ 2017-01-05 21:47 ` Aaro Koskinen
2017-01-06 16:33 ` Tony Lindgren
1 sibling, 1 reply; 4+ messages in thread
From: Aaro Koskinen @ 2017-01-05 21:47 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: tony, dmaengine, linux-kernel, linux-omap, linux-arm-kernel
Hi,
On Tue, Jan 03, 2017 at 01:22:34PM +0200, Peter Ujfalusi wrote:
> OMAP1510, OMAP5910 and OMAP310 have only 9 logical channels.
> OMAP1610, OMAP5912, OMAP1710, OMAP730, and OMAP850 have 16 logical channels
> available.
>
> The wired 17 for the lch_count must have been used to cover the 16 + 1
> dedicated LCD channel, in reality we can only use 9 or 16 channels.
>
> The d->chan_count is not used by the omap-dma stack, so we can skip the
> setup. chan_count was configured to the number of logical channels and not
> the actual number of physical channels anyways.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
A.
> ---
> arch/arm/mach-omap1/dma.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
> index f6ba589cd312..c821c1d5610e 100644
> --- a/arch/arm/mach-omap1/dma.c
> +++ b/arch/arm/mach-omap1/dma.c
> @@ -32,7 +32,6 @@
> #include "soc.h"
>
> #define OMAP1_DMA_BASE (0xfffed800)
> -#define OMAP1_LOGICAL_DMA_CH_COUNT 17
>
> static u32 enable_1510_mode;
>
> @@ -348,8 +347,6 @@ static int __init omap1_system_dma_init(void)
> goto exit_iounmap;
> }
>
> - d->lch_count = OMAP1_LOGICAL_DMA_CH_COUNT;
> -
> /* Valid attributes for omap1 plus processors */
> if (cpu_is_omap15xx())
> d->dev_caps = ENABLE_1510_MODE;
> @@ -366,13 +363,14 @@ static int __init omap1_system_dma_init(void)
> d->dev_caps |= CLEAR_CSR_ON_READ;
> d->dev_caps |= IS_WORD_16;
>
> - if (cpu_is_omap15xx())
> - d->chan_count = 9;
> - else if (cpu_is_omap16xx() || cpu_is_omap7xx()) {
> - if (!(d->dev_caps & ENABLE_1510_MODE))
> - d->chan_count = 16;
> + /* available logical channels */
> + if (cpu_is_omap15xx()) {
> + d->lch_count = 9;
> + } else {
> + if (d->dev_caps & ENABLE_1510_MODE)
> + d->lch_count = 9;
> else
> - d->chan_count = 9;
> + d->lch_count = 16;
> }
>
> p = dma_plat_info;
> --
> 2.11.0
>
> --
> 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] 4+ messages in thread
* Re: [PATCH] ARM: OMAP1: DMA: Correct the number of logical channels
2017-01-05 21:47 ` Aaro Koskinen
@ 2017-01-06 16:33 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2017-01-06 16:33 UTC (permalink / raw)
To: Aaro Koskinen
Cc: Peter Ujfalusi, dmaengine, linux-kernel, linux-omap, linux-arm-kernel
* Aaro Koskinen <aaro.koskinen@iki.fi> [170105 13:48]:
> Hi,
>
> On Tue, Jan 03, 2017 at 01:22:34PM +0200, Peter Ujfalusi wrote:
> > OMAP1510, OMAP5910 and OMAP310 have only 9 logical channels.
> > OMAP1610, OMAP5912, OMAP1710, OMAP730, and OMAP850 have 16 logical channels
> > available.
> >
> > The wired 17 for the lch_count must have been used to cover the 16 + 1
> > dedicated LCD channel, in reality we can only use 9 or 16 channels.
> >
> > The d->chan_count is not used by the omap-dma stack, so we can skip the
> > setup. chan_count was configured to the number of logical channels and not
> > the actual number of physical channels anyways.
> >
> > Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Applying into omap-for-v4.10/fixes thanks.
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-06 16:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03 11:22 [PATCH] ARM: OMAP1: DMA: Correct the number of logical channels Peter Ujfalusi
2017-01-05 17:31 ` Tony Lindgren
2017-01-05 21:47 ` Aaro Koskinen
2017-01-06 16:33 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).