Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1731865imn; Sun, 31 Jul 2022 20:08:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR4WeuLyCdyPTio9/Uoddjq5MWI4WZbIXgt3lf6NUIIgfIjDOVQlaJmLBRw2CM968aT1KeBh X-Received: by 2002:a17:902:f60d:b0:16a:1a7f:a22f with SMTP id n13-20020a170902f60d00b0016a1a7fa22fmr14980101plg.13.1659323324052; Sun, 31 Jul 2022 20:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659323324; cv=none; d=google.com; s=arc-20160816; b=Al0Ino+P0nSN8meJB6/S1GLaNgNKZjzwrW3unic+b+An3xQigQwn5MP8Zr5fLXbUu9 lRsINVCrr6Uezxj90PslySfifP1LviDhq5af26QZQnp8BzikUXrBEAvROSPQSirRskqZ GupSv9i33VkmDADtYhnruCrIDW+DC9aCbDr3Eq5ruPmOWI1dLvutEkOEaWjom4mUXwQc PL3C3H3UekuUT5Fg0d1JQGoY1NHnfzUIuwCYpgWIhLrEMnN/URNPfckXzX+cFNHk5zBR nNJqgoXzvfnEawdtNDRlLlHEqlyGh67qnTHZeINyL+x8WziH8iBhXTwl3eq89WaQz4on DL6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=9DNTC2mZK/vx4J+nMP9mcn6k409H3HxgWzx4BXzvEGc=; b=zXv6WhoD7C1vA4MUXAdqb/1j9i2vxxs81vl5funADusWNzEls+JPXLzn33xvThFOjm 5TOwTRKI62KWW4u49LApWjNfb+fQ2KV0bRAmdjAG7lZM13dfBthhmoV80tXtQS3QPJe0 izyTx9Cvl27x5+WPt7I2FLuVmaTdiOVQmu7E7MlBmR4YfTibtW7TxXxTRoW1QK9Utey8 si14BnTM9OCdTuDsYyuvQbqulWUG9pp2pk7d0ilPm5Uw+k3ptOLpe1cJI6JMegCQcK7b TMQnFH6VQ49cEnRqP5+AbJCXTxvnwos8ridybrsQBOFuEKadkPWWQr4Qh3EH83YZ6Pnz NWbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b="py/87n3i"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=IZTDjTi9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on1-20020a17090b1d0100b001f29384bd77si11199017pjb.69.2022.07.31.20.08.29; Sun, 31 Jul 2022 20:08:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b="py/87n3i"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=IZTDjTi9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239584AbiHADFg (ORCPT + 99 others); Sun, 31 Jul 2022 23:05:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239502AbiHADFY (ORCPT ); Sun, 31 Jul 2022 23:05:24 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5070F21AA; Sun, 31 Jul 2022 20:05:21 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B345832007D7; Sun, 31 Jul 2022 23:05:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 31 Jul 2022 23:05:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1659323119; x=1659409519; bh=9D NTC2mZK/vx4J+nMP9mcn6k409H3HxgWzx4BXzvEGc=; b=py/87n3iVOI+rcmVUm MaLITFggHr8YiskCeRPMyKfZeJEJGnYlEATdpxq4gFGFg1ciNozM3sQHWKCoSMVV oH+lJBw4mTp+YDJGUhvDpRCygkIthJww92Z/L3m+Yx5nVIS9/e/89LfOStJ3sEZs CvwKId2qKB4hL0Cit2sZwbCauqlaZNDGLAPR1LIyYKVIMqcEVfu4adRXUZWYsoE0 xyBxkTcCU2KndbOt/c40KTLZtdjQXYaTtxbmGcz71RJn9S5DXPa7JkjNXpElfSAm IA4h57YKmzyVD7XnJf19BIy1EPcSxCdRM/6kDCsIsFNxLz1uoN7xHJnfsuXuGaWD PUeg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1659323119; x=1659409519; bh=9DNTC2mZK/vx4 J+nMP9mcn6k409H3HxgWzx4BXzvEGc=; b=IZTDjTi9cjjt+BKL+kIUqXmHXdJVg OVrE4VDWvnsMaQhk9bJ2zFTAQQSpI9JufzIhWzJ3Iej2hfwFaJ6nGFEq15sEDl0U Y3IGU5sq9wmROaLKyMn7y1hXubuMV+KgN2Ob89/D6Dsg77NUWfNLOGZ+sfqIRxbx mUZZlnojqaThRkF4Mah1RkgruqzJV9AlnV/039a1QDlMT93JDOg1KEHyykauUmki p+iLIOIw/veE4Xm6leEEDRd7JYIRkMgZUTXBlqybUq3EuLOpMFcMIcT3Wlom6wOV 8JbVZBmEp0aSdW+x25WOa2aQABcGHpC7JQ+ETPWEZ1SbM4dtqomvgDjZw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddvvddgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 31 Jul 2022 23:05:18 -0400 (EDT) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec Cc: Samuel Holland , Arnd Bergmann , Hans de Goede , Icenowy Zheng , Krzysztof Kozlowski , Maxime Ripard , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: [PATCH 2/9] soc: sunxi: sram: Actually claim SRAM regions Date: Sun, 31 Jul 2022 22:05:02 -0500 Message-Id: <20220801030509.21966-3-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220801030509.21966-1-samuel@sholland.org> References: <20220801030509.21966-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sunxi_sram_claim() checks the sram_desc->claimed flag before updating the register, with the intent that only one device can claim a region. However, this was ineffective because the flag was never set. Fixes: 4af34b572a85 ("drivers: soc: sunxi: Introduce SoC driver to map SRAMs") Signed-off-by: Samuel Holland --- drivers/soc/sunxi/sunxi_sram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c index a8f3876963a0..f3d3f9259df9 100644 --- a/drivers/soc/sunxi/sunxi_sram.c +++ b/drivers/soc/sunxi/sunxi_sram.c @@ -254,6 +254,7 @@ int sunxi_sram_claim(struct device *dev) writel(val | ((device << sram_data->offset) & mask), base + sram_data->reg); + sram_desc->claimed = true; spin_unlock(&sram_lock); return 0; -- 2.35.1