From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751494AbdHMV2R (ORCPT ); Sun, 13 Aug 2017 17:28:17 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:59247 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbdHMV2P (ORCPT ); Sun, 13 Aug 2017 17:28:15 -0400 From: Chris Packham To: Borislav Petkov CC: "robh+dt@kernel.org" , "gregory.clement@free-electrons.com" , "jlu@pengutronix.de" , "linux-arm-kernel@lists.infradead.org" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Mauro Carvalho Chehab Subject: Re: [RESEND PATCH 4/4] EDAC: add support for reduced-width Armada-XP SDRAM Thread-Topic: [RESEND PATCH 4/4] EDAC: add support for reduced-width Armada-XP SDRAM Thread-Index: AQHTDx8KQJ+stNBlC062QG/fSRl4FQ== Date: Sun, 13 Aug 2017 21:28:11 +0000 Message-ID: <291f8d81da814b91aee0a5e6a1133a53@svr-chch-ex1.atlnz.lc> References: <20170807014641.4003-1-chris.packham@alliedtelesis.co.nz> <20170807014641.4003-5-chris.packham@alliedtelesis.co.nz> <20170811091402.GD9432@nazgul.tnic> Accept-Language: en-NZ, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.32.1.10] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7DLST56011698 On 11/08/17 21:14, Borislav Petkov wrote: > On Mon, Aug 07, 2017 at 01:46:41PM +1200, Chris Packham wrote: >> 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 >> --- >> 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; > > If the compiler doesn't already convert it to a shift on ARM, you > probably should do > > >>= 1; > > here, just in case. Based on discussions around the first patch in this series the final version will probably be something like if (of_device_is_compatible(pdev->dev.of_node, "marvell,98dx3236-sdram-controller") drvdata->width >>= 1; > > With that you can add my > > Acked-by: Borislav Petkov > > and route it through an ARM tree. That may depend on where Jan's series lands. This is is the only patch that is dependent on it. Regardless it should be inert so aside from triggering checkpatch warnings about dt-bindings there would be no harm in this patch taking the long way round. > > Thx. >