Commit 87023bc2 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'sunxi-drivers-for-4.6' of...

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
parents 3f2242ec febe6569
...@@ -330,7 +330,7 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr, ...@@ -330,7 +330,7 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
cmd = RSB_CMD_RD32; cmd = RSB_CMD_RD32;
break; break;
default: default:
dev_err(rsb->dev, "Invalid access width: %d\n", len); dev_err(rsb->dev, "Invalid access width: %zd\n", len);
return -EINVAL; return -EINVAL;
} }
...@@ -372,7 +372,7 @@ static int sunxi_rsb_write(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr, ...@@ -372,7 +372,7 @@ static int sunxi_rsb_write(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
cmd = RSB_CMD_WR32; cmd = RSB_CMD_WR32;
break; break;
default: default:
dev_err(rsb->dev, "Invalid access width: %d\n", len); dev_err(rsb->dev, "Invalid access width: %zd\n", len);
return -EINVAL; return -EINVAL;
} }
......
...@@ -117,7 +117,7 @@ static int sunxi_sram_show(struct seq_file *s, void *data) ...@@ -117,7 +117,7 @@ static int sunxi_sram_show(struct seq_file *s, void *data)
val = readl(base + sram_data->reg); val = readl(base + sram_data->reg);
val >>= sram_data->offset; val >>= sram_data->offset;
val &= sram_data->width; val &= GENMASK(sram_data->width - 1, 0);
for (func = sram_data->func; func->func; func++) { for (func = sram_data->func; func->func; func++) {
seq_printf(s, "\t\t%s%c\n", func->func, seq_printf(s, "\t\t%s%c\n", func->func,
...@@ -208,7 +208,8 @@ int sunxi_sram_claim(struct device *dev) ...@@ -208,7 +208,8 @@ int sunxi_sram_claim(struct device *dev)
return -EBUSY; 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 = readl(base + sram_data->reg);
val &= ~mask; val &= ~mask;
writel(val | ((device << sram_data->offset) & mask), writel(val | ((device << sram_data->offset) & mask),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment