From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F104EC04AA5 for ; Thu, 25 Aug 2022 12:06:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5aklozXnhLKsyJvM6T9WoFvHWt5tKgrn6E7+CJCyll0=; b=j3+mAFwHqdLfJM K3A6yw2zjJnPjDPDc14i8DW9uJpMw8LxOa4jCSH3uwhe853aCob4bPmnfWiNQ2WWebLgp+4l24iRB fhWAZvMTfIvzzN8RM3a7sshxXQdlqfFU+71KeR46ZsfAO9rLWlPl+YzMt38bf6EvYXWILVhuLD6bQ UWFu13sgSceZu/xOnRwE4Ds9sKPu74gpClQFGWIPxfr8sHFrMP4dMQa/8aM4WTvbHlx4aZPWHMe5y K+TfQXSRB4Mc0zFOiFClHNHM03pT9a/854phhnXlu50muKvCt+OE0huKaKsK9J3Hx8XCB2+NMYpJ9 4eI97aGArh1bJKb9rNWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRBby-00DLDw-M4; Thu, 25 Aug 2022 12:05:27 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRBbr-00DL6h-Sv for linux-arm-kernel@lists.infradead.org; Thu, 25 Aug 2022 12:05:22 +0000 Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oRBbh-0001K3-BL; Thu, 25 Aug 2022 14:05:09 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Srinivas Kandagatla , Chen-Yu Tsai , Jernej Skrabec , linux-arm-kernel@lists.infradead.org Cc: Samuel Holland , Greg Kroah-Hartman , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, Samuel Holland Subject: Re: [PATCH 1/4] nvmem: sunxi_sid: Always use 32-bit MMIO reads Date: Thu, 25 Aug 2022 14:05:08 +0200 Message-ID: <5410996.rnE6jSC6OK@diego> In-Reply-To: <20220814173656.11856-2-samuel@sholland.org> References: <20220814173656.11856-1-samuel@sholland.org> <20220814173656.11856-2-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220825_050519_974772_CA95D3AB X-CRM114-Status: GOOD ( 15.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Sonntag, 14. August 2022, 19:36:52 CEST schrieb Samuel Holland: > The SID SRAM on at least some SoCs (A64 and D1) returns different values > when read with bus cycles narrower than 32 bits. This is not immediately > obvious, because memcpy_fromio() uses word-size accesses as long as > enough data is being copied. > > The vendor driver always uses 32-bit MMIO reads, so do the same here. > This is faster than the register-based method, which is currently used > as a workaround on A64. And it fixes the values returned on D1, where > the SRAM method was being used. > > The special case for the last word is needed to maintain .word_size == 1 > for sysfs ABI compatibility, as noted previously in commit de2a3eaea552 > ("nvmem: sunxi_sid: Optimize register read-out method"). > > Fixes: 07ae4fde9efa ("nvmem: sunxi_sid: Add support for D1 variant") > Signed-off-by: Samuel Holland On a D1-Nezha: Tested-by: Heiko Stuebner _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel