From 58864fe99c9946001bb47edc695f2b35679a6d5b Mon Sep 17 00:00:00 2001 From: Mukesh Kumar Savaliya Date: Tue, 19 Jan 2021 17:18:41 +0530 Subject: [PATCH] dmaengine: gpi: Log the assigned GPII per SE during probe This change Enhances IPC logs to add SE instance to know which GPII is attached to which SE device, this helps in debug. Also, removed unnecessary read of iommu-dma property. Change-Id: I6a5a9312d80abab2addc0c63642429a787f9065c Signed-off-by: Mukesh Kumar Savaliya --- drivers/dma/qcom/gpi.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index f208260f223d..b0bb1f9b55e8 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. */ #include @@ -1228,8 +1228,11 @@ static void gpi_process_ch_ctrl_irq(struct gpii *gpii) * Stop in process is a transition state and we will wait for * stop interrupt before notifying. */ - if (gpii_chan->ch_state != CH_STATE_STOP_IN_PROC) + if (gpii_chan->ch_state != CH_STATE_STOP_IN_PROC) { + GPII_ERR(gpii, GPI_DBG_COMMON, + "Chan Not in Proper state:%d\n", gpii_chan->ch_state); complete_all(&gpii->cmd_completion); + } /* notifying clients if in error state */ if (gpii_chan->ch_state == CH_STATE_ERROR) @@ -2913,9 +2916,9 @@ static struct dma_chan *gpi_of_dma_xlate(struct of_phandle_args *args, gpii_chan->priority = args->args[4] & GPI_EV_PRIORITY_BMSK; GPI_LOG(gpi_dev, - "client req. gpii:%u chid:%u #_tre:%u priority:%u protocol:%u\n", + "client req gpii:%u chid:%u #_tre:%u prio:%u proto:%u SE:%d\n", gpii, chid, gpii_chan->req_tres, gpii_chan->priority, - gpii_chan->protocol); + gpii_chan->protocol, gpii_chan->seid); return dma_get_slave_channel(&gpii_chan->vc.chan); } @@ -2980,7 +2983,6 @@ static int gpi_probe(struct platform_device *pdev) { struct gpi_dev *gpi_dev; int ret, i; - const char *mode = NULL; u32 gpi_ee_offset; gpi_dev = devm_kzalloc(&pdev->dev, sizeof(*gpi_dev), GFP_KERNEL); @@ -3041,9 +3043,6 @@ static int gpi_probe(struct platform_device *pdev) return ret; } - ret = of_property_read_string(gpi_dev->dev->of_node, - "qcom,iommu-dma", &mode); - ret = dma_set_mask(gpi_dev->dev, DMA_BIT_MASK(64)); if (ret) { GPI_ERR(gpi_dev,