serial: msm_serial_hs: set the DMA mask and the coherent DMA mask
Basically, the fact that the coherent DMA mask value wasn't set caused the driver to fall back to SWIOTLB. For correct operation, lets call the dma_set_mask_and_coherent() to properly set the mask for both streaming and coherent, in order to inform the kernel about the devices DMA addressing capabilities. Change-Id: I522fde8f78c01be55e91715769b4f16a28bca724 Signed-off-by: Chetan C R <cchinnad@codeaurora.org>
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
51d808aa7d
commit
af9bf852d0
@@ -2688,8 +2688,7 @@ static int msm_hs_startup(struct uart_port *uport)
|
||||
tx->dma_in_flight = false;
|
||||
MSM_HS_DBG("%s():desc usage flag 0x%lx\n", __func__, rx->queued_flag);
|
||||
timer_setup(&(tx->tx_timeout_timer),
|
||||
tx_timeout_handler,
|
||||
(unsigned long) msm_uport);
|
||||
tx_timeout_handler, 0);
|
||||
|
||||
/* Enable reading the current CTS, no harm even if CTS is ignored */
|
||||
msm_uport->imr_reg |= UARTDM_ISR_CURRENT_CTS_BMSK;
|
||||
@@ -3316,6 +3315,12 @@ static int msm_hs_probe(struct platform_device *pdev)
|
||||
unsigned long data;
|
||||
char name[30];
|
||||
|
||||
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "could not set DMA mask\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
dev_dbg(&pdev->dev, "device tree enabled\n");
|
||||
pdata = msm_hs_dt_to_pdata(pdev);
|
||||
|
||||
Reference in New Issue
Block a user