From patchwork Fri Jul 5 13:55:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mrinmay Sarkar X-Patchwork-Id: 13725184 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65A5414B96D; Fri, 5 Jul 2024 13:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720187749; cv=none; b=RC5SoEhtkMFtsE/R+A2IwiCE3u8O4f49rQBOuP0T89JvBKWUk2Brfp3rwHKKF8nXWml0h9LZ/TRZdrKUwd5Qsqeh50GvGqRfPn6p0f+MS5opQ+Dh8rOp44FNGDk7VlDdpTc8Q8/AaDbYsET8vUr45idwmnrst3MxDMB15gmNkPE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720187749; c=relaxed/simple; bh=15ptzpTNCYjUuE/sqhS3/SOfF79oMO6iooTT2u8FgUE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=kw0TJOu4rGch7aHomeCJWF7adMcDQUOku+bDcG8cDerklh0/CbcGKhtU7bhl2AWBG6fewceiewah4aBcWqmVI4qRKQal94V1lVP32c6/kvHbWMOO+1slwxSq5C9T79y4pElu0Z0Vz7k19bcAODMETA82BtcHGprGgasl+5tcBD4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=ImiNr2gK; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ImiNr2gK" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 465A57I3015420; Fri, 5 Jul 2024 13:55:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:date:from:in-reply-to:message-id:references:subject:to; s= qcppdkim1; bh=oDhBULGS9XoU/mAg66Ji2xywsUW0Gg3CLtt59wPJDRA=; b=Im iNr2gKIFJ/avEpapwfRxw9wAbeIlfcLvR05JJGB4cw9ZKpLbCl+IXz5zq1k/QCNo csbnv8DfbYikjoyOpuSgtwBUNn0nP8hr+U8FN+DsBwrZKX7No23UzvgjQMpB9oym 9088wAYsNn6TIDMrDMsgmlzfCgd3EyY+x0MBWF+4LwihTmRUfHlxVBZITGn/dXE7 xxuuM6JibnIwoQ/WymFdMwsNBJRbfbbyd/Im5DfEQRtUTonE2L7YqdxFgxNhrXSA DbQklbDrpSoKu5gFvp16igcjn0Djd1vUdzTkWhUnylpMvCA/eUcw7f5el5mKJJfs oCdJRbQwimTmXMMHZYcA== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 402996xg5g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Jul 2024 13:55:43 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTP id 465DteZE001996; Fri, 5 Jul 2024 13:55:40 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 402bbm4nnp-1; Fri, 05 Jul 2024 13:55:40 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 465DtddI001991; Fri, 5 Jul 2024 13:55:39 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-msarkar-hyd.qualcomm.com [10.213.111.194]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 465DtdS1001989; Fri, 05 Jul 2024 13:55:39 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id DAFF5DA0; Fri, 5 Jul 2024 19:25:38 +0530 (+0530) From: Mrinmay Sarkar To: manivannan.sadhasivam@linaro.org, fancer.lancer@gmail.com, vkoul@kernel.org Cc: quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, Mrinmay Sarkar , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/2] dmaengine: dw-edma: Add fix to unmask the interrupt bit for HDMA Date: Fri, 5 Jul 2024 19:25:32 +0530 Message-Id: <1720187733-5380-2-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1720187733-5380-1-git-send-email-quic_msarkar@quicinc.com> References: <1720187733-5380-1-git-send-email-quic_msarkar@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: f4wF8L0LpylwAe3m1ftOJnrT_ce2Wh6_ X-Proofpoint-ORIG-GUID: f4wF8L0LpylwAe3m1ftOJnrT_ce2Wh6_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-05_09,2024-07-05_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 priorityscore=1501 bulkscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 mlxscore=0 malwarescore=0 clxscore=1015 mlxlogscore=865 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2407050099 Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The current logic is enabling both STOP_INT_MASK and ABORT_INT_MASK bit. This is apparently masking those particular interrupt rather than unmasking the same. This change will reset STOP_INT_MASK and ABORT_INT_MASK bit and unmask these interrupts. Signed-off-by: Mrinmay Sarkar --- drivers/dma/dw-edma/dw-hdma-v0-core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/dma/dw-edma/dw-hdma-v0-core.c b/drivers/dma/dw-edma/dw-hdma-v0-core.c index 10e8f07..88bd652f 100644 --- a/drivers/dma/dw-edma/dw-hdma-v0-core.c +++ b/drivers/dma/dw-edma/dw-hdma-v0-core.c @@ -247,10 +247,11 @@ static void dw_hdma_v0_core_start(struct dw_edma_chunk *chunk, bool first) if (first) { /* Enable engine */ SET_CH_32(dw, chan->dir, chan->id, ch_en, BIT(0)); - /* Interrupt enable&unmask - done, abort */ - tmp = GET_CH_32(dw, chan->dir, chan->id, int_setup) | - HDMA_V0_STOP_INT_MASK | HDMA_V0_ABORT_INT_MASK | - HDMA_V0_LOCAL_STOP_INT_EN | HDMA_V0_LOCAL_ABORT_INT_EN; + /* Interrupt unmask - done, abort */ + tmp = GET_CH_32(dw, chan->dir, chan->id, int_setup) & + ~HDMA_V0_STOP_INT_MASK & ~HDMA_V0_ABORT_INT_MASK; + /* Interrupt enable - done, abort */ + tmp |= HDMA_V0_LOCAL_STOP_INT_EN | HDMA_V0_LOCAL_ABORT_INT_EN; if (!(dw->chip->flags & DW_EDMA_CHIP_LOCAL)) tmp |= HDMA_V0_REMOTE_STOP_INT_EN | HDMA_V0_REMOTE_ABORT_INT_EN; SET_CH_32(dw, chan->dir, chan->id, int_setup, tmp); From patchwork Fri Jul 5 13:55:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mrinmay Sarkar X-Patchwork-Id: 13725185 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 179F315EFAA; Fri, 5 Jul 2024 13:55:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720187753; cv=none; b=C+Xs3kCu3HQD8k5mdBrD9jeGw5G6PLJ9AMgFEel/X+51m7JgqTzXbbdmoyKu0gXNyHFKBCHkFsoeqzu4Pm5Fb5fTUMZwVqVC2Shb0FpuNmi9CCNVFhYWL2yOmtx0lMTflsLybjJXJAfTAzcz5h7Vi1pwW6fwHRABgCN6q7Iakm8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720187753; c=relaxed/simple; bh=ONe2Io9zA6anNvzEJ7HXnYtdSbcXkw9iKrk4SRs4/aA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=cARRnIpKeBJEM+kQ3+A8OpS0bCCRKXqpUM+0O9iIwkixmdEClSzoRf1w1hecZ6Fr+KhtSOk6tvzPUogPDufs0W/USFwzMKUd4lKLcn9e5qF3RhBO2PqkcZVqf0+5cxmdcYBRHnJJaOV8aSfgAMwyYQeXXDo6qhWIk3VhKQ+ZMqE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=gefagsm6; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="gefagsm6" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4657wwRY019819; Fri, 5 Jul 2024 13:55:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:date:from:in-reply-to:message-id:references:subject:to; s= qcppdkim1; bh=9rwoRY+YziQMgYzn0R1tmb6AOIowVXemGfCfHzN2K4k=; b=ge fagsm6tCxjYTqqGkDqQh87MZ/4ghTIUVNKLKSNy3R7Ww0Kr90eyoaS2t+zpi3BhJ PI+Jnb/Lqp5uK00PlZRWjmKgxt2K4DP9oc22pJy5uB4deVFeCwSeNfrO29I+ehZg jAhqq4rRq+8wG20yX+7nQUztud2+29r96sjiCmOlg0yjAVXLtJAZtI92iEJqhey4 MvxNW+f+7oD0TJnvVidAuvs0oD3Z/t1dKUofIM9nsmv5CwrEOahsO2BilHPsh//T mRxAT4emWqXfyvzBAp3BMZInLGD8ZVbtzipUCVytX9uk3zB1SnG+OAbQ56sTihW0 jWDYdSzZzgWyqsmniEaA== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 406cww95et-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Jul 2024 13:55:44 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTP id 465DtecZ002001; Fri, 5 Jul 2024 13:55:41 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 402bbm4nnv-1; Fri, 05 Jul 2024 13:55:41 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 465Dte00002002; Fri, 5 Jul 2024 13:55:40 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-msarkar-hyd.qualcomm.com [10.213.111.194]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 465Dte3K001999; Fri, 05 Jul 2024 13:55:40 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id CD4D8DA8; Fri, 5 Jul 2024 19:25:39 +0530 (+0530) From: Mrinmay Sarkar To: manivannan.sadhasivam@linaro.org, fancer.lancer@gmail.com, vkoul@kernel.org Cc: quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, Mrinmay Sarkar , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/2] dmaengine: dw-edma: Add change to remove watermark interrupt enablement Date: Fri, 5 Jul 2024 19:25:33 +0530 Message-Id: <1720187733-5380-3-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1720187733-5380-1-git-send-email-quic_msarkar@quicinc.com> References: <1720187733-5380-1-git-send-email-quic_msarkar@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: oYrabfRwndClpqDvt_q8XNUmfPbyLvOK X-Proofpoint-GUID: oYrabfRwndClpqDvt_q8XNUmfPbyLvOK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-05_09,2024-07-05_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 adultscore=0 mlxlogscore=767 lowpriorityscore=0 mlxscore=0 clxscore=1015 suspectscore=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2407050099 Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: DW_HDMA_V0_LIE and DW_HDMA_V0_RIE are initialized as BIT(3) and BIT(4) respectively in dw_hdma_control enum. But as per HDMA register these bits are corresponds to LWIE and RWIE bit i.e local watermark interrupt enable and remote watermarek interrupt enable. In linked list mode LWIE and RWIE bits only enable the local and remote watermark interrupt. As we are not handling watermark interruprt so removing watermark interrupt enablement logic to avoid unnecessary watermark interrupt event. Signed-off-by: Mrinmay Sarkar --- drivers/dma/dw-edma/dw-hdma-v0-core.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/dma/dw-edma/dw-hdma-v0-core.c b/drivers/dma/dw-edma/dw-hdma-v0-core.c index 88bd652f..aaf2e27 100644 --- a/drivers/dma/dw-edma/dw-hdma-v0-core.c +++ b/drivers/dma/dw-edma/dw-hdma-v0-core.c @@ -197,23 +197,13 @@ static void dw_hdma_v0_core_write_chunk(struct dw_edma_chunk *chunk) struct dw_edma_burst *child; struct dw_edma_chan *chan = chunk->chan; u32 control = 0, i = 0; - int j; if (chunk->cb) control = DW_HDMA_V0_CB; - j = chunk->bursts_alloc; - list_for_each_entry(child, &chunk->burst->list, list) { - j--; - if (!j) { - control |= DW_HDMA_V0_LIE; - if (!(chan->dw->chip->flags & DW_EDMA_CHIP_LOCAL)) - control |= DW_HDMA_V0_RIE; - } - + list_for_each_entry(child, &chunk->burst->list, list) dw_hdma_v0_write_ll_data(chunk, i++, control, child->sz, child->sar, child->dar); - } control = DW_HDMA_V0_LLP | DW_HDMA_V0_TCB; if (!chunk->cb)