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 D538DC4345F for ; Fri, 3 May 2024 13:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4T+zw0JsiKJISDhVHF3fE1goknZ4y+odfFFxMhehZ/Y=; b=ZpV7OJhD3pNgVxe98/W2xNDQ1H 3bjRpE7xhoekH8R/z4o1iTb7HnNijglna0m2y3AJaHQorlqh/jl9RK59VD+Ka8b24F3B+sgYzPIka BPPPj7HI2T4vDhWkeuDrl4ZDFPxF/klcSlXGkkhesaJJ317pUFyUzfsM+wkH6y1i2IvTtP7wCBUm5 g7v5+ElAZo+JdRWlfCqgZ2Ght03PUIoh+4nc0rHUwbWvjRAgOYzzurvOaVzNE8Q53lmFWqybsw4wJ JfJxeZ37WOfkljVr+M3+yCuZ97T7mB4SY5gghvHEnlzK3Q/oKBqld/y069Jy3ijnb0IDODUCre8Rt 8Xuo713w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2spr-0000000GdZT-0XGG; Fri, 03 May 2024 13:20:23 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2spo-0000000GdXV-0XTl for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2024 13:20:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 909BE61BFB; Fri, 3 May 2024 13:20:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DA3CC2BBFC; Fri, 3 May 2024 13:20:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714742419; bh=y8ACv/eZbhEwWdhd7+zMjvdVcezL22PFRTFmyeFY3Yg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sscqAnkwl4Tl311D/3B6x2XjiBli4iuNRThqjwmUvUjtrAbnTgOIq7aNfJa4V1xzp nHpbyqXYYb4QtjB5kLNwFHaF1NcmNXnIhMgrrHdxA1UCGYOxcU8Du3qp+vOkq5GoL4 Wh2EkmL8rpxczOjYGQ0PzWJVMjadUdWrmgrxKyV3twK1OzqcSeHNGuX7jwZrMkrUO4 bpoPNJmnQ8JMTc3bF+zAqfp93Et+elf30qivCEZvy4ACIXlSoSI5eXsRDZiFh2RPY3 88M2RV94M8VE2+/Ju+uIq412DmVr8gOfHYnf9SueNAVCFNI9f+MfdDRYtetT8vzjZr bvUJWDIYlP/Rw== Date: Fri, 3 May 2024 15:20:15 +0200 From: Lorenzo Bianconi To: Andy Shevchenko Cc: Mark Brown , linux-spi@vger.kernel.org, conor@kernel.org, lorenzo.bianconi83@gmail.com, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, nbd@nbd.name, john@phrozen.org, dd@embedd.com, catalin.marinas@arm.com, will@kernel.org, upstream@airoha.com, angelogioacchino.delregno@collabora.com Subject: Re: [PATCH v6 3/3] spi: airoha: Add spi-nand flash controller driver Message-ID: References: <08f55e89a1eb655402a748d700a023e1e27a194a.1714571980.git.lorenzo@kernel.org> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240503_062020_435024_299F51BA X-CRM114-Status: GOOD ( 29.35 ) 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: , Content-Type: multipart/mixed; boundary="===============5698816431215869213==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5698816431215869213== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+yOtApDSoM3ooQfX" Content-Disposition: inline --+yOtApDSoM3ooQfX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On Fri, May 3, 2024 at 3:15=E2=80=AFPM Lorenzo Bianconi wrote: > > > > > On Wed, May 01, 2024 at 04:06:43PM +0200, Lorenzo Bianconi wrote: > > > > Introduce support for spi-nand driver of the Airoha NAND Flash Inte= rface > > > > found on Airoha ARM SoCs. > > > > > > This doesn't apply against current code, please check and resend. > > > > Hi Mark, > > > > patch v6 3/3 has just a couple of cosmetic changes requested by Andy wi= th > > respect to v5 3/3. > > > > @Andy: do you think we can drop these changes or do you prefer to add t= hem? (in > > the latter case I can post an incremental patch). >=20 > I am not sure what this is about, do you mean the changes asked by me > made this driver not applicable? >=20 These are the only changes between patch v5 3/3 (applied by Mark) and patch= v6 3/3: --- /tmp/spi-airoha-snfi.c 2024-05-03 15:13:35.020903623 +0200 +++ drivers/spi/spi-airoha-snfi.c 2024-05-03 15:13:41.836924124 +0200 @@ -638,9 +638,9 @@ u64 offs, size_t len, void *buf) { struct spi_device *spi =3D desc->mem->spi; + struct airoha_snand_ctrl *as_ctrl =3D spi_controller_get_devdata(spi->con= troller); struct airoha_snand_dev *as_dev =3D spi_get_ctldata(spi); struct spi_mem_op *op =3D &desc->info.op_tmpl; - struct airoha_snand_ctrl *as_ctrl; u32 val, rd_mode; int err; =20 @@ -661,7 +661,6 @@ break; } =20 - as_ctrl =3D spi_controller_get_devdata(spi->controller); err =3D airoha_snand_set_mode(as_ctrl, SPI_MODE_DMA); if (err < 0) return err; @@ -768,13 +767,12 @@ u64 offs, size_t len, const void *buf) { struct spi_device *spi =3D desc->mem->spi; + struct airoha_snand_ctrl *as_ctrl =3D spi_controller_get_devdata(spi->con= troller); struct airoha_snand_dev *as_dev =3D spi_get_ctldata(spi); struct spi_mem_op *op =3D &desc->info.op_tmpl; - struct airoha_snand_ctrl *as_ctrl; u32 wr_mode, val; int err; =20 - as_ctrl =3D spi_controller_get_devdata(spi->controller); err =3D airoha_snand_set_mode(as_ctrl, SPI_MODE_MANUAL); if (err < 0) return err; @@ -885,12 +883,12 @@ static int airoha_snand_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) { - struct airoha_snand_dev *as_dev =3D spi_get_ctldata(mem->spi); + struct spi_device *spi =3D mem->spi; + struct airoha_snand_ctrl *as_ctrl =3D spi_controller_get_devdata(spi->con= troller); + struct airoha_snand_dev *as_dev =3D spi_get_ctldata(spi); u8 data[8], cmd, opcode =3D op->cmd.opcode; - struct airoha_snand_ctrl *as_ctrl; int i, err; =20 - as_ctrl =3D spi_controller_get_devdata(mem->spi->controller); if (opcode =3D=3D SPI_NAND_OP_PROGRAM_EXECUTE && op->addr.val =3D=3D as_dev->cur_page_num) { as_dev->data_need_update =3D true; @@ -965,11 +963,9 @@ =20 static int airoha_snand_setup(struct spi_device *spi) { - struct airoha_snand_ctrl *as_ctrl; + struct airoha_snand_ctrl *as_ctrl =3D spi_controller_get_devdata(spi->con= troller); struct airoha_snand_dev *as_dev; =20 - as_ctrl =3D spi_controller_get_devdata(spi->controller); - as_dev =3D devm_kzalloc(as_ctrl->dev, sizeof(*as_dev), GFP_KERNEL); if (!as_dev) return -ENOMEM; @@ -994,10 +990,9 @@ =20 static void airoha_snand_cleanup(struct spi_device *spi) { + struct airoha_snand_ctrl *as_ctrl =3D spi_controller_get_devdata(spi->con= troller); struct airoha_snand_dev *as_dev =3D spi_get_ctldata(spi); - struct airoha_snand_ctrl *as_ctrl; =20 - as_ctrl =3D spi_controller_get_devdata(spi->controller); dma_unmap_single(as_ctrl->dev, as_dev->dma_addr, as_dev->buf_len, DMA_BIDIRECTIONAL); spi_set_ctldata(spi, NULL); @@ -1049,12 +1044,6 @@ .max_register =3D REG_SPI_NFI_SNF_NFI_CNFG, }; =20 -static const struct of_device_id airoha_snand_ids[] =3D { - { .compatible =3D "airoha,en7581-snand" }, - { /* sentinel */ } -}; -MODULE_DEVICE_TABLE(of, airoha_snand_ids); - static int airoha_snand_probe(struct platform_device *pdev) { struct airoha_snand_ctrl *as_ctrl; @@ -1114,6 +1103,12 @@ return devm_spi_register_controller(dev, ctrl); } =20 +static const struct of_device_id airoha_snand_ids[] =3D { + { .compatible =3D "airoha,en7581-snand" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, airoha_snand_ids); + static struct platform_driver airoha_snand_driver =3D { .driver =3D { .name =3D "airoha-spi", As you can see the only differences are your comments about patch v5 3/3: - initialize struct airoha_snand_ctrl *as_ctrl initialization as we did for struct airoha_snand_dev *as_dev pointer. - move struct of_device_id airoha_snand_ids below airoha_snand_probe routin= e. My question is if we can drop those changes (they are just cosmetics) or do you prefer to add them as incremental patch. Regards, Lorenzo >=20 > --=20 > With Best Regards, > Andy Shevchenko --+yOtApDSoM3ooQfX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZjTkjwAKCRA6cBh0uS2t rG67AQCCeqn+NBSKMNbpU3BSlxsZhOoX3ggqhuSSqGMrX8zXpgEA+Begx9xwfp7y UZc5nEg9/HPAyQ7Dr1hVa0YzIDAIGQg= =JUI+ -----END PGP SIGNATURE----- --+yOtApDSoM3ooQfX-- --===============5698816431215869213== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5698816431215869213==--