Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp790663rdb; Fri, 2 Feb 2024 04:20:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzua6ZRih5YpxFGxmFt7mST5O3xeW5X8vPH6Vq9lYp1KJ7F0eBfy/YyT8a4vaFVLTtBSsi X-Received: by 2002:a05:6870:b50e:b0:218:5655:1b83 with SMTP id v14-20020a056870b50e00b0021856551b83mr1743182oap.47.1706876452293; Fri, 02 Feb 2024 04:20:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706876452; cv=pass; d=google.com; s=arc-20160816; b=ew3CHr7a7vK3y4FhIbud+tPw4t+iEZ3Vl6Y6+Fd/+TxVZakbb4uUJhZh8lWOY4sBCj e4vyUcF+F7dHA3MqzKgThL1ffd0q749ryDZ0laSEoecZsPb6y2uApKmPA0aRe1OCk3DA kob/IfsHG519xS8dhkZnkHp1CoYf5pOPRjVstOSrnQ2f1cMT91B3XmxvY8qdyyQrp0Bw YV4dlVICkIrx9h6ttYhn2SXNhzwTFEd7AFQ9BfP2TFwr6J/TX8atMXNOsGhDBWacDYgD ZDWrYzDXI5MVVlxdUaxQ+JfBnMqxQLS/fn+X8mfs87SXPfv+ryD6FyKpWxqg/+te2l6U 2CDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:to:from:date; bh=5GKDwX8G08AHEu+KVLkvj87DNMfRE2njrepmGH1Q+XY=; fh=oNoRUkUbID+kABI/hAgAwAI1g7rhHG238UiVnZWj6bo=; b=mjO5D8AEyJA4H51XTAlJ2N9L2q486tey6T65NuzDj0DiaWILvw/kD4qUsRb27s+XQR vXML+/WtWT6vfCr1j4ZWO1z810uZFNyzZvmqjvCDCnY0xPrUFMXsOb7APD007qv8GPpA mc04YGqKRYVWlV2+HQH5RVBhUYgHexr1AGHTNrrnHqM8s97yxhHE/4uwKszB3xYn7U9K IyNq+bR+th4e/BucxQDJhkQeYhfBerOx921+ds5qt6apbSMkifJstqqDKIfZJJXPrjmI mUmkvVTSdsHdoTUgjqRhTiAJ8J+WabMg/LEDgNFvupQNcunwAr0yW/KtWFPlJrum7E7M bp1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=runtux.com); spf=pass (google.com: domain of linux-kernel+bounces-49797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49797-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCX4JpUXmNQX0iZb7C2+6PjIjDk8lP++RiiS9K/LX2FsIHFid9jWmbJyuMmTSONuoQ7qFUHx+1Nfgdf8eDC8dat9IRWXfJNqwHEQSsybWQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e6-20020a635446000000b005cf29b05cf5si1485819pgm.767.2024.02.02.04.20.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:20:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=runtux.com); spf=pass (google.com: domain of linux-kernel+bounces-49797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49797-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 485DE298CB7 for ; Fri, 2 Feb 2024 11:53:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13E1A13DBA7; Fri, 2 Feb 2024 11:53:43 +0000 (UTC) Received: from tux.runtux.com (tux.runtux.com [176.9.82.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B292113D4F7; Fri, 2 Feb 2024 11:53:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=176.9.82.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706874822; cv=none; b=fcgd2yR3Lrs1/62VcT9ccAuyS3B+JbP8NsRToNlGuroDgK6EJ2jP4nUtGzVAzpKstXw5utAW24wugp9is6zcZDUS20mmxE94cjGKxTVvZsS/KAyjV2yx9qgY9npE4/Ik8ryOakhNu8J9Hd2y6PUi9T6V5QigTuPTXVqIq2YiOkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706874822; c=relaxed/simple; bh=jQIfwxFoKOkcBPKJK6tyu/de2q5LnbkqHpinptTj9HA=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=eyatf5t4omJs4fJUlqgImQNWXEG93TY+Lnao5OV7UO0UluhvssjmRlVYGUXSSu5+1G33xCYn9WdM0X4clHv3w1rCSd0aUfiJxFn1qn4LO3hNNKnXZzxhwLo6EDN7HY94OckiUuo5Lbnl9ZxsXWA2aBZxRDKtp/xpMivCS0Pa+Qk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=runtux.com; spf=pass smtp.mailfrom=runtux.com; arc=none smtp.client-ip=176.9.82.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=runtux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=runtux.com Received: from localhost (localhost [127.0.0.1]) by tux.runtux.com (Postfix) with ESMTP id 7AC3B6EF56; Fri, 2 Feb 2024 12:53:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at tux.runtux.com Received: from tux.runtux.com ([127.0.0.1]) by localhost (tux2.runtux.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id TqhPD8BT3CxP; Fri, 2 Feb 2024 12:53:31 +0100 (CET) Received: from bee.priv.zoo (62-99-217-90.static.upcbusiness.at [62.99.217.90]) (Authenticated sender: postmaster@runtux.com) by tux.runtux.com (Postfix) with ESMTPSA id 453346EF4C; Fri, 2 Feb 2024 12:53:31 +0100 (CET) Received: by bee.priv.zoo (Postfix, from userid 1002) id BD3AD469; Fri, 2 Feb 2024 12:53:30 +0100 (CET) Date: Fri, 2 Feb 2024 12:53:30 +0100 From: Ralf Schlatterbeck To: Mark Brown , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/1] spi-mxs: Fix chipselect glitch Message-ID: <20240202115330.wxkbfmvd76sy3a6a@runtux.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-ray: beware User-Agent: NeoMutt/20180716 There was a change in the mxs-dma engine that uses a new custom flag. The change was not applied to the mxs spi driver. This results in chipselect being deasserted too early. This fixes the chipselect problem by using the new flag in the mxs-spi driver. Fixes: ceeeb99cd821 ("dmaengine: mxs: rename custom flag") Signed-off-by: Ralf Schlatterbeck --- For oscilloscope screenshots and a verbose explanation see my blog post at https://blog.runtux.com/posts/2024/02/01/ History: Omit the line break change from patch requested by Marc Kleine-Budde drivers/spi/spi-mxs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 1bf080339b5a..88cbe4f00cc3 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -39,6 +39,7 @@ #include #include #include +#include #define DRIVER_NAME "mxs-spi" @@ -252,7 +253,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, desc = dmaengine_prep_slave_sg(ssp->dmach, &dma_xfer[sg_count].sg, 1, (flags & TXRX_WRITE) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, - DMA_PREP_INTERRUPT | DMA_CTRL_ACK); + DMA_PREP_INTERRUPT | MXS_DMA_CTRL_WAIT4END); if (!desc) { dev_err(ssp->dev, -- 2.20.1 -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: www.runtux.com Reichergasse 131, A-3411 Weidling email: office@runtux.com