Commit 48564f69 authored by Doug Berger's avatar Doug Berger Committed by Greg Kroah-Hartman

bus: brcmstb_gisb: Use register offsets with writes too


[ Upstream commit 856c7ccb ]

This commit corrects the bug introduced in commit f8083587
("bus: brcmstb_gisb: Look up register offsets in a table") such
that gisb_write() translates the register enumeration into an
offset from the base address for writes as well as reads.

Fixes: f8083587 ("bus: brcmstb_gisb: Look up register offsets in a table")
Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
Acked-by: default avatarGregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e38311ff
/* /*
* Copyright (C) 2014 Broadcom Corporation * Copyright (C) 2014-2017 Broadcom
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
...@@ -123,9 +123,9 @@ static void gisb_write(struct brcmstb_gisb_arb_device *gdev, u32 val, int reg) ...@@ -123,9 +123,9 @@ static void gisb_write(struct brcmstb_gisb_arb_device *gdev, u32 val, int reg)
return; return;
if (gdev->big_endian) if (gdev->big_endian)
iowrite32be(val, gdev->base + reg); iowrite32be(val, gdev->base + offset);
else else
iowrite32(val, gdev->base + reg); iowrite32(val, gdev->base + offset);
} }
static ssize_t gisb_arb_get_timeout(struct device *dev, static ssize_t gisb_arb_get_timeout(struct device *dev,
......
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