From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 589C8CCD1AB for ; Wed, 22 Oct 2025 08:54:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UdkqHbshapC7nZY4/zFoditcNqEk/iGcG2EMytEmpUc=; b=GVnrPhrAlk9ZcAWRYAcc5e4Cs4 EhxrjotoE8Y4oxjNQSTExuNDuEDy3sLz7sGzGgWblB8EunQrjbVrxkEApEDBt4KpF+rkkYyh4h0WU rickOBU0EdDZXbaci7ezZk5crG+Q1UzEaZmLPIbnvoxLVh1kQscsXv8lKsIY5plsfzfpurBCaHkap ziyJ/hTeN+5QrvBg0Cxw6OFxoSqIdBSvsRoSWo77RPsHgSzw4jcM3dri8c4wBpP7UNq210hwWvOcV /pr1R9zBgwUR49vpUWos0PH8ANLNX9K3rs6/A+MzEQ5NAxvys/PUAqyU7tRH04HX/WQ3wWeWjtiPv +ZctuCPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBUbt-000000029iz-2Ys3; Wed, 22 Oct 2025 08:54:21 +0000 Received: from smtpout-04.galae.net ([185.171.202.116]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBUbp-000000029hj-1mrT for linux-arm-kernel@lists.infradead.org; Wed, 22 Oct 2025 08:54:19 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 69BC5C0B8B2; Wed, 22 Oct 2025 08:53:52 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0E381606DC; Wed, 22 Oct 2025 08:54:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 557A8102F242F; Wed, 22 Oct 2025 10:54:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1761123251; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=UdkqHbshapC7nZY4/zFoditcNqEk/iGcG2EMytEmpUc=; b=sz9Wv6lqYxBw+efub1O+67sRO5hj1GJKSrnQlOg8RP6sH79keyWGAzsK4Q+4n1BMEdB7VS TYOlusTcal3NLBThus+SARMOan5OGVRHZIorH9GQCpJoigQOUA9yFIoEoNLMT3yx+Sjvdd aWFll3rPZFjgq12I1YFpGxjlTEjVrsIAMG94T945WWTouRh4oilP/lVIsQ9J9DYlk3fS0D RCns2kaBXugtb8nVvJoIciKphHOiT+lUAdK7dT+UZflZ4C4hdMp+ZOrBIv5J5MOX5exH06 3pUkH8Zf3TmQhgbiLKKoyN6L/DLMNpHiQDj1Jx5+laX7Shvkj31BB/uuvktcWg== From: Miquel Raynal To: Richard Genoud Cc: Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Wentao Liang , Johan Hovold , Maxime Ripard , Thomas Petazzoni , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 04/15] mtd: rawnand: sunxi: introduce reg_user_data in sunxi_nfc_caps In-Reply-To: <20251020101311.256819-5-richard.genoud@bootlin.com> (Richard Genoud's message of "Mon, 20 Oct 2025 12:13:00 +0200") References: <20251020101311.256819-1-richard.genoud@bootlin.com> <20251020101311.256819-5-richard.genoud@bootlin.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Wed, 22 Oct 2025 10:54:02 +0200 Message-ID: <87y0p3tiz9.fsf@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251022_015417_716975_E0154195 X-CRM114-Status: GOOD ( 17.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Richard, On 20/10/2025 at 12:13:00 +02, Richard Genoud = wrote: > The H6/H616 USER_DATA register is not at the same offset as the > A10/A23 one, so move its offset into sunxi_nfc_caps > > No functional change. > > Signed-off-by: Richard Genoud > --- > drivers/mtd/nand/raw/sunxi_nand.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sun= xi_nand.c > index 0285e4d0ca7f..8f5d8df19e33 100644 > --- a/drivers/mtd/nand/raw/sunxi_nand.c > +++ b/drivers/mtd/nand/raw/sunxi_nand.c > @@ -48,7 +48,8 @@ > #define NFC_REG_DEBUG 0x003C > #define NFC_REG_A10_ECC_ERR_CNT 0x0040 > #define NFC_REG_ECC_ERR_CNT(nfc, x) ((nfc->caps->reg_ecc_err_cnt + (x)) = & ~0x3) > -#define NFC_REG_USER_DATA(x) (0x0050 + ((x) * 4)) > +#define NFC_REG_A10_USER_DATA 0x0050 > +#define NFC_REG_USER_DATA(nfc, x) (nfc->caps->reg_user_data + ((x) * 4)) > #define NFC_REG_SPARE_AREA 0x00A0 > #define NFC_REG_PAT_ID 0x00A4 > #define NFC_REG_MDMA_ADDR 0x00C0 > @@ -214,6 +215,7 @@ static inline struct sunxi_nand_chip *to_sunxi_nand(s= truct nand_chip *nand) > * through MBUS on A23/A33 needs extra configuration. > * @reg_io_data: I/O data register > * @reg_ecc_err_cnt: ECC error counter register > + * @reg_user_data: User data register > * @dma_maxburst: DMA maxburst > * @ecc_strengths: Available ECC strengths array > * @nstrengths: Size of @ecc_strengths > @@ -222,6 +224,7 @@ struct sunxi_nfc_caps { > bool has_mdma; > unsigned int reg_io_data; > unsigned int reg_ecc_err_cnt; > + unsigned int reg_user_data; > unsigned int dma_maxburst; > const u8 *ecc_strengths; > unsigned int nstrengths; > @@ -723,8 +726,8 @@ static void sunxi_nfc_hw_ecc_get_prot_oob_bytes(struc= t nand_chip *nand, u8 *oob, > { > struct sunxi_nfc *nfc =3D to_sunxi_nfc(nand->controller); >=20=20 > - sunxi_nfc_user_data_to_buf(readl(nfc->regs + NFC_REG_USER_DATA(step)), > - oob); > + sunxi_nfc_user_data_to_buf(readl(nfc->regs + > + NFC_REG_USER_DATA(nfc, step)), > oob); Minor nit, column limit is 100 now, so typically for this kind of situation everything would fit on a single line. Don't respin just for that if there is nothing else later, but if a v4 is needed you can change it. Looks neat otherwise so far. Thanks, Miqu=C3=A8l