Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2719087imm; Sun, 30 Sep 2018 03:27:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62bWVU5Hfx+vrJpGYyIz4Vik7M8rZniSgSlL6eZq8WAl4FHT1w/NpLkbyDXeL8CmwlKM37g X-Received: by 2002:a62:1b45:: with SMTP id b66-v6mr6585386pfb.94.1538303269018; Sun, 30 Sep 2018 03:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538303268; cv=none; d=google.com; s=arc-20160816; b=FbmmzWEFYYjrS2gb/SofAl1FYgKfeSRIZly0Nmu0R5P5PZdh89uvELYZgzpHXmiKrg b9t0At3mAi+v+z0uMTucamltqWE4rzwBw9ecE75988GTavTzNLAdziy1q5ncH1krGjl9 oEChUirxkoZb7xatRAJx8U6LpPg0P1I+jMEF4aZGe6amOZhejhYk9NxIK5rGey5Sx8Fz 4dxv/OWNM4yjfdRIApFZuCcpEWNcwKlMafpumQruHb2jBUu/h4tCsbC2rKEcVw/uXAPk STMCjwkMWENCmSCoc9ERQkeubvIcCYpEjjgxPJjen6CafJ7y6t6aOb93gWDUPpRT7h9Z zkoA== 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=6rFHGB0azUBryatwbdKeDg6VV54fpJjNczrWP+p0F+U=; b=AZboOLF4yTgg8i7WTtmmyVrVswA6gzj61NtvF4S7Jql+ORPklD03wxLoJeQYC01RDg QP+T3BQN80GNvlnPNIU2vfNSRW7DQVw+DdhdMGZZbNe/IkHRyb1tuKL6JdOKvt0GB1+Y OeIdXf55DM3ZgxRqd4XCHnDJxuzz61QU2ajKGUCcTBXhawX44asDxtqDN6zksvm0h2WN LMs4RTB6+oSiTm38YieGDJ3fR67lSsabXLN0nj/g6ycGPAQrlOmfqLJJkWqDQiHWSIxY XnRpIofqJQb97TD3/lC5002YHFIMGPh3wjx5Iqe90q7VMjQEierrLXGDexLcsUZnidjF tMmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=U0GFhGlW; 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 c13-v6si8376005pgi.518.2018.09.30.03.27.32; Sun, 30 Sep 2018 03:27:48 -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=U0GFhGlW; 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 S1728110AbeI3Q7y (ORCPT + 99 others); Sun, 30 Sep 2018 12:59:54 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:40494 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727501AbeI3Q7y (ORCPT ); Sun, 30 Sep 2018 12:59:54 -0400 Received: by mail-ed1-f67.google.com with SMTP id j62-v6so11639739edd.7; Sun, 30 Sep 2018 03:27:26 -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=6rFHGB0azUBryatwbdKeDg6VV54fpJjNczrWP+p0F+U=; b=U0GFhGlWPoL5EV9qc4CmYjaHkESL8mfjSxHT5JO+lFiYyS+bmAXfM5sIrrzaNXjQee OZEoKi6sBxckMTCs6mkJvQh3xGYoz+UEeG0uzFXbVQ9GhevsVkK4x4l6QatZToh0eMQH mNTm1Ti7kocFh32do49CG5WYr6UAUsNy6OxHeBVZADF1yXvTw3OYU3A3ixxbZ+U4p9qi e/qBtFwTN1eXnfVwI2wnmd84MlKFUZGnMUtaiLqKGtIJmQoRTFxMnFgS27E/mDGk4IVz 3TuNZ+nhLtob8cvNcRGSchGB5RSZsr/NXDQv4yLmhcDNeLsqbSzzU+Za7pEhaEugalIy bRig== 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=6rFHGB0azUBryatwbdKeDg6VV54fpJjNczrWP+p0F+U=; b=KfJAQco3Tnp45Dh8zbSptyBpuObNJhML8mCctKLlaESJRKbC8qjDQCCACfUT17TsH2 VCky3kk8Axd+Fa5hqm3NNw1P70Thy8sFG4YMx+ZbeLszjAIL5xifX0Owb4Uh+ftyMJb3 877N/YuVDMB4Zqa1spAkxCA9Ijo0WJVbzEIj4z0/88MQl3oa68TkgEXhmOQLSw1VbwGR J6UWACdJnH2zJyK2tYS8/tba8IjAjO/uPmrQvQ6Xl2zCmKObYyE/rsQiplLB9C4nyWDO e8SoDtQDwlqTK4RRagWhp00QAlaepy2Kmf9dTJu9scqiaJmoQZGCC4M8VbAr3RXBIlmN uDyg== X-Gm-Message-State: ABuFfoii5+Ocrrm9iepKTZJHtq0ZWl1D+dIxY3s5iV6NVxcRWadfJQAv L1FPpLoOf03Z/3LuPEwhO5w= X-Received: by 2002:a17:906:3792:: with SMTP id n18-v6mr8002901ejc.179.1538303246002; Sun, 30 Sep 2018 03:27:26 -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 d23-v6sm3291674eds.47.2018.09.30.03.27.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Sep 2018 03:27:25 -0700 (PDT) From: Esben Haabendal To: Chuanhua Han Cc: broonie@kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, boris.brezillon@bootlin.com Subject: Re: [PATCH v2 4/4] spi: spi-fsl-dspi: Fix adjust the byte order when sending and receiving data References: <20180930092535.24544-1-chuanhua.han@nxp.com> <20180930092535.24544-4-chuanhua.han@nxp.com> Date: Sun, 30 Sep 2018 12:27:24 +0200 In-Reply-To: <20180930092535.24544-4-chuanhua.han@nxp.com> (Chuanhua Han's message of "Sun, 30 Sep 2018 17:25:35 +0800") Message-ID: <87k1n3701f.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 Chuanhua Han writes: > This patch fixes the byte order inversion problem in the XSPI mode of > the dspi controller during data transfer. > In XSPI mode,When I read and write data without converting the byte > order of the data, and read and write the data directly, I tested spi > flash connected by the dspi controller and found that the byte > order of the data was reversed by the correct byte order. > When I changed the byte order according to the SPIx_CTARn[LSBFE] flag, > the correct data was obtained. I believe this is related to patch 1/4 of this series, and your attempt on pushing the 8-bit spi-mem data into 32-bit SPI words. The byte-ordering for that does not belong here, and will likely break byte-ordering for other (proper) use of XSPI mode. My advice is that you focus your effort on implementing/fixing DMA mode, ie. erratum A-011218. A proper implementation of that will be appreciated, and should give you much better performance than XSPI mode would be able to give you. /Esben