Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1679865pxb; Fri, 24 Sep 2021 09:33:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQyFk02BOzwuarPprJjjyWP3tQn8vz/9X4lDvPK+iZptGjR5sFrWAQCcm/b8K2ooLzxG1F X-Received: by 2002:a05:6e02:1bad:: with SMTP id n13mr8681441ili.142.1632501196272; Fri, 24 Sep 2021 09:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632501196; cv=none; d=google.com; s=arc-20160816; b=MJdu0QBByWYE3b2X47K6mtX4SGqu9Fwrs4zqO+HTDGAyv6oToMnfJeFJ7fqpPVRQmQ wuvO/9ZhknWoPxH4RNoSFkWBp2g3jD3Y28qUpYpfUhanworU7FlckQ5UvYo7Uudsyh5q s1ii0O1fUK3LK9lh02INSAFCdnQX6eEq6J1cxWA8RXVtHrSv89H2A5gxnS4gNZk2KHIl cmcc/RD+Lwqwd0MTQxJhA/KzbWdY7eBxgwLnTdPN5m3+NycB0CvhRYHhkkmI8NWazFeX nrK8Dh/W5dj3vElOo9OmeanIL2iME4imszZ+eOj6DMPosSRS+Bgx5fw1+d8OGieRGiHZ msVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fW7H8Xgm3CEhMe/+7Fh1+fMxoUeVCcqeCTvpthwsEyA=; b=uP2OsAUG/yUE4BGskcyertk34frHyFv7+uZ3mABV/JInJ9yG/xZehIGWOwNjzUcHKj /Bl2AvIWvGTpdzF1TZ286fcchskzFpLvsbfCe+rVcje1FkTS5SihvBYhTbKmWc6Mwn5j r/hRutzSjQ7uS9UDk8qkeOwF1d3fWYSIJRToL3dfKxKBGvLEDU3FqkbRKw9mWh4CZSYm S4zcfB1Rg0eoV5RZkMMQV9ybBPA6J7uhTqNuaxYZpMPNivlIgD4G8KJNAN4h2bu7gjRv WASrGfQ75MLd88nxGrtf8WUvKFlqpvGXLsKG5zmmtx0tzmwCvB6fPxLau3UpBP5ih9WO Fs/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=3qoOWwi2; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z22si13727770jan.81.2021.09.24.09.33.02; Fri, 24 Sep 2021 09:33:16 -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=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=3qoOWwi2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245559AbhIXMhL (ORCPT + 99 others); Fri, 24 Sep 2021 08:37:11 -0400 Received: from www.zeus03.de ([194.117.254.33]:50140 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245265AbhIXMhL (ORCPT ); Fri, 24 Sep 2021 08:37:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=k1; bh=JalfDMXF3NmfGlLDe7ItYlmatpp0 M3ZXEfuT22l8kF8=; b=3qoOWwi2E5ZYDt7U8rAXtPzRJPbGyJearPuOvjrVg03T 7E2/H0/nAT7Y74cs7frQzGAbfVfvAxeNCtzhlOqwpr3V8BMfAPjaGib4SkNJuUZr EAGErJ3L+rxSxTFmvvx3qZxdV8aXyZIY3N6WnRJlEAejFb7hpZM0EAV+8ICuAic= Received: (qmail 4024565 invoked from network); 24 Sep 2021 14:35:36 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 24 Sep 2021 14:35:36 +0200 X-UD-Smtp-Session: l3s3148p1@BQi6+7zMZK8gAwDPXw1LAJ+FoAZ06vRo Date: Fri, 24 Sep 2021 14:35:32 +0200 From: Wolfram Sang To: Krzysztof Kozlowski Cc: linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Duc Nguyen , Andrew Gabbasov , Geert Uytterhoeven , Lad Prabhakar Subject: Re: [RFC PATCH] memory: renesas-rpc-if: Correct QSPI data transfer in Manual mode Message-ID: Mail-Followup-To: Wolfram Sang , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Duc Nguyen , Andrew Gabbasov , Geert Uytterhoeven , Lad Prabhakar References: <20210922091007.5516-1-wsa+renesas@sang-engineering.com> <11355367-8d20-5a17-70da-618d87301407@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3GmlKcnzAGOYltn1" Content-Disposition: inline In-Reply-To: <11355367-8d20-5a17-70da-618d87301407@canonical.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --3GmlKcnzAGOYltn1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Krzysztof, > > So, in 16-bit transfer (SPIDE[3:0]=3Db'1100), SMWDR0 should be > > accessed by 16-bit width. > > Similar to SMWDR1, SMDDR0/1 registers. > > In current code, SMWDR0 register is accessed by regmap_write() > > that only set up to do 32-bit width. >=20 > Is this part something worth splitting to its own patch? I don't think so because it is related. The patch ensures that a) only 8, 4, 2, or 1 byte blocks are used and b) whatever is used, the access width to the data registers is proper. Only the combination of both fixes the data corruption. Also, for backporting, it would be good to not introduce dependencies, I think. > You sent the patch just slightly after this one: > https://lore.kernel.org/lkml/20210922184830.29147-1-andrew_gabbasov@mento= r.com/ >=20 > Are you solving similar problem? Unlikely. I do not have HyperFlash on my board, so I can't test. But as I understand the docs, HyperFlash in deed doubles the granularity from 8 to 16 bits when using memcpy. But I am dealing with MMIO register accesses in manual mode here. Thanks for the review, Wolfram --3GmlKcnzAGOYltn1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmFNxg0ACgkQFA3kzBSg KbYQmg//UVJyBjn+24BPvQRf4wI1rjv/D6e5dNrdkQ3DaIG8hQ1OcwcWIU+AKI+N 9GJ8TvChdTF571hoFNVcjHbGcZNaatQ4W7Cq01pvKUKJPJQ+DfBypMw2gV3XWTHB LTmUGZeaKcy6m6xEpChVP0hUJ1+Uajr27WcFhnE2H808JXz/6t2Xdl4K+Cmw47zN wPgpQGv8vRQqqSKkYaKN+Rr+pGx0ddxLOA8dMGx7Seg+QAdPDYeDcqOTUKo/wrvt xC2XsbXAjpPIr2THflQ3/6GaxPNh6NT41UbZitrXKimu8jb0/O8JdP1kzHT9874e i+/91IYLlKS3amPJ5j4EQrr+qxadLRptpghtfYrUSBXuS1qjkjXI5uQgTZ+wZf2i gtVzKbxFvGPB7z0hekXfTW/Xh+tjbKukm3TyCojm+js79QBKM6ofuduJKJoBsLbP mPAXn6/uh6gwzaV9Ou+a6Y95DXusW3vqtmuWItSIH046xrQwmL+Jf4l6AYK0P2hj IRKk74cicYRI/Zl8X4Yy1eQjZwoZpbtiUdx+wp9ypY+pWIgRiYElYiHbg32xNk41 WF5rlk0te//MEkcfeHifaMxE4q0bazyUu+zsxfPsbFPyU6O8ix7myYtOS9h1U7d8 CM7R4UX//IjlqJ5qq2NDg8NQFqUrnbXhpE+6cLJOs93S6Ov7+iM= =lQS+ -----END PGP SIGNATURE----- --3GmlKcnzAGOYltn1--