提交 db57d10f 编写于 作者: C Chanho Park 提交者: Zheng Zengkai

tty: serial: samsung_tty: set dma burst_size to 1

stable inclusion
from stable-v5.10.132
commit 5450430199e319446d6b7a0ec963e3c951b121ab
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5YS3T

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5450430199e319446d6b7a0ec963e3c951b121ab

--------------------------------

commit f7e35e4b upstream.

The src_maxburst and dst_maxburst have been changed to 1 but the settings
of the UCON register aren't changed yet. They should be changed as well
according to the dmaengine slave config.

Fixes: aa2f80e7 ("serial: samsung: fix maxburst parameter for DMA transactions")
Cc: stable <stable@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: NChanho Park <chanho61.park@samsung.com>
Link: https://lore.kernel.org/r/20220627065113.139520-1-chanho61.park@samsung.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 6337051f
...@@ -361,8 +361,7 @@ static void enable_tx_dma(struct s3c24xx_uart_port *ourport) ...@@ -361,8 +361,7 @@ static void enable_tx_dma(struct s3c24xx_uart_port *ourport)
/* Enable tx dma mode */ /* Enable tx dma mode */
ucon = rd_regl(port, S3C2410_UCON); ucon = rd_regl(port, S3C2410_UCON);
ucon &= ~(S3C64XX_UCON_TXBURST_MASK | S3C64XX_UCON_TXMODE_MASK); ucon &= ~(S3C64XX_UCON_TXBURST_MASK | S3C64XX_UCON_TXMODE_MASK);
ucon |= (dma_get_cache_alignment() >= 16) ? ucon |= S3C64XX_UCON_TXBURST_1;
S3C64XX_UCON_TXBURST_16 : S3C64XX_UCON_TXBURST_1;
ucon |= S3C64XX_UCON_TXMODE_DMA; ucon |= S3C64XX_UCON_TXMODE_DMA;
wr_regl(port, S3C2410_UCON, ucon); wr_regl(port, S3C2410_UCON, ucon);
...@@ -634,7 +633,7 @@ static void enable_rx_dma(struct s3c24xx_uart_port *ourport) ...@@ -634,7 +633,7 @@ static void enable_rx_dma(struct s3c24xx_uart_port *ourport)
S3C64XX_UCON_DMASUS_EN | S3C64XX_UCON_DMASUS_EN |
S3C64XX_UCON_TIMEOUT_EN | S3C64XX_UCON_TIMEOUT_EN |
S3C64XX_UCON_RXMODE_MASK); S3C64XX_UCON_RXMODE_MASK);
ucon |= S3C64XX_UCON_RXBURST_16 | ucon |= S3C64XX_UCON_RXBURST_1 |
0xf << S3C64XX_UCON_TIMEOUT_SHIFT | 0xf << S3C64XX_UCON_TIMEOUT_SHIFT |
S3C64XX_UCON_EMPTYINT_EN | S3C64XX_UCON_EMPTYINT_EN |
S3C64XX_UCON_TIMEOUT_EN | S3C64XX_UCON_TIMEOUT_EN |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册