* [PATCH v2] dmaengine: dw: Fix FIFO size for Intel Merrifield
@ 2018-12-05 16:33 Andy Shevchenko
2018-12-06 4:21 ` Viresh Kumar
2018-12-06 5:24 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2018-12-05 16:33 UTC (permalink / raw)
To: Viresh Kumar, dmaengine, Vinod Koul; +Cc: Andy Shevchenko, stable
Intel Merrifield has a reduced size of FIFO used in iDMA 32-bit controller,
i.e. 512 bytes instead of 1024.
Fix this by partitioning it as 64 bytes per channel.
Note, in the future we might switch to 'fifo-size' property instead of
hard coded value.
Fixes: 199244d69458 ("dmaengine: dw: add support of iDMA 32-bit hardware")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: stable@vger.kernel.org
---
drivers/dma/dw/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index 2c5ca1961256..dc053e62f894 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -1061,12 +1061,12 @@ static void dwc_issue_pending(struct dma_chan *chan)
/*
* Program FIFO size of channels.
*
- * By default full FIFO (1024 bytes) is assigned to channel 0. Here we
+ * By default full FIFO (512 bytes) is assigned to channel 0. Here we
* slice FIFO on equal parts between channels.
*/
static void idma32_fifo_partition(struct dw_dma *dw)
{
- u64 value = IDMA32C_FP_PSIZE_CH0(128) | IDMA32C_FP_PSIZE_CH1(128) |
+ u64 value = IDMA32C_FP_PSIZE_CH0(64) | IDMA32C_FP_PSIZE_CH1(64) |
IDMA32C_FP_UPDATE;
u64 fifo_partition = 0;
@@ -1079,7 +1079,7 @@ static void idma32_fifo_partition(struct dw_dma *dw)
/* Fill FIFO_PARTITION high bits (Channels 2..3, 6..7) */
fifo_partition |= value << 32;
- /* Program FIFO Partition registers - 128 bytes for each channel */
+ /* Program FIFO Partition registers - 64 bytes per channel */
idma32_writeq(dw, FIFO_PARTITION1, fifo_partition);
idma32_writeq(dw, FIFO_PARTITION0, fifo_partition);
}
--
2.19.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dmaengine: dw: Fix FIFO size for Intel Merrifield
2018-12-05 16:33 [PATCH v2] dmaengine: dw: Fix FIFO size for Intel Merrifield Andy Shevchenko
@ 2018-12-06 4:21 ` Viresh Kumar
2018-12-06 5:24 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2018-12-06 4:21 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Viresh Kumar, dmaengine, Vinod Koul, stable
On 05-12-18, 18:33, Andy Shevchenko wrote:
> Intel Merrifield has a reduced size of FIFO used in iDMA 32-bit controller,
> i.e. 512 bytes instead of 1024.
>
> Fix this by partitioning it as 64 bytes per channel.
>
> Note, in the future we might switch to 'fifo-size' property instead of
> hard coded value.
>
> Fixes: 199244d69458 ("dmaengine: dw: add support of iDMA 32-bit hardware")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: stable@vger.kernel.org
> ---
> drivers/dma/dw/core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dmaengine: dw: Fix FIFO size for Intel Merrifield
2018-12-05 16:33 [PATCH v2] dmaengine: dw: Fix FIFO size for Intel Merrifield Andy Shevchenko
2018-12-06 4:21 ` Viresh Kumar
@ 2018-12-06 5:24 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2018-12-06 5:24 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Viresh Kumar, dmaengine, stable
On 05-12-18, 18:33, Andy Shevchenko wrote:
> Intel Merrifield has a reduced size of FIFO used in iDMA 32-bit controller,
> i.e. 512 bytes instead of 1024.
>
> Fix this by partitioning it as 64 bytes per channel.
>
> Note, in the future we might switch to 'fifo-size' property instead of
> hard coded value.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-06 5:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 16:33 [PATCH v2] dmaengine: dw: Fix FIFO size for Intel Merrifield Andy Shevchenko
2018-12-06 4:21 ` Viresh Kumar
2018-12-06 5:24 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox