Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608503 > unrolled thread

[PATCH 4/9] bus: brcmstb_gisb: Use register offsets with writes too

Started byDoug Berger <opendmb@gmail.com>
First post2017-03-24 15:50 +0100
Last post2017-03-25 06:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4/9] bus: brcmstb_gisb: Use register offsets with writes too Doug Berger <opendmb@gmail.com> - 2017-03-24 15:50 +0100
    Re: [PATCH 4/9] bus: brcmstb_gisb: Use register offsets with writes too Gregory Fong <gregory.0xf0@gmail.com> - 2017-03-25 06:30 +0100

#1608503 — [PATCH 4/9] bus: brcmstb_gisb: Use register offsets with writes too

FromDoug Berger <opendmb@gmail.com>
Date2017-03-24 15:50 +0100
Subject[PATCH 4/9] bus: brcmstb_gisb: Use register offsets with writes too
Message-ID<toyHo-2WH-27@gated-at.bofh.it>
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@gmail.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

[toc] | [next] | [standalone]


#1609092

FromGregory Fong <gregory.0xf0@gmail.com>
Date2017-03-25 06:30 +0100
Message-ID<toMqZ-4Ei-3@gated-at.bofh.it>
In reply to#1608503
On Fri, Mar 24, 2017 at 7:46 AM, Doug Berger <opendmb@gmail.com> wrote:
> 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@gmail.com>

Acked-by: Gregory Fong <gregory.0xf0@gmail.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web