Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp984459rdb; Fri, 19 Jan 2024 05:02:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSvdQh6c0vfCyjtFmxZt4acjewNK4/9vivkbtrvaslrlxtMGZjDwEQF1/h9rS/toGF8CVd X-Received: by 2002:a05:6214:d06:b0:680:fa16:a40f with SMTP id 6-20020a0562140d0600b00680fa16a40fmr2477047qvh.36.1705669344087; Fri, 19 Jan 2024 05:02:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705669344; cv=pass; d=google.com; s=arc-20160816; b=fLxnNfbFlFgytaK7VkvLsbmlXX1MvPja2l5g4cEsQyFAH6Rruv9Ti3AprL5muwmYqa 33sAmID5Sefl8qc+0xOxFtfWcLf8ZRfpXTRiEiNJss30aNJYBWq9o/iHM8267HsyL8Rh Q3dk0bB2I1TrgyF+s3+q7n+To4wm04fE0Ea5BwOsaObG71OVScBKCApVLHYSMlrpy1FU 7ppEzgisVSaNw1oxnhf+x7MghorqICQZ1wIUNISHEtniX3Oir+gwwLA0obrkOsMZ+dqR zBoLvS7d+HN+bS2sqsMs7SXoLP+KeTS4h+xVtptxb5s6cGuh5RGar2stvW9xNnWiyqwA ycNA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=fK+ysfreXQCoYCrRDidxH8G6FWPAOE4Xo0Df71HiZKw=; fh=A9BXgcrlMZ5z9wYoTmuXIwTqeYf3DKZIOMrQtykU1fI=; b=vNaqzdi3FvuSoDWEAu8JlrqhE064MzP+RC8wjfHi8uce345CulmbrXTMASIUbya3I7 /6O5l3ycAaSwMalIotPIOPLIGj7QRPruqBJ5EaogQt0e9l0wvrM4lk8+EVNbmqX/lM0V w4ml8B8L+wIpEm1t8BGWG/AH8ZDfU1WAtqQogwoYKU1M0GyKoEkNdjg0rZKB1EW2ILTp 0wHfBT1e+OHPcEkxiN0Smkelx7TKHa9aalX8l29nwHl+qBMOCR/KJE5NJ8sBF2G5WJmv 8DV8N+5diyN7XD4X7/y63MrPvVBfboD8UsTVTyBclyI5S7y4XB7oyBLIPpw3SAANqgst Ytlw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=l1SAwvsn; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-31162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l18-20020a0c9792000000b00682bfd263c0si1530871qvd.347.2024.01.19.05.02.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 05:02:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=l1SAwvsn; arc=pass (i=1 spf=pass spfdomain=qualcomm.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-31162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C5C5E1C20325 for ; Fri, 19 Jan 2024 13:02:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A4CB54664; Fri, 19 Jan 2024 13:01:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="l1SAwvsn" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 0BF2A537F8; Fri, 19 Jan 2024 13:01:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705669261; cv=none; b=ZS34LDnSsyKD1E/2fqzMXgAlShFJXBeHsGYbqwUJzsNPxh07mWKDrRCmcf7dBU8vLLCtKeZwxoMXI6akVA2bOmZSwuRlsPDgFQXQrQiW1ywbp439BwerBKupLGhXvoKqjODfdpY5q7m6k5FreGGTF41RfhdCHEnH8BdNIjkstYc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705669261; c=relaxed/simple; bh=jX++M430EcANMENTDtP9yb5IhDtDJ5Z2fZ7ZYqDAREE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=UF0OytzyReHod+UpVkTPv/vYmQGTr2RKhFWUTy1ptcLoPSPf2hhdXmLUssa95N2wcd443QV0EbvJpZfVm/N+QyXL7n5pZYj+QVYppdagoPs4b0M07yZB3Pq/Cc6dkTQEKj9guN3vhwEkINGioTRpQezGDzDQ6KPhp9Or+tDbu28= 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=l1SAwvsn; arc=none smtp.client-ip=205.220.168.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 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40J9FRuv025502; Fri, 19 Jan 2024 13:00:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= qcppdkim1; bh=fK+ysfreXQCoYCrRDidxH8G6FWPAOE4Xo0Df71HiZKw=; b=l1 SAwvsnRzclC6ZNnViiJkoMcIH/kygWCF6FgiHLjIDQgxyCIoD4RTZWIZg2d5e9RF 6xEgVYLaaVWsKqiag9a5HuTViAG0Nz6LO8EeQC535ADy92D3BA+wgDf3EU3llQOx tYDllR8T4J4CDh6HwnMLqF7dymlosZK/wB9ZksWCgNGAFUn+l2slW60FFWVXn5Rt lJ0rEy4jHVsbpYtaSry/deaKcGtmQKEWOJLkh5HLokmyJDYUBi8X9hR8Nhb79L89 fDdQZSa5Pbeub1TIgQSf9Z6O3B8RyppFuwiCH0M/eYrkgb+wffKq91B1MDTrn0n7 b3H0OKUr0C9fcSkAziww== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vqh2k90ub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Jan 2024 13:00:45 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 40JD0Wfh023730; Fri, 19 Jan 2024 13:00:42 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTPS id 3vkkkmtgs8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 19 Jan 2024 13:00:42 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 40JD0fbb023804; Fri, 19 Jan 2024 13:00:41 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-msarkar-hyd.qualcomm.com [10.213.111.194]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 40JD0fN1023801; Fri, 19 Jan 2024 13:00:41 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id 5BE75273A; Fri, 19 Jan 2024 18:30:40 +0530 (+0530) From: Mrinmay Sarkar To: vkoul@kernel.org, jingoohan1@gmail.com, conor+dt@kernel.org, konrad.dybcio@linaro.org, manivannan.sadhasivam@linaro.org, robh+dt@kernel.org Cc: quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, dmitry.baryshkov@linaro.org, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, quic_parass@quicinc.com, quic_schintav@quicinc.com, quic_shijjose@quicinc.com, Mrinmay Sarkar , Gustavo Pimentel , Serge Semin , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Kishon Vijay Abraham I , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, mhi@lists.linux.dev Subject: [PATCH v1 4/6] dmaengine: dw-edma: Move HDMA_V0_MAX_NR_CH definition to edma.h Date: Fri, 19 Jan 2024 18:30:20 +0530 Message-Id: <1705669223-5655-5-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1705669223-5655-1-git-send-email-quic_msarkar@quicinc.com> References: <1705669223-5655-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: 2M1_j7cANaScCFkrQDV0zx96fN0Wmx4y X-Proofpoint-ORIG-GUID: 2M1_j7cANaScCFkrQDV0zx96fN0Wmx4y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-19_07,2024-01-19_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 clxscore=1015 impostorscore=0 phishscore=0 mlxlogscore=695 mlxscore=0 suspectscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401190066 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Manivannan Sadhasivam To maintain uniformity with eDMA, let's move the HDMA max channel definition to edma.h. While at it, let's also rename it to HDMA_MAX_NR_CH. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Mrinmay Sarkar --- drivers/dma/dw-edma/dw-hdma-v0-core.c | 4 ++-- drivers/dma/dw-edma/dw-hdma-v0-regs.h | 3 +-- include/linux/dma/edma.h | 1 + 3 files changed, 4 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 1f4cb7d..819ef1f 100644 --- a/drivers/dma/dw-edma/dw-hdma-v0-core.c +++ b/drivers/dma/dw-edma/dw-hdma-v0-core.c @@ -54,7 +54,7 @@ static void dw_hdma_v0_core_off(struct dw_edma *dw) { int id; - for (id = 0; id < HDMA_V0_MAX_NR_CH; id++) { + for (id = 0; id < HDMA_MAX_NR_CH; id++) { SET_BOTH_CH_32(dw, id, int_setup, HDMA_V0_STOP_INT_MASK | HDMA_V0_ABORT_INT_MASK); SET_BOTH_CH_32(dw, id, int_clear, @@ -70,7 +70,7 @@ static u16 dw_hdma_v0_core_ch_count(struct dw_edma *dw, enum dw_edma_dir dir) * available, we set it to maximum channels and let the platform * set the right number of channels. */ - return HDMA_V0_MAX_NR_CH; + return HDMA_MAX_NR_CH; } static enum dma_status dw_hdma_v0_core_ch_status(struct dw_edma_chan *chan) diff --git a/drivers/dma/dw-edma/dw-hdma-v0-regs.h b/drivers/dma/dw-edma/dw-hdma-v0-regs.h index a974abd..cd7eab2 100644 --- a/drivers/dma/dw-edma/dw-hdma-v0-regs.h +++ b/drivers/dma/dw-edma/dw-hdma-v0-regs.h @@ -11,7 +11,6 @@ #include -#define HDMA_V0_MAX_NR_CH 8 #define HDMA_V0_LOCAL_ABORT_INT_EN BIT(6) #define HDMA_V0_REMOTE_ABORT_INT_EN BIT(5) #define HDMA_V0_LOCAL_STOP_INT_EN BIT(4) @@ -92,7 +91,7 @@ struct dw_hdma_v0_ch { } __packed; struct dw_hdma_v0_regs { - struct dw_hdma_v0_ch ch[HDMA_V0_MAX_NR_CH]; /* 0x0000..0x0fa8 */ + struct dw_hdma_v0_ch ch[HDMA_MAX_NR_CH]; /* 0x0000..0x0fa8 */ } __packed; struct dw_hdma_v0_lli { diff --git a/include/linux/dma/edma.h b/include/linux/dma/edma.h index 550f6a4..2cdf249a 100644 --- a/include/linux/dma/edma.h +++ b/include/linux/dma/edma.h @@ -14,6 +14,7 @@ #define EDMA_MAX_WR_CH 8 #define EDMA_MAX_RD_CH 8 +#define HDMA_MAX_NR_CH 8 struct dw_edma; struct dw_edma_chip; -- 2.7.4