public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej@kernel.org>,
	Samuel Holland <samuel@sholland.org>,
	Chen-Yu Tsai <wens@kernel.org>
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	[thread overview]
Message-ID: <2342486.iZASKD2KPV@jernej-laptop> (raw)
In-Reply-To: <20260324164357.1607247-5-wens@kernel.org>

Dne torek, 24. marec 2026 ob 17:43:52 Srednjeevropski standardni čas je 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.
> 
> 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.
> 
> 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.
> 
> Signed-off-by: Chen-Yu Tsai <wens@kernel.org>

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



  reply	other threads:[~2026-03-25  0:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 16:43 [PATCH 0/7] soc: sunxi: sram: Add H616 SRAM support Chen-Yu Tsai
2026-03-24 16:43 ` [PATCH 1/7] dt-bindings: sram: Document Allwinner H616 VE SRAM Chen-Yu Tsai
2026-03-25  0:22   ` Jernej Škrabec
2026-03-24 16:43 ` [PATCH 2/7] dt-bindings: sram: sunxi-sram: Add H616 SRAM regions Chen-Yu Tsai
2026-03-25  0:23   ` Jernej Škrabec
2026-03-24 16:43 ` [PATCH 3/7] soc: sunxi: sram: Const-ify sunxi_sram_func data and references Chen-Yu Tsai
2026-03-25  0:24   ` Jernej Škrabec
2026-03-24 16:43 ` [PATCH 4/7] soc: sunxi: sram: Allow SRAM to be claimed multiple times Chen-Yu Tsai
2026-03-25  0:25   ` Jernej Škrabec [this message]
2026-03-24 16:43 ` [PATCH 5/7] soc: sunxi: sram: Support claiming multiple regions per device Chen-Yu Tsai
2026-03-25  0:28   ` Jernej Škrabec
2026-03-24 16:43 ` [PATCH 6/7] soc: sunxi: sram: Add H616 SRAM regions Chen-Yu Tsai
2026-03-25  0:29   ` Jernej Škrabec
2026-03-24 16:43 ` [PATCH 7/7] arm64: dts: allwinner: sun50i-h616: Add SRAM nodes Chen-Yu Tsai
2026-03-25  0:30   ` Jernej Škrabec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2342486.iZASKD2KPV@jernej-laptop \
    --to=jernej.skrabec@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jernej@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wens@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox