Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp527063pxb; Wed, 8 Sep 2021 06:41:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS8Qd2WjkvVmMs4h5FmgGszYXRHggtzEZkohPeLam8rYms9d5TLuEOSczIsPH+YOr74XUc X-Received: by 2002:a5d:9e49:: with SMTP id i9mr3329834ioi.125.1631108495088; Wed, 08 Sep 2021 06:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631108495; cv=none; d=google.com; s=arc-20160816; b=sFzuqR76i+6ez0hjAjpCWkEO3qI21IlzknoGqrH8ra5mA/4vTR2WZ28s/s9EgGapL5 kelG7hzwwhQ8KqiSlHEn4ACCaLjHywVwIZEMHljSk/NDNi806mHUf+RxQ6KDS2MAsa+B k1Hxd4yg07B3/562swmPNti1fr08fsbuRbIjat7+UMX4K/E/6pUGTVcQ75uOiOrH4g+R PghPbO6VEQZinx0QHiRpYPlXPDtFcAkS+YxkQxJGCHZntU2gyQU3XzlGe1molwf/x6Vc pzTHWsHyBT8Q35bTE1m87yng6v/nfXJSaVGwo/ZLeeQOyQ4zZly0OMODM7j0ED9YXrtj fKlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=SxBOvLYfYx/9TZi7mUdm9bpPX0VMCLsfnj2n7UQS6fE=; b=MwGwmZfmeJDP9OoUIlnM87tzNK78646BSonXzD+g7cqOOgMpkTNKfNiut5JvCBFDpd lr7oMMDU8nureGVncwbQUQ4CBsdERlsap9Tq7zdW/yFHVN1+GaQgluGHGqPDNWjcNruJ /n/5yZvDCOo9k/7Z/JogUH84SRjz8IZhJb5hoRPnDe8Z172tVCKefPyqGO1tzOu6fPjy 1BZY5OTXUbDp0xh0TPISfAkk0TcVl/ldpku6CRAyL2P7KnHfxyvs+wMVI8SvUrPqIg1+ +EuZ+S3gQ+kuSa7RYnxZ3BJ/JeL5FDP+BtSji24xYcsMjeDNCybW5ixIZJbFlCRNTuUX e7YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=p92LAVoc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q35si1748352jac.78.2021.09.08.06.41.23; Wed, 08 Sep 2021 06:41:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=p92LAVoc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348970AbhIHNXe (ORCPT + 99 others); Wed, 8 Sep 2021 09:23:34 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:33784 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234910AbhIHNX3 (ORCPT ); Wed, 8 Sep 2021 09:23:29 -0400 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1884TnH1007175; Wed, 8 Sep 2021 08:22:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=SxBOvLYfYx/9TZi7mUdm9bpPX0VMCLsfnj2n7UQS6fE=; b=p92LAVocQcwRQz+7rzi69BbZzC2Ys4gmigc+IOEmXPD78BN0wJqxUVQJdLz2HYEkF6aw tXnevxs7TWi5Vp0+8baEithmIBwt3AWi3vvhN91ePKrByA+BoCYZCd2VbdJyw4R3dNwx wVnBjJJ3UZ6CK//157nWD0XohL86QLIIVAMy60IOpS7Fx35Lqlm0PEPxr2Ne+5BghAtr HlrRVmNi4A5+GQSIFsyi83az97/vSF3lzkLB+bLXbR/MlJ0ECeQg5u/7v0UQB+5FfK7N q8cC0OxUONz9NaJzgQDL/cT0sLet6BiTOMtISJ8C5al0KN01VSJNUlA3gXaQzr7UXDuf HQ== Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 3axcp61mf1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 08 Sep 2021 08:22:18 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 8 Sep 2021 14:22:16 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2242.12 via Frontend Transport; Wed, 8 Sep 2021 14:22:16 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id C8E01478; Wed, 8 Sep 2021 13:22:16 +0000 (UTC) Date: Wed, 8 Sep 2021 13:22:16 +0000 From: Charles Keepax To: Lucas Tanure CC: Mark Brown , Greg Kroah-Hartman , "Rafael J . Wysocki" , Sanjay R Mehta , Nehal Bakulchandra Shah , , , Subject: Re: [PATCH 08/10] spi: amd: Fill FIFO buffer with the whole message Message-ID: <20210908132216.GR9223@ediswmail.ad.cirrus.com> References: <20210908113450.788452-1-tanureal@opensource.cirrus.com> <20210908113450.788452-9-tanureal@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20210908113450.788452-9-tanureal@opensource.cirrus.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-ORIG-GUID: lmFdCiQO36vcVKgBXuZZ-eHcNuTJxaNa X-Proofpoint-GUID: lmFdCiQO36vcVKgBXuZZ-eHcNuTJxaNa X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08, 2021 at 12:34:49PM +0100, Lucas Tanure wrote: > The controller is half-duplex, in that it cannot > read data while it is sending data. But the FIFO > is full-duplex, the writes and reads must be > queued and executed together, and the read data > will be offset in the FIFO by the length of the > initial write data (as it would in a full-duplex > SPI). > > And the controller has an automatic CS which can > only be activated during the transmission of the > FIFO, which can make read|write data lose meaning > as the CS will be toggle after the required > read|write address. > To avoid that set the max transfer and message > size as AMD_SPI_FIFO_SIZE ensuring that incoming > messages always fit inside a FIFO buffer > > Signed-off-by: Lucas Tanure > --- Its only really this change I think that depends relates to the regmap/SPI changes, it might be worth doing a separate series with the trivial improvements to the SPI driver. As that allow that to get merged quickly, and makes the series more focused and easy to review on the more complex part of supporting the SPI hardwares weird CS/message length quirk. Thanks, Charles