Received: by 10.192.165.156 with SMTP id m28csp976449imm; Fri, 13 Apr 2018 11:04:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Xl6Ydo2u9RfwZWf1L3IBmuq4fCO9e+PLzheOJdQ0xe3rVujCVz9RzT2Yj32+r1BhNtVoV X-Received: by 10.98.69.142 with SMTP id n14mr12314834pfi.42.1523642690582; Fri, 13 Apr 2018 11:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523642690; cv=none; d=google.com; s=arc-20160816; b=cXszVlyx3NAxcQevpDDwqKIASS8qUFHwQsHeKiQDiaLlKq5Kj65qYpsg7p4Ob63m63 8vD+mQOTm6hg9wrKDGSyxzVcYfgFXYMQpcUjZdmV7sXDf81eF7R2KKooRcoVkfWhFfaC zy/vRQjNqAklvPsVi4MY5POtjyRRhhDg2ZgLcXDSAbYYN4yuxBlOfyXTg+VV/dsORDVp 8j9Fvf/Y7G85iV1m/VjCe+P+3tguh3yLIG83GsTQ5QaOkVj6X1EDLFWDtrb6N46oPjPj sJiUuuq6kQmu/WmmS/qQc0F+cbvPnLslxX6RtGlik5jOWEiWmM9T7OSYaVQinPpLmgjS ghiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=kY7za5HJg+5aMSDFrI7S5+e4wlqQdUUWcC6kKmxkhmY=; b=QJTUDAz2wC47RN89b0g5VutsphgUmYuu8gHBRfB5ff+eXyXi4WQe09vv4X47i1xEAC jhJ1uiDO1ABT8Ex94Hh5My4n9Is3xHsDcYCn/cyx0f84TsFfUXoorvtRq/Np3buFOga/ lOF5DZzBWdM6YsGw8Qa6eE6AaF5OOwPmoxh0BNWoV9du6Wpa3BGZAYvJBHwBx75woUQN x/qrUoRKqtVAWTXilR+6Iv/9M4aac94ErJF2B/UYJab6SRzlwSWg4/xDHzOSYycjHStV mzWhilfDzFfOWMn8ZACF/0QCm4AjiFajuC+ynaSA0yM3w14b0ctRkXRRL3XOT1jSV3s1 +sWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=A6qaB/6P; 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 m13si4335121pgp.482.2018.04.13.11.04.35; Fri, 13 Apr 2018 11:04:50 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=A6qaB/6P; 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 S1751240AbeDMSDM (ORCPT + 99 others); Fri, 13 Apr 2018 14:03:12 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:59156 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751013AbeDMSDL (ORCPT ); Fri, 13 Apr 2018 14:03:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kY7za5HJg+5aMSDFrI7S5+e4wlqQdUUWcC6kKmxkhmY=; b=A6qaB/6PRW9yQa9nMHCYwouxn xh6L1wQPKrW4EbarYRqcTmhDQYRT963bGI5W4x/gyl+ik5WDLoUOFUcMhg61CZe9iUqvwDnUFi1Ue 96VAHRQULnzMC6R8kWAn3foip+m9267sW6NXz1U5YkT9Uf6fldEToZogX1+DQmMgvnvNY=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1f732P-0008TL-Rm; Fri, 13 Apr 2018 18:03:06 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1f732P-0003rw-1O; Fri, 13 Apr 2018 19:03:05 +0100 Date: Fri, 13 Apr 2018 19:03:05 +0100 From: Mark Brown To: sxauwsk Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, guojian , wangshikai Subject: Re: [PATCH] spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo() Message-ID: <20180413180304.GF6854@sirena.org.uk> References: <1523272610-49116-1-git-send-email-sxauwsk@163.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3yNHWXBV/QO9xKNm" Content-Disposition: inline In-Reply-To: <1523272610-49116-1-git-send-email-sxauwsk@163.com> X-Cookie: You were s'posed to laugh! User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --3yNHWXBV/QO9xKNm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 09, 2018 at 07:16:50PM +0800, sxauwsk wrote: > In case of xspi work in busy condition, may send bytes failed. > Add one bytes delay > while ((trans_cnt < CDNS_SPI_FIFO_DEPTH) && > (xspi->tx_bytes > 0)) { > + > + /* When xspi in busy condition, bytes may send failed, > + * caused communication failure so add one byte delay > + */ > + usleep_range(10, 20); > + > if (xspi->txbuf) > cdns_spi_write(xspi, CDNS_SPI_TXD, *xspi->txbuf++); This looks like it adds a byte of delay on every read/write - that seems like a lot of overhead for something that sounds like it's probably only an issue when the FIFO is full? Do we need to do this for every operation, and is it needed for read or is it just write? --3yNHWXBV/QO9xKNm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrQ8NgACgkQJNaLcl1U h9CFvgf8Ce2RR4+sAhzVgT5d0yhSHLIjwr5jYoA9N6jsBCNIl1B/wwjlD5Lna0NK JbkK9DI5gV1PPdbR6sIRs5uA4E5yMMR5mAsYWdUITk6QR4r/wY3FnehfiUYHsaaw 4rNBj3G1FilnwHw3bBd731Jo9DSzEIFHfSv3MfHKfdOsuF3Ut0BDJKIAxQ3OqMOa wGzTny7NzLg7mqU931avo8WOl+6N11Ms2UVCqt6YPTXA+KwzvXcqB2cLRuaG8RTJ b7l3i3VtiUcVynZURI1RnvIy1/TXVCfIimvES9VkJMBu2uKBTXZ1HQrZaupimVsa Ydz1ZhjtVF+ZHLJ/DDJyVmak9NeRQQ== =xL/n -----END PGP SIGNATURE----- --3yNHWXBV/QO9xKNm--