linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mmayer@broadcom.com (Markus Mayer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] memory: brcmstb: dpfe: properly mask vendor error bits
Date: Tue, 13 Feb 2018 12:40:38 -0800	[thread overview]
Message-ID: <1518554440-21805-2-git-send-email-mmayer@broadcom.com> (raw)
In-Reply-To: <1518554440-21805-1-git-send-email-mmayer@broadcom.com>

We were printing the entire 32 bit register rather than just the lower
8 bits. Anything above bit 7 is reserved and may be any random value.

Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
 drivers/memory/brcmstb_dpfe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.c
index 0a7bdbed3a6f..088153760e52 100644
--- a/drivers/memory/brcmstb_dpfe.c
+++ b/drivers/memory/brcmstb_dpfe.c
@@ -603,7 +603,8 @@ static ssize_t show_vendor(struct device *dev, struct device_attribute *devattr,
 		       readl_relaxed(info + DRAM_VENDOR_MR6) & DRAM_VENDOR_MASK,
 		       readl_relaxed(info + DRAM_VENDOR_MR7) & DRAM_VENDOR_MASK,
 		       readl_relaxed(info + DRAM_VENDOR_MR8) & DRAM_VENDOR_MASK,
-		       readl_relaxed(info + DRAM_VENDOR_ERROR));
+		       readl_relaxed(info + DRAM_VENDOR_ERROR) &
+				     DRAM_VENDOR_MASK);
 }
 
 static int brcmstb_dpfe_resume(struct platform_device *pdev)
-- 
2.7.4

  reply	other threads:[~2018-02-13 20:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 20:40 [PATCH 0/3] Update for the Broadcom STB DPFE driver Markus Mayer
2018-02-13 20:40 ` Markus Mayer [this message]
2018-02-23 18:56   ` [PATCH 1/3] memory: brcmstb: dpfe: properly mask vendor error bits Florian Fainelli
2018-02-13 20:40 ` [PATCH 2/3] memory: brcmstb: dpfe: fix type declaration of variable "ret" Markus Mayer
2018-02-23 18:56   ` Florian Fainelli
2018-02-13 20:40 ` [PATCH 3/3] memory: brcmstb: dpfe: support new way of passing data from the DCPU Markus Mayer
2018-02-23 18:57   ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1518554440-21805-2-git-send-email-mmayer@broadcom.com \
    --to=mmayer@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).