Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp855584pja; Wed, 1 Apr 2020 09:54:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtHQL211Drzi8hcDwbLnXEAgpSx1Xk68FFlUwvs3AFS66eueJM1G6AD/yz2HW1joyzwca/P X-Received: by 2002:a9d:7f05:: with SMTP id j5mr18094992otq.312.1585760097424; Wed, 01 Apr 2020 09:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585760097; cv=none; d=google.com; s=arc-20160816; b=SXQZ7M7R43Vi7HyI6OOPTbLq2A7DfwK8oY87rBy86vDiS6qwjEAwdqxMz1nYtgaiiZ z50YZtmgf5AqsFmvFLCzR6P/nEzFK6f7ChGqfahGYJxJ2Q/VtuyIw4wONNfvLicTb6sA vlZSjCMTaC9Z3rwUqrQVIzav8RJgF1rqoMXHzt1MnBEJmwoBRDYQKv5uS81nNqXk8oLO QKq3G0JulnXPUrfVLLaxblCKW4L2gPHyx9AYkSkP+eazqrcIyoKlLK559tlW5T4P9Wnr CGMLqhDaSbGlLo4RWo0mTQy0OHh51n19EhWBGzs9dVncX7sGJRc4+5rZIitRKrPOxAfT 5dZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5kJX+bb/ckxzzSBF6BC/FCsHT4A0lQr2HxasYpRkvuQ=; b=1I9WLNcSkyZYQFQFeZ3IlaEKQ3m9HAlOyPyb1w95LVOToY4HzkQA7t7QK5DuXPyFmq BzoY5iaGntbf2KSHwWHvqntLvEMeIzprxKEVV4ONA7uEuJQWQeFgrh0cvm7oKw3QoP2R XNPsxF/GG1mwhyB/ehf2kk0suSu0Qrw1d6PaNG9QdpqLXe5/5fZ7DVPppm7g4ixgCllz sZNWG0pk4Z+MsPrimmN68GG/v1Fxx1LOkYRcqeLb/QanBb5GdBCHdsH0+vvPvPPTydxd tiBi7dJp4lEy9yhwqOPlDTl83d4f5GJrQi8NKydQECa3d6+LQk7QqR2XIx6RTCz60qFO uvIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bkl0e3MQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si978656otp.314.2020.04.01.09.54.44; Wed, 01 Apr 2020 09:54:57 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Bkl0e3MQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388289AbgDAQyM (ORCPT + 99 others); Wed, 1 Apr 2020 12:54:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:55686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388192AbgDAQ35 (ORCPT ); Wed, 1 Apr 2020 12:29:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6D09D20658; Wed, 1 Apr 2020 16:29:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758596; bh=ZimnssbihiT/CUcvGjrmtWm5fbdnfn+B5wH6DVTDZMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bkl0e3MQ+Y8Injaby/swcnOzVm5JBff5wxo3r9w+iA9QiKz4m/UTEr+R57/Br6ejv LX4K7vsUTsz2vPch3bVShxAwDZS0Gqg1XnYBIrSFCc4UekljvJr7CwTwv771PP5DXh 76CDi3/vW4l73UplbuFk0K6sRm/5A2A8KE7X12l0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thommy Jakobsson , Naga Sureshkumar Relli , Mark Brown , Sasha Levin Subject: [PATCH 4.4 04/91] spi/zynqmp: remove entry that causes a cs glitch Date: Wed, 1 Apr 2020 18:17:00 +0200 Message-Id: <20200401161514.491966420@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161512.917494101@linuxfoundation.org> References: <20200401161512.917494101@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thommy Jakobsson [ Upstream commit 5dd8304981ecffa77bb72b1c57c4be5dfe6cfae9 ] In the public interface for chipselect, there is always an entry commented as "Dummy generic FIFO entry" pushed down to the fifo right after the activate/deactivate command. The dummy entry is 0x0, irregardless if the intention was to activate or deactive the cs. This causes the cs line to glitch rather than beeing activated in the case when there was an activate command. This has been observed on oscilloscope, and have caused problems for at least one specific flash device type connected to the qspi port. After the change the glitch is gone and cs goes active when intended. The reason why this worked before (except for the glitch) was because when sending the actual data, the CS bits are once again set. Since most flashes uses mode 0, there is always a half clk period anyway for cs to clk active setup time. If someone would rely on timing from a chip_select call to a transfer_one, it would fail though. It is unknown why the dummy entry was there in the first place, git log seems to be of no help in this case. The reference manual gives no indication of the necessity of this. In fact the lower 8 bits are a setup (or hold in case of deactivate) time expressed in cycles. So this should not be needed to fulfill any setup/hold timings. Signed-off-by: Thommy Jakobsson Reviewed-by: Naga Sureshkumar Relli Link: https://lore.kernel.org/r/20200224162643.29102-1-thommyj@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-zynqmp-gqspi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c index f23f36ebaf3dc..bd3945a5660a5 100644 --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -414,9 +414,6 @@ static void zynqmp_qspi_chipselect(struct spi_device *qspi, bool is_high) zynqmp_gqspi_write(xqspi, GQSPI_GEN_FIFO_OFST, genfifoentry); - /* Dummy generic FIFO entry */ - zynqmp_gqspi_write(xqspi, GQSPI_GEN_FIFO_OFST, 0x0); - /* Manually start the generic FIFO command */ zynqmp_gqspi_write(xqspi, GQSPI_CONFIG_OFST, zynqmp_gqspi_read(xqspi, GQSPI_CONFIG_OFST) | -- 2.20.1