Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af9bf852 authored by Chetan C R's avatar Chetan C R Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarChetan C R <cchinnad@codeaurora.org>
parent 51d808aa
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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);