Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3572378ybd; Tue, 25 Jun 2019 05:03:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxImiTZzDBYfm0acEc2KpeXBWFsTWBJyBnCteHD94Fi9iZ1tRF4PntLUso8BlhekRq3+vj X-Received: by 2002:a17:90a:3ae8:: with SMTP id b95mr30797207pjc.68.1561464239135; Tue, 25 Jun 2019 05:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561464239; cv=none; d=google.com; s=arc-20160816; b=XfL9J5h0kp7NooNSP8UDKZnjogpSIC7yJcfFPZrg0dnQWKIk3lkyRWbPDFIamTmRw6 WFVfyLKb/ny87uRWsMSGA0Duv/cjoQ01AMO02PMYqwr93OtuJWL3riwoX1YSJ2fPKQ1c gZDTV8WnL2UtvYRZsYQtmuTbbHcSRTLIB8aGlru4Mz/NG5S1cLJ+fLuP0Zlc6S31sRZL W2ICblKD3i7GZ7MH4GuRNNyb1poE00+2ZcBHQpebtjqlCEsVcaBUzKSFOOnORxyagfrd I67HOGtRpk83jYZ647kvxX53e4hqHkua1nx8j2Me2wCnxed9tlODb4drHZXzK3NAGUms UsOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=7V63zFQrjnSsK+KZ0qZNa8rdgcNFUNZqkrfX3KKfLjw=; b=LzkPVLvY3JqFwR1Uw/B7kIfXNlx0XOEZLQFNduLL3xbuCWLeS4pkn8RRaCmt/xz9pP osJqNIAxOTzr8KWqSybAnY0Xfmh9uxoJlSkUXyN8Q6PZ+JVPW+Bq4gs0Y2hfyzbjgBEC seE6In4R3FwHS8mhG5qgKbgvjgEpnHJTkscPtPO43lrUPZbsVbfgyk9YvxXfAfL+xdIT KAC5s0IwwnMSrvSAeP973h/Tpj249/J09QSVMmfHfb3e6CXO8pc7sjycqW7veD69qSBb 2FTCFIwwPYabaKkTJOhAGnak6J2ly9EnsMQWCaE/NlmIhbierHawsW+Tp+iOtEx8Iqyp TW8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10si993496pjl.77.2019.06.25.05.03.41; Tue, 25 Jun 2019 05:03:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731676AbfFYJlz (ORCPT + 99 others); Tue, 25 Jun 2019 05:41:55 -0400 Received: from inva020.nxp.com ([92.121.34.13]:34946 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731615AbfFYJlx (ORCPT ); Tue, 25 Jun 2019 05:41:53 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 490131A078A; Tue, 25 Jun 2019 11:41:50 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id BB1F21A0774; Tue, 25 Jun 2019 11:41:42 +0200 (CEST) Received: from mega.ap.freescale.net (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id E8D7440313; Tue, 25 Jun 2019 17:41:33 +0800 (SGT) From: yibin.gong@nxp.com To: robh@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, mark.rutland@arm.com, vkoul@kernel.org, dan.j.williams@intel.com, angelo@sysam.it Cc: linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH v5 3/6] dmaengine: fsl-edma-common: version check for v2 instead Date: Tue, 25 Jun 2019 17:43:21 +0800 Message-Id: <20190625094324.19196-4-yibin.gong@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190625094324.19196-1-yibin.gong@nxp.com> References: <20190625094324.19196-1-yibin.gong@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robin Gong The next v3 i.mx7ulp edma is based on v1, so change version check logic for v2 instead. Signed-off-by: Robin Gong --- drivers/dma/fsl-edma-common.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index ba74e10..44d92c3 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -658,26 +658,26 @@ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) edma->regs.erql = edma->membase + EDMA_ERQ; edma->regs.eeil = edma->membase + EDMA_EEI; - edma->regs.serq = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_SERQ : EDMA64_SERQ); - edma->regs.cerq = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_CERQ : EDMA64_CERQ); - edma->regs.seei = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_SEEI : EDMA64_SEEI); - edma->regs.ceei = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_CEEI : EDMA64_CEEI); - edma->regs.cint = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_CINT : EDMA64_CINT); - edma->regs.cerr = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_CERR : EDMA64_CERR); - edma->regs.ssrt = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_SSRT : EDMA64_SSRT); - edma->regs.cdne = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_CDNE : EDMA64_CDNE); - edma->regs.intl = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_INTR : EDMA64_INTL); - edma->regs.errl = edma->membase + ((edma->drvdata->version == v1) ? - EDMA_ERR : EDMA64_ERRL); + edma->regs.serq = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_SERQ : EDMA_SERQ); + edma->regs.cerq = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_CERQ : EDMA_CERQ); + edma->regs.seei = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_SEEI : EDMA_SEEI); + edma->regs.ceei = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_CEEI : EDMA_CEEI); + edma->regs.cint = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_CINT : EDMA_CINT); + edma->regs.cerr = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_CERR : EDMA_CERR); + edma->regs.ssrt = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_SSRT : EDMA_SSRT); + edma->regs.cdne = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_CDNE : EDMA_CDNE); + edma->regs.intl = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_INTL : EDMA_INTR); + edma->regs.errl = edma->membase + ((edma->drvdata->version == v2) ? + EDMA64_ERRL : EDMA_ERR); if (edma->drvdata->version == v2) { edma->regs.erqh = edma->membase + EDMA64_ERQH; -- 2.7.4