Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1831011rdb; Tue, 20 Feb 2024 08:12:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUi/HkNI8AXBAL8MoTKS7puBNsXP6VHDRGzZ1yO4pMPr8qBxF/hOlPf6myZ662OOjDQt+ybUoQtxWm7qkg8tpBQYWEEWwuNhfTEj0dQyg== X-Google-Smtp-Source: AGHT+IFgLUSCmbpKV8wbuOsS79N8ts8Mf5hfUsM3Rfv7NZqR5m6nLnswFZnZAks25JKYNkbRvwCE X-Received: by 2002:a17:903:1105:b0:1d9:8832:f800 with SMTP id n5-20020a170903110500b001d98832f800mr17220836plh.8.1708445550431; Tue, 20 Feb 2024 08:12:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708445550; cv=pass; d=google.com; s=arc-20160816; b=zGDoSGhbolihClY/wwJxHEL5T27fyJpFL2OFh4nJk3dCyx6afRLTV+90+QyH9pAUoe ucXyv8+rj2nm8uVyL6TBLBDhY8Y3LW2RvkyUSrKbqewE0yMrjR26y+581CLjB6gcV/gg xMJEQYnfHWKf54ioqiG2qSogXek9/TGB3FwpkPN4J2phuH90xWchXMZkrKq6kR/Ia+Bu fDoVOP6r3NcimEzJNZ/esOti+buN10JZSqUOFsyKLH7BksZ1j21abUPRYRKxbqlOyyjO vjOttzABaQl/oTs7N2KBylkL3dUm/XUH3X+ug/JS93KCiUGvAMiNjDOBz/sJvkZak67E f5fA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RZ2NvkWdMfB6TPeRwnWT3v2ASF1VlZZNvp3ofnEfLqU=; fh=mDPSkpFDRAwHFPPgqYH+g55bi1nqJJrcC44ZLuzONMg=; b=Bb4qz+1JYNL12ADRQfiSqwe9ObARzW5cshaUrAcZA9XKzqhq3vNJ+y/BmP4ZuNMLeI 2RAFcHeSWQWw5p7NpPZ2JizPMoyYy4o1pssE5m+FIfRFaZu/b0MchJFnor9G29WgW0k9 MBR8qaTiiTjQ9CKxBCEPUgzZWN8PNgDoL47P951woCxqWkmqZlU1NN4rhE/KpKCWwWhG a1l1Cceo4mZQ8zEnH6LX7XMRhBtiQ/UST6f2i/qwzQgFP6t2oZjOo/Z4wtMUm5ENQPJm zVruVQ8wZ3/+LQ9d33sOsbkXSVizescZNK/ou49HBYjI1GGYr/ykVwn88NrkHRnQm6O3 TALg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dzit3AHY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-73307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id im9-20020a170902bb0900b001db7de1f1cbsi6189154plb.630.2024.02.20.08.12.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 08:12:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dzit3AHY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-73307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6A0B3B246C5 for ; Tue, 20 Feb 2024 16:06:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF8E077F31; Tue, 20 Feb 2024 16:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Dzit3AHY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB932762DA; Tue, 20 Feb 2024 16:04:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708445088; cv=none; b=r3QTpxepRSxGf5rRynaxcrkvsl3zJgl921UC8xGs236ZgqrU11PrmT/yEouoLC142knW7pH5bhy98bnTaxtPNero+VevH3UT9H4UG7qFWgdoMjMOo8BW8XAk+g+RdG7MXh/QgF3umNr4ds03nQXr5nfJjomirx7eLNDRJ2Vvu4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708445088; c=relaxed/simple; bh=J1fK6jslfQkZJzg2jPwQHSC+4w+Ux+DicAEu9djZk9U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mdIkSlbILHRrUeZqZ87Y2ofL+VEjdQSC2YSxe1ZVBUjZc6Msm2HAZK0rd5p6SiKDR0ml8kgvuUMNpi8xUEX0IDDzL20bz1SP5Ja/APVMNH0PFChk9k29h8By8m26/QqxFfZK8EyTkv55LlPPKb8tataKF+DhEu5sS7xbw4uop7Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Dzit3AHY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 628B4C4166A; Tue, 20 Feb 2024 16:04:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708445087; bh=J1fK6jslfQkZJzg2jPwQHSC+4w+Ux+DicAEu9djZk9U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dzit3AHYBMTM6EIcb3NGyAl04AmdWlCHyErY2wZxASbuJz5+G7g5emqHdd/RtULNB IS12FBFzONThiujilhranlioF0I31opt503RIvWlbjanS2xIR3pt5BZ0JLp0EfV0OZ g6rJOt04kvLmtjC3jC3CMOnmiktLrM2JrZgtEelfFg6J981McJzPAqwgRxI8BK+R8/ Sjj6i3+w12GI/5p1PJKSdeYYwvQhdtLma6+fYhXmCsBkHcDppUTGYKYwqKU8274CTx QbvCMA/UMTEL/6XbOtUsFJOIlPiUAi2j7BZHLWALRdLLsTrEGWguzI2eZknQ/nt1/f bpzmFfHNJDRPQ== Date: Tue, 20 Feb 2024 16:04:40 +0000 From: Mark Brown To: Md Sadre Alam Cc: andersson@kernel.org, konrad.dybcio@linaro.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, manivannan.sadhasivam@linaro.org, linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, quic_srichara@quicinc.com, quic_varada@quicinc.com Subject: Re: [PATCH 3/5] spi: spi-qpic: Add qpic spi nand driver support Message-ID: <8422fb6a-edd4-4911-89b7-2974c197981b@sirena.org.uk> References: <20240215134856.1313239-1-quic_mdalam@quicinc.com> <20240215134856.1313239-4-quic_mdalam@quicinc.com> <21dde665-54b4-48e4-b963-1008ac890df3@sirena.org.uk> <4a0e51cf-d29a-5843-9c61-1d31a9721a3d@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kjXP74qJYK0BefO/" Content-Disposition: inline In-Reply-To: <4a0e51cf-d29a-5843-9c61-1d31a9721a3d@quicinc.com> X-Cookie: E = MC ** 2 +- 3db --kjXP74qJYK0BefO/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 20, 2024 at 05:24:43PM +0530, Md Sadre Alam wrote: > On 2/15/2024 7:44 PM, Mark Brown wrote: > > On Thu, Feb 15, 2024 at 07:18:54PM +0530, Md Sadre Alam wrote: > > > + if (op->cmd.opcode == SPINAND_READID) { > > > + snandc->buf_count = 4; > > > + read_reg_dma(snandc, NAND_READ_ID, 1, NAND_BAM_NEXT_SGL); > > > + > > > + ret = submit_descs(snandc); > > > + if (ret) > > > + dev_err(snandc->dev, "failure in submitting descriptor for readid\n"); > > > + > > > + nandc_read_buffer_sync(snandc, true); > > > + memcpy(op->data.buf.in, snandc->reg_read_buf, snandc->buf_count); > > These memcpy()s don't seem great, why aren't we just reading directly > > into the output buffer? > This reg_read_buf is being used in common API so that it will be used by both > serial nand as well raw nand, so I can't directly use the output buffer since > internally CW mechanism I have to maintain in common API. We have control over all the source code in the kernel so if there's problems with the internal interfaces we can improve them. --kjXP74qJYK0BefO/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmXUzZcACgkQJNaLcl1U h9Ae6wf+Oq59OwYseL/VBULc5zFT+JBaAz+wC7NoE0Cl+JBwS9ar0CwNuWUQD6Ra 9Thdvn0Xmqk4vySveo4DKrtjIjai/iU87ZwjrMnDE5jVf+/m+n+h0YCfMSeA1qlY WjqgbYKTJRpm9YfJitc6FuNjUnnww2cljwtvT1V6gLbHFmPtG+70m/RKRin6FJlL JtVaTkjbHlUrwWANzGfylsAIeyz6q9BDDhN+q+7GkkLV/vUtuZiCeVHszJ8EwjUf HpLkY1r/MGbpENGuqo9iiFOlSGHLhyrB83CGZ8e+hB0EiONvKPZqu+mB3wdnRLiF oxAaV4xJrFzQNVDCHiDQXmHOhFCXhA== =tp1U -----END PGP SIGNATURE----- --kjXP74qJYK0BefO/--