Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp2766766ima; Sun, 3 Feb 2019 06:23:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IY9+3F9gp3pOP37JHC4RnYUB9lgeav6XaHEx0idn3vVc5BKwcSr1GzTGIYsqfuItVKadjUK X-Received: by 2002:a62:43c5:: with SMTP id l66mr5078606pfi.207.1549203791809; Sun, 03 Feb 2019 06:23:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549203791; cv=none; d=google.com; s=arc-20160816; b=TbJcHzZHokw5tu/AMd9m2qpHedLVghgIXv8vr6crFKicK3KiYvLBZUFECtGh0Yqffi fTbddEOeu1NFMsgTw/l0XhxuO0ahWm6sXZtFnOqOxSMrHw76TgK8UKCMVBf5NQ70gp1+ PkfFK7Dq88vrLm5n8huw7eesbuVCl7G9hBEYe9LU/mZd9K3xiSx7g1Cc08Fjbdo8uErq 2f27WN2y9KZhwRcQ4SLzUHIhahmBxFCfjhEIRyaqH/7b2JqwNo/Ji+QeZi4I+K5799vc zWyDvE9Tv+uFucbGBG0qanLBI6XmEuekSS6Wwi7/xpaxhUTh2yrNGXpgafVFO5X1hK9d g98Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=1xkxpPuVRzr+wZTF1jEIX9cf0PdyCTGWQcaEwHq7lfU=; b=QRQ5OmHJRF75Gh1cP/761k43fPhneHE1yR9aGQp6z3ysR9wG6m4PjS9UPbsE/KyIOi f0js+3AmLSZezMBQwA/ydZlwdE26O3dtdXewfPbGD9O/ZG2qnZHm88P1AkgbyfAn73ez KfiDrGsUjbUOM46KLbtRG1M3wTlx4Ptt/1jHFAnFbVtzXmyVz2LL3AbwqoKNg+Ia2ASW 2g6zJiwKsaJ5jStQPw6HSmQNE83mcNLveWAUAr3vaFkMI/EzekULlKW5gIgwn4EjIyWz d+cxZMy4i14w9OWbxy3v9bvYvFEM+wEDaMV+7ur4AQjswg+RfMnUS3QuCLAibir/i7Ix cxeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nc1vYNH2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si1343629pgl.570.2019.02.03.06.22.49; Sun, 03 Feb 2019 06:23:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nc1vYNH2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728047AbfBCOQS (ORCPT + 99 others); Sun, 3 Feb 2019 09:16:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:45754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbfBCOQR (ORCPT ); Sun, 3 Feb 2019 09:16:17 -0500 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3C9342084A; Sun, 3 Feb 2019 14:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549203376; bh=fqlKxu6hC/LlcgpY7oFMpeGGedZGIO72wvaf6VO46aA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nc1vYNH2aiPeOvUIMecerWMyQFFu2HFGF4st653jxRukQ+zYIXWHYS/cwGAN0LduS VOTfAAQ0Ub4IriSrxnVCP5BClu0iZ42xGibKkjrBHVFlvxVSqlGUqH5gsNPHdKqubJ 7Mexw2WmFGqOPUDf5LiInN5OqnLhyt/ZSkNnmuhE= Date: Sun, 3 Feb 2019 15:16:04 +0100 From: Boris Brezillon To: Paul Cercueil Cc: David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Rob Herring , Mark Rutland , Miquel Raynal , Harvey Hunt , Mathieu Malaterre , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 9/9] mtd: rawnand: jz4780-bch: Add support for the JZ4740 Message-ID: <20190203151604.23061e2a@bbrezillon> In-Reply-To: <1549202293.1950.2@crapouillou.net> References: <20190202231926.2444-1-paul@crapouillou.net> <20190202231926.2444-10-paul@crapouillou.net> <20190203083505.4dc52278@bbrezillon> <1549202293.1950.2@crapouillou.net> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 03 Feb 2019 10:58:13 -0300 Paul Cercueil wrote: > Le dim. 3 f=C3=A9vr. 2019 =C3=A0 4:35, Boris Brezillon =20 > a =C3=A9crit : > > On Sat, 2 Feb 2019 20:19:26 -0300 > > Paul Cercueil wrote: > > =20 > >> Add the backend code for the jz4780-bch driver to support the JZ4740 > >> SoC from Ingenic. > >>=20 > >> Signed-off-by: Paul Cercueil > >> --- > >>=20 > >> Changes: > >>=20 > >> v2: New patch > >>=20 > >> drivers/mtd/nand/raw/ingenic/Makefile | 2 +- > >> drivers/mtd/nand/raw/ingenic/jz4740_bch.c | 173=20 > >> ++++++++++++++++++ > >> .../mtd/nand/raw/ingenic/jz4780_bch_common.c | 1 + > >> .../nand/raw/ingenic/jz4780_bch_internal.h | 1 + > >> 4 files changed, 176 insertions(+), 1 deletion(-) > >> create mode 100644 drivers/mtd/nand/raw/ingenic/jz4740_bch.c > >>=20 > >> diff --git a/drivers/mtd/nand/raw/ingenic/Makefile=20 > >> b/drivers/mtd/nand/raw/ingenic/Makefile > >> index f38b467490cf..d16c96113a93 100644 > >> --- a/drivers/mtd/nand/raw/ingenic/Makefile > >> +++ b/drivers/mtd/nand/raw/ingenic/Makefile > >> @@ -1,3 +1,3 @@ > >> obj-$(CONFIG_MTD_NAND_JZ4740) +=3D jz4740_nand.o > >> obj-$(CONFIG_MTD_NAND_JZ4780) +=3D jz4780_nand.o jz4780_bch_common.o= =20 > >> \ > >> - jz4780_bch.o jz4725b_bch.o > >> + jz4780_bch.o jz4725b_bch.o jz4740_bch.o =20 > >=20 > > I still don't see the point of the jz4780_bch_common/jz47xxx_bch > > separation. You seem to always embed all objects anyway, so you can > > just put the code for both engines in the same source file and decide > > which one to use based on the compat (which you already do anyway). =20 >=20 > Each SoC has a different set of registers for the BCH hardware. I can=20 > try to > cram everything into one file, but it won't be that much cleaner. Then maybe they deserve separate drivers/modules. BTW, didn't you say that one IP uses Reed-Salomon instead of BCH. I'd suggest prefixing structs and functions with jz47xx_ecc instead of jz47xx_bch and naming the common part jz47xx_ecc.c to reflect that.