Message ID | 20200228210552.615672-24-seanga2@gmail.com |
---|---|
State | Superseded |
Delegated to: | Andes |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=jCPkXi9y; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Thyl5zbrz9sQt for <incoming@patchwork.ozlabs.org>; Sat, 29 Feb 2020 08:10:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 22B41813AD; Fri, 28 Feb 2020 22:07:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jCPkXi9y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 95A6A81269; Fri, 28 Feb 2020 22:06:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8FEF98124A for <u-boot@lists.denx.de>; Fri, 28 Feb 2020 22:06:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qt1-x841.google.com with SMTP id i14so3078825qtv.13 for <u-boot@lists.denx.de>; Fri, 28 Feb 2020 13:06:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ei9G0DkccgM5vWS/mjvKe8MjxSurh0M5bzEqjv213p4=; b=jCPkXi9yVHfNw84GLb24JnLdL0xqZGoretpY45znqQ2i08m6lq9TnZ04QVj+NYc9VG aqZYFquzaESpTUOPVjc2YE+LC3tO3uiuQCslwVP6gFEbXYDB6DSMGQ7tDJzVTagJfU/a mzc+QiFHoUMUMA6crWm77+m3fAMJ2LBAIMHFQXKE5x6NLQK5ZmjP0igMsTLq5WcWMr0s EsrnS5565mfbHx5TOYnLtfIh6br0NOD29zUVgGlulVJNg8xl4JfY8kRrCtTYQO2tBGar 0E33LUj8JtRoeCx0ifpuHF4UC6M0ERyXAqcgVEGpmCDm7r+GRXCPB2IrJV2adBhPq7Fz UWog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ei9G0DkccgM5vWS/mjvKe8MjxSurh0M5bzEqjv213p4=; b=Oa/9Q6M/lnVl9pbid+MWiyGaVdTTHx8QIrs0IjmPYencbUw1Ov+LPedu/asLfOhB0H mHRI6aqVdG+MsBVlwoOIJPAwOI+nJOt6RkRaJjXzzctogTM8pnwLBtCeS+D8Y7oHeD4B p9w6K1tyQ2tzGoubH03aQveH2p+2ew5F4NGk+tDlE/LtIuI1rl5b+Hh29TCgV1VrEypP RcGt4wLz1mvWeR2fdT0PtoWnGjyrPpTUeEMTO+SSWin0RkbGoZq9dbTlXJ2f9vzA5d3u kRiCaqAdbPEvbCNHWfX8myDQqzoFzsZat+c3WpSSZjKWsvX26rhcbgNMb226FulULQ9P gVpQ== X-Gm-Message-State: APjAAAWSorskb1DjMxX4OvHXb1jgVprVGMGNouaiKSmCo7YBf/Qo6MGh DFzQmR1m0WNjYPFAFOzK4GCKq3eAJjU= X-Google-Smtp-Source: APXvYqzePH7FPcFL+/SB3+EtSa84DoYmoETPz4GpxoJigvoi8p7EFMssaIMeoaqaJ2T+sfBopygfIg== X-Received: by 2002:ac8:7695:: with SMTP id g21mr5271990qtr.99.1582923995296; Fri, 28 Feb 2020 13:06:35 -0800 (PST) Received: from localhost.localdomain ([75.102.135.197]) by smtp.gmail.com with ESMTPSA id f21sm1509571qtq.16.2020.02.28.13.06.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 13:06:34 -0800 (PST) From: Sean Anderson <seanga2@gmail.com> To: u-boot@lists.denx.de Cc: Rick Chen <rickchen36@gmail.com>, Bin Meng <bmeng.cn@gmail.com>, Sean Anderson <seanga2@gmail.com>, Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>, Jagan Teki <jagan@amarulasolutions.com>, Simon Glass <sjg@chromium.org> Subject: [PATCH v5 23/33] spi: dw: Properly set rx_end when not recieving Date: Fri, 28 Feb 2020 16:05:41 -0500 Message-Id: <20200228210552.615672-24-seanga2@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200228210552.615672-1-seanga2@gmail.com> References: <20200228210552.615672-1-seanga2@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
riscv: Add Sipeed Maix support
|
expand
|
This patch should not be included. I meant to remove it (and it gets reverted in the next patch), but I made an error during rebasing. Sorry for any confustion. --Sean
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c index 613eb0d0e6..b80e99ee7f 100644 --- a/drivers/spi/designware_spi.c +++ b/drivers/spi/designware_spi.c @@ -427,7 +427,8 @@ static int dw_spi_xfer(struct udevice *dev, unsigned int bitlen, priv->tx = (void *)tx; priv->tx_end = priv->tx + priv->len; priv->rx = rx; - priv->rx_end = priv->rx + priv->len; + /* If we aren't recieving, rx_end needs to be valid for tx_max() */ + priv->rx_end = priv->rx + (rx ? priv->len : 0); /* Disable controller before writing control registers */ spi_enable_chip(priv, 0);
The difference between rx and rx_end is used by tx_max when calculating how much to write. If we aren't reading anything, this could cause us to let the tx fifo bottom out. Signed-off-by: Sean Anderson <seanga2@gmail.com> --- Changes in v5: - New drivers/spi/designware_spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)