[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170324144632.5896-5-opendmb@gmail.com>
Date: Fri, 24 Mar 2017 07:46:27 -0700
From: Doug Berger <opendmb@...il.com>
To: catalin.marinas@....com
Cc: robh+dt@...nel.org, mark.rutland@....com, will.deacon@....com,
computersforpeace@...il.com, gregory.0xf0@...il.com,
f.fainelli@...il.com, bcm-kernel-feedback-list@...adcom.com,
wangkefeng.wang@...wei.com, james.morse@....com,
vladimir.murzin@....com, panand@...hat.com, andre.przywara@....com,
cmetcalf@...lanox.com, mingo@...nel.org,
sandeepa.s.prabhu@...il.com, shijie.huang@....com,
linus.walleij@...aro.org, treding@...dia.com, jonathanh@...dia.com,
olof@...om.net, mirza.krak@...il.com, suzuki.poulose@....com,
bgolaszewski@...libre.com, horms+renesas@...ge.net.au,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, opendmb@...il.com
Subject: [PATCH 4/9] bus: brcmstb_gisb: Use register offsets with writes too
This commit corrects the bug introduced in commit f80835875d3d
("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: f80835875d3d ("bus: brcmstb_gisb: Look up register offsets in a table")
Signed-off-by: Doug Berger <opendmb@...il.com>
---
drivers/bus/brcmstb_gisb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/brcmstb_gisb.c b/drivers/bus/brcmstb_gisb.c
index 72fe0a5a8bf3..a94598d0945a 100644
--- a/drivers/bus/brcmstb_gisb.c
+++ b/drivers/bus/brcmstb_gisb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 Broadcom Corporation
+ * Copyright (C) 2014-2017 Broadcom
*
* 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
@@ -127,9 +127,9 @@ static void gisb_write(struct brcmstb_gisb_arb_device *gdev, u32 val, int reg)
return;
if (gdev->big_endian)
- iowrite32be(val, gdev->base + reg);
+ iowrite32be(val, gdev->base + offset);
else
- iowrite32(val, gdev->base + reg);
+ iowrite32(val, gdev->base + offset);
}
static ssize_t gisb_arb_get_timeout(struct device *dev,
--
2.12.0
Powered by blists - more mailing lists