mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
soc: sunxi: sram: Actually claim SRAM regions
[ Upstream commitfd362baad2
] 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:4af34b572a
("drivers: soc: sunxi: Introduce SoC driver to map SRAMs") Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20220815041248.53268-4-samuel@sholland.org Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
efcf38d279
commit
e375857798
1 changed files with 1 additions and 0 deletions
|
@ -253,6 +253,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;
|
||||
|
|
Loading…
Reference in a new issue