From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A44B43147 for ; Wed, 25 Mar 2026 00:25:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774398321; cv=none; b=A/exkF8XjFhUENZ4MausizY51v5GVu+ms4IcUuTYQvD4r9HlSOEZMIv+4Uy1HWXBMp3OJSMKdAw5g00jCPvmKCjGUqH1BDDOBjErma3VgJ8+Y5lXyszQQgJwq5Y9sadXh/B6DSHfmNfB4Y70Y07OMchmfnCYgyqaSRVgw3b4r5Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774398321; c=relaxed/simple; bh=T62eLvCEArRzYZStwBuW/DskGoPmPid6WBtJuVPOf4Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q/+sDySQb90BEmQe3GXYnOI07EzGWdKgVeIKHq0CWVlYADLA1J3qAAo0OlH6luXNrzEdJadhmAJtC+9yKqkx4/iO7pGAXZlEPgXYgGv17bRFO/nMax6O3szK6yZQGFYxtTThOjIw0VavUBlTzXOF/Oev2TquGXDIgaQc8TAfqxY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ICia5Sjj; arc=none smtp.client-ip=209.85.222.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ICia5Sjj" Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-8cbb6d5f780so483505885a.1 for ; Tue, 24 Mar 2026 17:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774398318; x=1775003118; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T62eLvCEArRzYZStwBuW/DskGoPmPid6WBtJuVPOf4Y=; b=ICia5SjjK7+fA769m+K2idmiLSp3KpAzbj5IJCk5gcWhJHvNWFxhu4wP9wH/MF4bkX ZGGGSZhFgMrk3pisNPWbJ5TMkPN8fxFVIgN5sEJiikr8Cfhiw1IrHqQLhERlmB428T98 /LAP7cf5YhPErxLTcAgyl5Hm5HQHq7TzO5g/uWKiQ4i8X+bqucDgZZHEhITjWEk1fWXc hEuPXWHvCp8s97mGtHDRj6OXEu7tMiGQKt5UAAQXCqTl8nKLwNbw41SL1DKO8kOe1T+d 0HKmlSLwxtQKgRE5w7RQNW6EENm4UfsrVb6IkW8kW8OMcrzrLJC3Au7Owf6nU81ZBUyy XMUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774398318; x=1775003118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=T62eLvCEArRzYZStwBuW/DskGoPmPid6WBtJuVPOf4Y=; b=tIFwSuk86qoH0ozK9gBgwnCp2UqxfgTFF6bwhdYKc3JpHI5XrFFbtD0DXwr7yrTJOQ ONLqY4Jv1duK/ZP8RJmhA69r4RcU81rsh4NnxecM3S9a0V2NRZYBNCf752OFzGEBwJTb /WaNW4m62yO5KRMDlKaSrG3wAqTyDwFDdzo/6PSNIXxRQ0YELIuUqoF4k9OFhRRnQz+6 UoDPaUzUdWQpbngzghyLtgW7wdGEHGXfpJYB9hoaMUgtSwQCKpyCBK1FJEeT0WLFPEtc cBPHhl65Lo3vrvfengDXqfS4ZZf9BIuJgRKmRubm+AkAual+2rHQ8s0NGzsa0sLmtbeX QImg== X-Forwarded-Encrypted: i=1; AJvYcCXMdOm9utOHkJkukzSbftAns3vCJCDtXjGz5r5XFxUgchadhI5ug99euRF3aK6iGjyTSvAGPErTrIv2/ag=@vger.kernel.org X-Gm-Message-State: AOJu0YwJLLtTxh9SHnXimv6F3KJzivdhUbZ2R2dBJraN3FkigMmCT/85 o6RLxalux6kJP3XwIPOAJd9VEyaJUiGlIMK5wzr7Un2I8fdy7xTTxbAt X-Gm-Gg: ATEYQzzMdpmHsD83Xw5MuofVykA7NtWJEVIjPB+Hl9dDRcie4Qa1lPQsr+/atTbeER4 GhOPHntgiuQcJHsFaNqnWJa1XMqct1ThMH9hVP34vnt1v8tJC7+sBCbcRpoSb3briamoJvLephF 6OGcqpmIaNrNOpJiWcPDeMYEnlxM8+uOvuMaZuX0hWCtI4BpCuTsqnW5Q9UXK1+3kXjwoTL9YvP iC/p+Ns+lSc6JUmjHc1TU/f/1NGw0CQMav8vIHF+mgqyKhrYmOAQ7l70Q4kEUxx3Q7UPuOaYeEO QLkFfk8WigobgT9QxURbYx7mTXGVKDJL30TiXY608K8+QkQAUZYuKh//3uo704kUFmMbgqX4MQu M7S+4r1cOeg62wABX+/sOEnVkC/PcSNw1NEPGa+iKRJ8eA7Wh8Rqce+aFfkASArlXk/+Rbi15J5 H1Bb6QEz1SLjy9bYUSoAtLc5WdP4Ap2Aq0dcKMdx4ObpRD+e/ZVYd8kid3tcInd0Z4FrUam1QZp dP+Yst7i9Y0Pw== X-Received: by 2002:a05:620a:400e:b0:8cd:7f7d:b089 with SMTP id af79cd13be357-8d0010523b7mr229964885a.70.1774398318140; Tue, 24 Mar 2026 17:25:18 -0700 (PDT) Received: from jernej-laptop.localnet (16.red-83-43-237.dynamicip.rima-tde.net. [83.43.237.16]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8cfd55e79e6sm1017406885a.29.2026.03.24.17.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2026 17:25:17 -0700 (PDT) From: Jernej =?UTF-8?B?xaBrcmFiZWM=?= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Chen-Yu Tsai Cc: devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/7] soc: sunxi: sram: Allow SRAM to be claimed multiple times Date: Wed, 25 Mar 2026 01:25:15 +0100 Message-ID: <2342486.iZASKD2KPV@jernej-laptop> In-Reply-To: <20260324164357.1607247-5-wens@kernel.org> References: <20260324164357.1607247-1-wens@kernel.org> <20260324164357.1607247-5-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Dne torek, 24. marec 2026 ob 17:43:52 Srednjeevropski standardni =C4=8Das j= e Chen-Yu Tsai napisal(a): > On the H616, the SRAM C region is an alias mapping to part of the VE > SRAM (accessible in whole at a different address) and part of the DE > SRAM (otherwise unaccessible). As such both the VE and DE need to claim > this SRAM region to prevent access from the CPU. >=20 > The SRAM claim API is designed so that a "claim" routes the SRAM to the > peripheral device, disabling access from the CPU. So long as the written > register value is the same for all the claimants involved, allowing > multiple or repeated claims is trivial. This is indeed the case for all > supported SRAM regions. The only known SRAM region to have multiple > different settings is the SRAM C2 region; this can be claimed by the AE, > CE, or ACE (assumed to be AE + CE). This region is not supported, and > likely will never be needed nor supported, as there is no documentation > for the peripherals involved. >=20 > Change the SRAM region "claimed" field from a boolean to a reference > count. A claim will increment the count, while a release decreases it. > The first claim will trigger the register value write. The driver > otherwise behaves as before. >=20 > Signed-off-by: Chen-Yu Tsai Reviewed-by: Jernej Skrabec Best regards, Jernej