summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-03-01 00:34:41 +0100
committerArnd Bergmann <arnd@arndb.de>2016-03-01 00:34:41 +0100
commit87023bc2ed11ea6b0944b34cc0281454c01832bf (patch)
tree4f3da1dde11f455a635f7f9c4166208a11aec1dd /drivers/soc
parent3f2242ec4068fba76f353b384a79bcae81dd1e2d (diff)
parentfebe6569fae4b5e663f0a31d9dbf054d3b588ff5 (diff)
downloadlinux-87023bc2ed11ea6b0944b34cc0281454c01832bf.tar.bz2
Merge tag 'sunxi-drivers-for-4.6' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/drivers
Merge "Allwinner drivers changes for 4.6" from Maxime Ripard: Some minor fixes for the RSB and SRAM controller drivers * tag 'sunxi-drivers-for-4.6' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: drivers: soc: sunxi: Fix mask generation for SRAM mapping drivers: sunxi-rsb: fix error output type
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/sunxi/sunxi_sram.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index bc52670c8f4b..99e354c8f53f 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -117,7 +117,7 @@ static int sunxi_sram_show(struct seq_file *s, void *data)
val = readl(base + sram_data->reg);
val >>= sram_data->offset;
- val &= sram_data->width;
+ val &= GENMASK(sram_data->width - 1, 0);
for (func = sram_data->func; func->func; func++) {
seq_printf(s, "\t\t%s%c\n", func->func,
@@ -208,7 +208,8 @@ int sunxi_sram_claim(struct device *dev)
return -EBUSY;
}
- mask = GENMASK(sram_data->offset + sram_data->width, sram_data->offset);
+ mask = GENMASK(sram_data->offset + sram_data->width - 1,
+ sram_data->offset);
val = readl(base + sram_data->reg);
val &= ~mask;
writel(val | ((device << sram_data->offset) & mask),