summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2022-08-15 07:12:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-05 11:38:41 +0300
commit3e0405c69bc9e3717f247c1849a31545098997c1 (patch)
treeb2534d076e4ff8bd40dd855e26a1d3008a7250f8 /drivers/soc
parenta658f0bc72cb4e9189ced0713da5b6f536f6941b (diff)
downloadlinux-3e0405c69bc9e3717f247c1849a31545098997c1.tar.xz
soc: sunxi: sram: Actually claim SRAM regions
[ Upstream commit fd362baad2e659ef0fb5652f023a606b248f1781 ] 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") 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>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/sunxi/sunxi_sram.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index d4c7bd59429e..5d1305483542 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;