From patchwork Wed Jul 31 07:14:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Mavrodiev X-Patchwork-Id: 11067189 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64EFC13B1 for ; Wed, 31 Jul 2019 07:16:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49C5628847 for ; Wed, 31 Jul 2019 07:16:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D8D728864; Wed, 31 Jul 2019 07:16:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F0FFA28847 for ; Wed, 31 Jul 2019 07:16:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=nez8ayNFASGgAmng715kuHwc1/rktIRfLJDvzlbreWc=; b=Xdeel3rZWYG8XoxGLPo6HwRDwu kKRJVyxtlkYxJ2nWA4/aEuxByi2boWjKBYgspEJ2A8WvRB6Cb+lpHMj/7LklLHMUECn0i2NzFXsu2 FwvDVkSfPo+c4E1lZXjT0PIoP9X0hcUqSaV7IvYSYGT9lAigZ2x7sWnfK2zOmgVZk6lHnjwKdVTDb JuLKz/GGMvtYpRGmi9V/T+QdGnVjCaq27Bmm05YvP93QyCRZ/Q3n8DfcGQrnsqW498kN8lLSRSUWT LlyPWog4833QSq3kMjjkDcc437dB9JmVazqwhnTpGsbdKXUi6ZHFB3h9yWfmXmwyo/qYnMDks2mWH QqTgnFWA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hsiqL-0005Lp-M1; Wed, 31 Jul 2019 07:16:13 +0000 Received: from [2001:470:0:1f2::b869:4820] (helo=olimex.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hsipO-0004ty-AZ for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2019 07:15:16 +0000 Received: from localhost.localdomain ([94.155.250.134]) by olimex.com with ESMTPSA (ECDHE-RSA-AES128-GCM-SHA256:TLSv1.2:Kx=ECDH:Au=RSA:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username stefan@olimex.com, mechanism PLAIN) for ; Wed, 31 Jul 2019 00:15:12 -0700 From: Stefan Mavrodiev To: Srinivas Kandagatla , Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Allwinner sunXi SoC support), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/1] nvmem: sunxi_sid: fix A64 SID controller support Date: Wed, 31 Jul 2019 10:14:47 +0300 Message-Id: <20190731071447.9019-2-stefan@olimex.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190731071447.9019-1-stefan@olimex.com> References: <20190731071447.9019-1-stefan@olimex.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190731_001514_362549_589C1FD8 X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-sunxi@googlegroups.com, Stefan Mavrodiev MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Like in H3, A64 SID controller doesn't return correct data when using direct access. It appears that on A64, SID needs 8 bytes of word_size. Workaround is to enable read by registers. Signed-off-by: Stefan Mavrodiev Acked-by: Chen-Yu Tsai Tested-by: Vasily Khoruzhick --- drivers/nvmem/sunxi_sid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c index a079a80ddf2c..e26ef1bbf198 100644 --- a/drivers/nvmem/sunxi_sid.c +++ b/drivers/nvmem/sunxi_sid.c @@ -186,6 +186,7 @@ static const struct sunxi_sid_cfg sun8i_h3_cfg = { static const struct sunxi_sid_cfg sun50i_a64_cfg = { .value_offset = 0x200, .size = 0x100, + .need_register_readout = true, }; static const struct sunxi_sid_cfg sun50i_h6_cfg = {