From patchwork Tue Nov 16 11:20:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12692749 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08045C433F5 for ; Tue, 16 Nov 2021 11:31:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C16476141B for ; Tue, 16 Nov 2021 11:31:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C16476141B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SFUyZW0xWB7CVKdgm0nyb/aGSxWhF8b6IavVOejbwTs=; b=FZX+590THO5Bb4 INppEJzVKoQy7o5WA3yve6jaOoFbU9txvcjFmaB3lr8zuCdiyEpbi3VkAfEmpt8A8YGnOOnJ5NziD uEw3aHxYdBYFgDi0RGzhmoXY1LJJj58XUQVvTJTJ3Ywk4P+OZlq0iY/aTct8RDDKgw06HT5yTCGRV +3GdTc9rVa+9yf5BYk2+GQeXvL3V9W13hxZG8dW/F5uefbbTpXjL36n1yBzixKVXdBZj/gH6jTgBy i1+tpU02Gzq1MZIoRgtVk0JMEPVP/pNOB6H1ZzQAr5mZDOXPju9gG2aV9tlEjeZ64fT0CaftQvljF cxnL7gEwATnMWTGPaq9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmwex-001RZI-Jf; Tue, 16 Nov 2021 11:29:56 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmwWm-001OBD-Vv for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 11:21:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1637061688; x=1668597688; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WIpbBPu+LDILnDfRZxv4mO7fUQqnAghfChRhfJnCk4s=; b=BAdNco0wZGRTobNt/JhfPZs9DK59Fk14DyKStapxsGl0G6tR31TY6RXt lySaMUko1rLwcura+JlqNIXJokjSRmgtB7diy7x+D6LheUxaKJktk++Vo eRODYaqy52FM6qTpxl4gLv8/OuJS8C29BgG3JYSXnhx1vPB/NgZrUwxqB kuf0T6jpyLcRWCEdtH/ByOeEH3Jn3p4oySBPb9bV8oQVkrEPgVr8rOs+3 MpMZthnyMzPHE8vMS7iPlq428Xj32i7ajBeAx4weAzEdQY0Fwj/Ydjusm Oj7LtBS0YSQfJAp9sMHxhGRDe+4AvOO8Zogk5dJPOrIIQFpDWkkNiKEMu w==; IronPort-SDR: UJTd3fqXcByB4684k5Xcsv1qqUyJGo9NJsIK5Ns6PXs1zkKvKFpIzlkMPqCh3Urt1ctD/I8QCR wc9Wkc0fuVKzAwd+2oxGAoYd2sPV6ENaCg2aOEp4YoloplUsu6K/tNFSjFUz3yVmRMuVAaXc2+ X0oYi3La+NuzJYO2lOWgB9Zcczvbwa6FywPfEyFsff7bJ8dSrrQXNjuynbPW6uoLO3qFxFDewD /sJU1TPrfL5kIP7itZjd9w2+O8pE/LBvG2g3AvWQf67RzNSMM7tw2oZseu7dXc7AKzgNcdAyl3 WL2a3tDBKzuhoDAM7aE6PTJG X-IronPort-AV: E=Sophos;i="5.87,239,1631602800"; d="scan'208";a="152085434" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Nov 2021 04:21:28 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Tue, 16 Nov 2021 04:21:21 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 16 Nov 2021 04:21:18 -0700 From: Tudor Ambarus To: , , , , Subject: [PATCH 11/13] dmaengine: at_xdmac: Fix lld view setting Date: Tue, 16 Nov 2021 13:20:34 +0200 Message-ID: <20211116112036.96349-12-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211116112036.96349-1-tudor.ambarus@microchip.com> References: <20211116112036.96349-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_032129_102369_3D15B456 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, Tudor Ambarus , mripard@kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org AT_XDMAC_CNDC_NDVIEW_NDV3 was set even for AT_XDMAC_MBR_UBC_NDV2, because of the wrong bit handling. Fix it. Fixes: ee0fe35c8dcd ("dmaengine: xdmac: Handle descriptor's view 3 registers") Signed-off-by: Tudor Ambarus --- drivers/dma/at_xdmac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 89d0fc229d68..ba2fe383fa5e 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -99,6 +99,7 @@ #define AT_XDMAC_CNDC_NDE (0x1 << 0) /* Channel x Next Descriptor Enable */ #define AT_XDMAC_CNDC_NDSUP (0x1 << 1) /* Channel x Next Descriptor Source Update */ #define AT_XDMAC_CNDC_NDDUP (0x1 << 2) /* Channel x Next Descriptor Destination Update */ +#define AT_XDMAC_CNDC_NDVIEW_MASK GENMASK(28, 27) #define AT_XDMAC_CNDC_NDVIEW_NDV0 (0x0 << 3) /* Channel x Next Descriptor View 0 */ #define AT_XDMAC_CNDC_NDVIEW_NDV1 (0x1 << 3) /* Channel x Next Descriptor View 1 */ #define AT_XDMAC_CNDC_NDVIEW_NDV2 (0x2 << 3) /* Channel x Next Descriptor View 2 */ @@ -402,7 +403,8 @@ static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan, */ if (at_xdmac_chan_is_cyclic(atchan)) reg = AT_XDMAC_CNDC_NDVIEW_NDV1; - else if (first->lld.mbr_ubc & AT_XDMAC_MBR_UBC_NDV3) + else if ((first->lld.mbr_ubc & + AT_XDMAC_CNDC_NDVIEW_MASK) == AT_XDMAC_MBR_UBC_NDV3) reg = AT_XDMAC_CNDC_NDVIEW_NDV3; else reg = AT_XDMAC_CNDC_NDVIEW_NDV2;