From patchwork Mon Aug 7 01:46:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 9884223 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 94665603B4 for ; Mon, 7 Aug 2017 01:54:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FCB91FF83 for ; Mon, 7 Aug 2017 01:54:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72EB52857F; Mon, 7 Aug 2017 01:54:54 +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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 178591FF83 for ; Mon, 7 Aug 2017 01:54:52 +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=2w9guA/ALL3GggQznjPSrJkor3ogV//WoLB9G4ayjrM=; b=tDekNjoDMNuvqzRmx4g18PgvFb HujmDfnLGzzwtFZVRlWMMehFDFpR9QjkBB1YMncctW+94ZCEts/ML5k3Ixspu3DNHc6SDtcP4Qz1F PmGVw9iFwksd32aM9o3/1dtoatioxQqHc18J4E+cBLCeNSs7mRgzkJ+E7paWqYguKigmRh00wK9I4 zZvwIqJQUqIwz/k6taxtoYE2K+zfpsf/VOupfHdi3Nhs5x6h3GSeqz1qVpEw9EU0mcPdMMJDIdgNO C+NJkpbSjKv/wnJ8lC8icZJue2zXDUINDoze8MGsjENj/SnF+MMv+x6Z1CMZDemNqgHR8XhQnmN3Z 5ocvc2kA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1deXFr-00022N-68; Mon, 07 Aug 2017 01:54:51 +0000 Received: from gate2.alliedtelesis.co.nz ([2001:df5:b000:5::4]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1deXFn-00020H-AW for linux-arm-kernel@lists.infradead.org; Mon, 07 Aug 2017 01:54:49 +0000 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id D6E148448A; Mon, 7 Aug 2017 13:46:50 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail; t=1502070410; bh=+av+YwZNmIBxC3VsuEXFU9iJpaHy++6tg8I5HSYK7ro=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qeOsYN8vl6YqoRiiTn21dGcnuKuP1o94FulIaSFbl4LddYGBAqpcQUKlJMDa+MR9a VodjvAXOuTufcjy40b72U7kx9yWJJAhTiPuo5dXUQ8VAzKppDFjTNeS5JHs7LPX7R8 lrgyq6jOUZrQSMBIph7P8OSP6AzUjz3dsrn4c0UU= Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7, 5, 8, 10121) id ; Mon, 07 Aug 2017 13:46:51 +1200 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by smtp (Postfix) with ESMTP id 99DA313EFEF; Mon, 7 Aug 2017 13:46:53 +1200 (NZST) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id B8CFD1E1D59; Mon, 7 Aug 2017 13:46:45 +1200 (NZST) From: Chris Packham To: robh+dt@kernel.org, gregory.clement@free-electrons.com, bp@alien8.de, jlu@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH 4/4] EDAC: add support for reduced-width Armada-XP SDRAM Date: Mon, 7 Aug 2017 13:46:41 +1200 Message-Id: <20170807014641.4003-5-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170807014641.4003-1-chris.packham@alliedtelesis.co.nz> References: <20170807014641.4003-1-chris.packham@alliedtelesis.co.nz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170806_185447_756948_25922C7D X-CRM114-Status: UNSURE ( 8.67 ) X-CRM114-Notice: Please train this message. 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: Mauro Carvalho Chehab , Chris Packham 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 Some integrated Armada XP SoCs use a reduced pin count so the width of the SDRAM interface is smaller than the traditional discrete SoCs. This means that the definition of "full" and "half" width is further reduced. Signed-off-by: Chris Packham Acked-by: Borislav Petkov --- drivers/edac/armada_xp_edac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/edac/armada_xp_edac.c b/drivers/edac/armada_xp_edac.c index 68e88b180928..d8edcaac87c0 100644 --- a/drivers/edac/armada_xp_edac.c +++ b/drivers/edac/armada_xp_edac.c @@ -350,6 +350,9 @@ static int armada_xp_mc_edac_probe(struct platform_device *pdev) if (armada_xp_mc_edac_read_config(mci)) return -EINVAL; + if (of_property_read_bool(pdev->dev.of_node, "marvell,reduced-width")) + drvdata->width /= 2; + /* configure SBE threshold */ /* it seems that SBEs are not captured otherwise */ writel(1 << SDRAM_ERR_CTRL_ERR_THR_OFFSET,