mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 10:44:14 +08:00
dmaengine: imx-sdma: remove the maximum limitation for bd numbers
No this limitation now after virtual dma used since bd is allocated dynamically instead of static. Signed-off-by: Robin Gong <yibin.gong@nxp.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
d69d1e17c3
commit
36e8d3b133
@ -285,7 +285,6 @@ struct sdma_context_data {
|
|||||||
u32 scratch7;
|
u32 scratch7;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
#define NUM_BD (int)(PAGE_SIZE / sizeof(struct sdma_buffer_descriptor))
|
|
||||||
|
|
||||||
struct sdma_engine;
|
struct sdma_engine;
|
||||||
|
|
||||||
@ -1290,13 +1289,6 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_bd_out;
|
goto err_bd_out;
|
||||||
|
|
||||||
if (sg_len > NUM_BD) {
|
|
||||||
dev_err(sdma->dev, "SDMA channel %d: maximum number of sg exceeded: %d > %d\n",
|
|
||||||
channel, sg_len, NUM_BD);
|
|
||||||
ret = -EINVAL;
|
|
||||||
goto err_bd_out;
|
|
||||||
}
|
|
||||||
|
|
||||||
desc->chn_count = 0;
|
desc->chn_count = 0;
|
||||||
for_each_sg(sgl, sg, sg_len, i) {
|
for_each_sg(sgl, sg, sg_len, i) {
|
||||||
struct sdma_buffer_descriptor *bd = &desc->bd[i];
|
struct sdma_buffer_descriptor *bd = &desc->bd[i];
|
||||||
@ -1406,12 +1398,6 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_bd_out;
|
goto err_bd_out;
|
||||||
|
|
||||||
if (num_periods > NUM_BD) {
|
|
||||||
dev_err(sdma->dev, "SDMA channel %d: maximum number of sg exceeded: %d > %d\n",
|
|
||||||
channel, num_periods, NUM_BD);
|
|
||||||
goto err_bd_out;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (period_len > 0xffff) {
|
if (period_len > 0xffff) {
|
||||||
dev_err(sdma->dev, "SDMA channel %d: maximum period size exceeded: %zu > %d\n",
|
dev_err(sdma->dev, "SDMA channel %d: maximum period size exceeded: %zu > %d\n",
|
||||||
channel, period_len, 0xffff);
|
channel, period_len, 0xffff);
|
||||||
|
Loading…
Reference in New Issue
Block a user