mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
e74ead2249
The patches were generated from the RPi repo with the following command: git format-patch v6.6.36..rpi-6.6.y Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
90 lines
2.7 KiB
Diff
90 lines
2.7 KiB
Diff
From 769634f344626ed73bcda14c91b567067974d7b2 Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Sat, 29 Jun 2024 09:30:23 +0100
|
|
Subject: [PATCH 1145/1145] fixup! dmaengine: dw-axi-dmac: Fixes for RP1
|
|
|
|
nr_hw_descs is the upstream version of what count_hw_descs, so make
|
|
(more) use of it instead.
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
---
|
|
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 14 +++++++-------
|
|
drivers/dma/dw-axi-dmac/dw-axi-dmac.h | 1 -
|
|
2 files changed, 7 insertions(+), 8 deletions(-)
|
|
|
|
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
|
|
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
|
|
@@ -305,7 +305,7 @@ static struct axi_dma_lli *axi_desc_get(
|
|
static void axi_desc_put(struct axi_dma_desc *desc)
|
|
{
|
|
struct axi_dma_chan *chan = desc->chan;
|
|
- u32 count = desc->hw_desc_count;
|
|
+ int count = desc->nr_hw_descs;
|
|
struct axi_dma_hw_desc *hw_desc;
|
|
int descs_put;
|
|
|
|
@@ -849,7 +849,7 @@ dw_axi_dma_chan_prep_cyclic(struct dma_c
|
|
src_addr += segment_len;
|
|
}
|
|
|
|
- desc->hw_desc_count = total_segments;
|
|
+ desc->nr_hw_descs = total_segments;
|
|
|
|
llp = desc->hw_desc[0].llp;
|
|
|
|
@@ -933,7 +933,7 @@ dw_axi_dma_chan_prep_slave_sg(struct dma
|
|
} while (len >= segment_len);
|
|
}
|
|
|
|
- desc->hw_desc_count = loop;
|
|
+ desc->nr_hw_descs = loop;
|
|
|
|
/* Set end-of-link to the last link descriptor of list */
|
|
set_desc_last(&desc->hw_desc[num_sgs - 1]);
|
|
@@ -1042,7 +1042,7 @@ dma_chan_prep_dma_memcpy(struct dma_chan
|
|
num++;
|
|
}
|
|
|
|
- desc->hw_desc_count = num;
|
|
+ desc->nr_hw_descs = num;
|
|
|
|
/* Set end-of-link to the last link descriptor of list */
|
|
set_desc_last(&desc->hw_desc[num - 1]);
|
|
@@ -1092,7 +1092,7 @@ static void axi_chan_dump_lli(struct axi
|
|
static void axi_chan_list_dump_lli(struct axi_dma_chan *chan,
|
|
struct axi_dma_desc *desc_head)
|
|
{
|
|
- u32 count = desc_head->hw_desc_count;
|
|
+ int count = desc_head->nr_hw_descs;
|
|
int i;
|
|
|
|
for (i = 0; i < count; i++)
|
|
@@ -1139,7 +1139,7 @@ static void axi_chan_block_xfer_complete
|
|
struct axi_dma_desc *desc;
|
|
struct virt_dma_desc *vd;
|
|
unsigned long flags;
|
|
- u32 count;
|
|
+ int count;
|
|
u64 llp;
|
|
int i;
|
|
|
|
@@ -1161,7 +1161,7 @@ static void axi_chan_block_xfer_complete
|
|
if (chan->cyclic) {
|
|
desc = vd_to_axi_desc(vd);
|
|
if (desc) {
|
|
- count = desc->hw_desc_count;
|
|
+ count = desc->nr_hw_descs;
|
|
llp = lo_hi_readq(chan->chan_regs + CH_LLP);
|
|
for (i = 0; i < count; i++) {
|
|
hw_desc = &desc->hw_desc[i];
|
|
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
|
|
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
|
|
@@ -101,7 +101,6 @@ struct axi_dma_desc {
|
|
|
|
struct virt_dma_desc vd;
|
|
struct axi_dma_chan *chan;
|
|
- u32 hw_desc_count;
|
|
u32 completed_blocks;
|
|
u32 length;
|
|
u32 period_len;
|