From patchwork Tue Feb 13 20:40:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 10217567 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4736A6055C for ; Tue, 13 Feb 2018 20:41:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3645828607 for ; Tue, 13 Feb 2018 20:41:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AE4428722; Tue, 13 Feb 2018 20:41:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DACBF28607 for ; Tue, 13 Feb 2018 20:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=qM5c83lOI58pmKN1LKgG+HKUiLDuHPcq8orzr20+oZs=; b=Sm+cnEO9FNZfY9cC6VVw2roAM+ 10LnS7RhtiJVE8sQVFLMvSVS2PdTHMx6AUpQR33nhS3mpuzQB7IQ6KD2/kaB7UkR0nYxa6HkTa8zI jHRC3JCdAKnmhMM/1FaUvXQT05WTcqfV0msN3Lsrp36DDwFL9Pr1CDED6dmPHQqnW46aIn14tYnOJ PAzghh8pF+s3EVDX63MHgvAgy2/sQFFN5EzGJtJiJfEmA4CLPqIR70+Rqgq8FN6qEaD/nQ2FvV8vO 0dC5zRm6E50H28yBm43UJp7YfDlsuXjdBZz5wXVwdiE47Q2Dg1CBFUUfU2M8CDyd1fxTRPT0Wi0xj gnhcvZGQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1elhOa-00014b-K2; Tue, 13 Feb 2018 20:41:44 +0000 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1elhOS-0000nY-Iv for linux-arm-kernel@lists.infradead.org; Tue, 13 Feb 2018 20:41:42 +0000 Received: by mail-qt0-x243.google.com with SMTP id q18so5169214qtl.3 for ; Tue, 13 Feb 2018 12:41:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BzvSTyi3WxB22kBNkr0aJ7yEvINFygId3sNHWTnG61Y=; b=AmeCCK5JIOZ4caShzko8WP2Qmdh+fAa2mPWOG/2/V2JagditJ9vkXnlrnQir4uZjxY SBoR7tB/71F6MHY+lK6PPQ+sdozoREJ9tSYUfobVI2OGrYEh1bBHLFp13LSSz7xt5Sh2 1tlPhXOg/v75G3wMiaj7p0eRe687Rl1L8ngaw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BzvSTyi3WxB22kBNkr0aJ7yEvINFygId3sNHWTnG61Y=; b=N1oNIox76la9SoPCUmKTz/OU8I/TZ2hcdHtpzBbmmE46YPuVhWy7JS96lx4i106Q5X qOYwRyjPqgRip0D5byYgNNqi+uPezdnzk4l6uBPJrGvyPlnYD8Srgg3/kfLZDnKd0Ilj b/9jo36cmXSJW7SHIOBAErdCmhJbPWwvPKbcN2/S8Wx40F1uDJe5IKswO038XLzr9aGZ ypnvEnktijfNfrLH0vg0II+VHQY1US3fQlrUVh7YWp1qi9qakYm3pTr5AYSpQ176NUYi pPdCRRi1aQqAq3noffLMfeIp3vy+LiuCaGQuMR6w93ZbJs9VNvWF3zuVv4aO2m9l3Sv8 18vA== X-Gm-Message-State: APf1xPDbNPRaK05TrYfry0Od+a4mpsjb4Ed3t1ebRXG8LjUyU0kLYLd3 TLXHPqpRl2K2VjJ3Cf0ogb/sxQ== X-Google-Smtp-Source: AH8x226HSKndK704RL2MpeJZgOs7Yfb1UJH9nSopBLCTWasPTi/bSv5HCxqZWuYb4kzp8wddYFur5Q== X-Received: by 10.200.63.123 with SMTP id w56mr4034363qtk.318.1518554485299; Tue, 13 Feb 2018 12:41:25 -0800 (PST) Received: from lbrmn-mmayer.igp.broadcom.net ([192.19.224.250]) by smtp.gmail.com with ESMTPSA id m28sm2907978qtc.65.2018.02.13.12.41.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Feb 2018 12:41:23 -0800 (PST) From: Markus Mayer To: Brian Norris , Florian Fainelli , Gregory Fong Subject: [PATCH 1/3] memory: brcmstb: dpfe: properly mask vendor error bits Date: Tue, 13 Feb 2018 12:40:38 -0800 Message-Id: <1518554440-21805-2-git-send-email-mmayer@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518554440-21805-1-git-send-email-mmayer@broadcom.com> References: <1518554440-21805-1-git-send-email-mmayer@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180213_124136_865924_11D038F0 X-CRM114-Status: GOOD ( 13.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Broadcom Kernel List , ARM Kernel List , Markus Mayer , Linux Kernel Mailing List MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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)