Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp160325rdb; Thu, 1 Feb 2024 05:15:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxpNNO7tzYxhYxj8OkBw/+taEgob/+c1Y3G4AjasvCc9nhi3khCHwlHspFDQ/AqEQsnVhy X-Received: by 2002:a17:906:af19:b0:a36:49f6:ffd2 with SMTP id lx25-20020a170906af1900b00a3649f6ffd2mr4527656ejb.29.1706793358081; Thu, 01 Feb 2024 05:15:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706793358; cv=pass; d=google.com; s=arc-20160816; b=Wbo8auIn2RG5PXyEJNy5mPSEpqH+88mosq48BCP1qv67jpscremGWT5Q4I0Mj7MzBo Kz8zutdYnsTUBZAyS7ms/c66jEb9P6ifF1Kt+5BBjxAU+49bQMXJhCDHOVOlMySHPZP8 xgOvpMseFdWtZkGcNBt1sBQ2+HUXY97IeM6f2Hqw9CNpDZcar5l40KnQfwEWiSt3GrnI D0BhUJBWdLlFdO4iBkXS80VaWXBnyeuJQJ4gKZQIrNIVJyU6PvtC/NWojuFqXQV/2jjS NEzfMHWDFhxhMyd+vStivKSXFrgyKEs8b5ioW+WrK0Xn7gCH2Li50Egcl1B6EaDk7KlX hpwg== 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=/gD+0EOoexmNMHK4T7b8H6VfjUCqwd+G/hCJeCClaIw=; fh=QWyr0YdNNTSXOUYjY+PC5uODl1lP0qEEOppWFNUGmYo=; b=E2fLa1T2Vn8AXb1HvJ+v0dpv1aFy7EsXUYNBzCa0lKM9CX8VNkkSZ1OVAz1oTk9De8 HsMyJdMm508MvHxKd4XAAyFAAYL8lsEiIzKqcXwdhp+PYjRxKRj75YKdrzl32/feLPgt VSxWzDizjJy7O+ISkn+dZTxrVtdgCAvxIsdGdDA6G4xYp65V7JFwopoPou17ZxcBOFsF I/RSqghUXmRhRCj2fYBVdo5GbqOMtQe2Yr63/Pvl80qTVFgAclioQmk2INymhOwoS7rf +yHub1N8DqE0QRZgTUycNGhSFgB+KH/o38AQYew8hm0N27iJFBpO/VMjoaL+rhCl7gz/ /40w==; 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-48212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48212-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCV0T/2FPuNVxjmvB10pa6p3HbRcJ+kUvwndVuhGdvMGZBwdAUNYA/zHnwmeBNBsQKoRWNtHjMnOTzH64hwFK58iDrt1Qfv8tmXonoMnUw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d14-20020a170906370e00b00a3671264090si1797583ejc.271.2024.02.01.05.15.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 05:15:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=runtux.com); spf=pass (google.com: domain of linux-kernel+bounces-48212-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48212-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C84F81F27F7B for ; Thu, 1 Feb 2024 13:15:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8357853382; Thu, 1 Feb 2024 13:15:48 +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 8293D5336F; Thu, 1 Feb 2024 13:15:46 +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=1706793348; cv=none; b=W375kFv3MEWG/01oUL6RUlX4oZdzirBmetHJD3/hyK8tm/nVWCTE6hpCZe42fhZkF7b3H0wdtVOzFS2+dlDSa5CObK/yQ5HBrlqmMEzH1hlvQLl3oNJNR/c4tjnwoqtzkHLC1CEj3fzoT5TWsbZQPvsF7UnFakr8o2ZXNNVH9L4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706793348; c=relaxed/simple; bh=CN3V6/jyU6TYc7JhVGapD4+ahcpnC9dXp60iMREooAc=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=MQW3wLd06wODxi1t8ZCU6X3XTGvd6BTQ11UEe1WqKpn2VILa6uaBWY9rPijXA8QCqVDNdmYbSH8CF13pEyE7P2xTRGEt3+IXYy/Ft9UCiMvhMXDOXEcAxJCDlBkHsWtz5qwso7JOv9V76zn6Z4aK7MWvP2MQ+1kzzg5libIot5Q= 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 8D3E06EF8E; Thu, 1 Feb 2024 14:15:43 +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 d--Q9PqJXrM2; Thu, 1 Feb 2024 14:15:42 +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 7A6BA6EF20; Thu, 1 Feb 2024 14:15:41 +0100 (CET) Received: by bee.priv.zoo (Postfix, from userid 1002) id 0BC85469; Thu, 1 Feb 2024 14:15:40 +0100 (CET) Date: Thu, 1 Feb 2024 14:15:40 +0100 From: Ralf Schlatterbeck To: Mark Brown , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Vinod Koul , Miquel Raynal , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] spi-mxs: Fix chipselect glitch Message-ID: <20240201131540.3dlqoxlrrbzshz7w@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/ drivers/spi/spi-mxs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 1bf080339b5a..a296050c8bd3 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" @@ -251,8 +252,9 @@ 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); + (flags & TXRX_WRITE) + ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, + 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