Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2713004imm; Sun, 30 Sep 2018 03:18:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV63qBhp7c7qAgyX6jSpv2Yy+W0PEx+CHuk0FhfKz+AygFgmLueM8NKupy9WrLbZ5p/S9mwOv X-Received: by 2002:a62:1407:: with SMTP id 7-v6mr3276447pfu.28.1538302696038; Sun, 30 Sep 2018 03:18:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538302696; cv=none; d=google.com; s=arc-20160816; b=y+dn4gBlIGf+EsaqyJB9lqzE68uWyiOFicqlvAom6H8MvCjWFV/Uwwk6wvL32evCuU F4M4n+/aNHyg2f8G+7hh38OsehELI6Kodz/qemIW5Ab1VzNVqWMklUa8+mlqPHipmwHC zUpaAgEvhWeCjsGA82WmxPiQ7o/atd9DfnOu5vBonS0inWAeT8d2ESWbxNPP4EnVVx/t luCHzl/wFhbfJ5RnYT2JkqVysgaN+MZKk35vOsUEo0GVFHaKM1icb6q+vBpw2gT660GH AJsmkK+MRuerg8y8dLXuLlkLYkV7dVTVWiU/M2r/cainjOC4ZK6LPMYJL8BeyOVaSBKZ PRxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dkim-signature; bh=TMKTM+QOSqnMhXF1Oz7IrV6yFws8qtYbiQXWvBffc4E=; b=z8Gxhq0zYz9gv7bI+QlWFTXF1083bbFgdDc1DpUH0ow4lyTjJ1H1TSfaNSuXNl4YJ7 NPQnHToCm5wiT+m2wlCEQ+9JIkogEbH69e6HFQwHEpZjo4WKVcfwRlF94q9a/ofQjsFA 9Rajy9LGw2BPTjVB9nD99dxNPhasW1dLGIhyE5upIY9kQvR/PSXLZd5x8CiPFU++oTxH lG8GPM0HykrllONgbuyPld9Ao+Uqx6Ea50kM5/OgfiDBzyK3z5wvdjUZPc4gz0P741YX GvaezdeUMSAxqpTvvGDfTZU97/+d0v4Age1lr74BDn26TeZZJCtEy3Ge25xcvpctTtK2 YG1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=NHDXDAuW; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67-v6si9151897pgi.606.2018.09.30.03.18.01; Sun, 30 Sep 2018 03:18:16 -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=@gmail.com header.s=20161025 header.b=NHDXDAuW; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728279AbeI3QuD (ORCPT + 99 others); Sun, 30 Sep 2018 12:50:03 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:38362 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727793AbeI3QuD (ORCPT ); Sun, 30 Sep 2018 12:50:03 -0400 Received: by mail-ed1-f66.google.com with SMTP id c1-v6so2436396ede.5; Sun, 30 Sep 2018 03:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=TMKTM+QOSqnMhXF1Oz7IrV6yFws8qtYbiQXWvBffc4E=; b=NHDXDAuWEKDAy8Jvv2122TYvS6YOmp6iZ4IUc7bJhjbR8p4VTLA6BRXvpw/C8KqqEV fd2QD4ALyGKUw7TNGZFTskVNwNsZKx9K+9mr1aAVFbkM4jxh4qRoRgMMoEsJfyAC+bcZ Mm/7XBwyJBDyyic9VLNd79WT0Jxs6Mu9+5l/hT4b/SwaVDrMS8O+n7nwIAJYlb1MMlZ6 l77Rf67n8oz5BQHOm1+ssFwMeYjGyFJKqfX2IjVE5vV49vOtgN2bewm/ohgEwLRJgNOa Y+xRiBKOtAsRcL188bbINqIpf3APawGv9Y8X2M2chUV9JTfp9iA6r9tIglcieVfBEZG2 2HKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=TMKTM+QOSqnMhXF1Oz7IrV6yFws8qtYbiQXWvBffc4E=; b=h5br7bENyLaCvKJgY9vaFlLVeTIdKS1YWEL8w/0xBcGeW0ogWxDQRjMOz6dhWdU+zl DAqpTVqtOIAXfB6o2vVn4k03SGchN5RW4+Tu7vP6posZKPcNbG+yg1ciLGxEW1n8XKBp 79XDo/fvsBmmjajue8gkya5oVKzf/XWvIC9hQ8qHTmsS8WjBJjRjRRWynJz1atKiMsT0 9N0qZ47PiuIQek1Oy1LRL8VsG4PGiak+yMWB2YCunhPGE5YzL8eaHD0Vdv1XDVB+JqFN KJc75Nnlp85fGs+1DfgCVSmV+CtaWH5HzVlxtV1B9twb6vHqKjMzc0GFZH7rDZ1mES+r MABw== X-Gm-Message-State: ABuFfoigv9VfxB1J/tc3dTL+ZwCfxgtHdU1Lgxjtnt2bn3I0iq4fEsd0 PadowS08xtyFBkCs4cCCds4= X-Received: by 2002:a17:906:2410:: with SMTP id z16-v6mr9775173eja.164.1538302656199; Sun, 30 Sep 2018 03:17:36 -0700 (PDT) Received: from localhost (87-49-147-65-mobile.dk.customer.tdc.net. [87.49.147.65]) by smtp.gmail.com with ESMTPSA id s12-v6sm3346226edr.9.2018.09.30.03.17.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Sep 2018 03:17:35 -0700 (PDT) From: Esben Haabendal To: Boris Brezillon Cc: Chuanhua Han , broonie@kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] spi: spi-mem: Add the spi_set_xfer_bpw function References: <20180930092535.24544-1-chuanhua.han@nxp.com> <20180930120425.7715cb29@bbrezillon> Date: Sun, 30 Sep 2018 12:17:34 +0200 In-Reply-To: <20180930120425.7715cb29@bbrezillon> (Boris Brezillon's message of "Sun, 30 Sep 2018 12:04:25 +0200") Message-ID: <87o9cf70ht.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Boris Brezillon writes: > Hi Chuanhua, > > On Sun, 30 Sep 2018 17:25:32 +0800 > Chuanhua Han wrote: > >> Before we add this spi_transfer to the spi_message chain table, we need >> bits_per_word_mask based on spi_control to set the bits_per_word of >> this spi_transfer. > > Let's make it clearer: this is wrong. The spi-mem protocol is just > using bytes, not custom size words. Fix the fsl-dspi driver if needed, > but don't try to adjust xfer->bits_per_word in spi-mem.c, because this > is inappropriate. I don't think there is a "fix" needed in fsl-dspi driver for this. I am not sure, but I think that what Han is trying to achieve here is better performance. And wile the XSPI mode does provide better performance for sending one 32 bit word, than normal mode providees for sending 4 x 8 bit words. But as you say, this is wrong. To improve performance, the fsl-dspi driver should be fixed to work in DMA mode. Implementation of erratum A-011218 is necessary in order to use DSPI DMA mode on LS1021A. I was planning to work on that, but haven't had the time for it. So if you want better performance for spi-mem on LS1021A DSPI, please work on this. /Esben