Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp5019089pxb; Tue, 28 Sep 2021 08:57:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT4Z/cj/ZaHEIoyDlDyvCkipjsN5eeDxs0xCvKWLlx+gXEmnsXURx3mkWieIBUF4mB1F1W X-Received: by 2002:a17:907:7848:: with SMTP id lb8mr7433818ejc.494.1632844675900; Tue, 28 Sep 2021 08:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632844675; cv=none; d=google.com; s=arc-20160816; b=emzEhG7xVhWwxCmKbJY/wlfsmnSdomCSIk/oTe9LIlQtrC0flYSJITluKATBepc1Ol oQ+oJcdU1Mj4KqQwdeBjkdvBgEzlaXXOwlzeYaqaVRvTUyXCgeP3MhiQY75MUkEiaU5d kZkcwPTTWyly020je5UCW+2VWmIgKUWK5BI6sfzdnvIeucitqoCzjRWgUrSZWu8SaYSa u1GMPA00LPXmHr/rSIWq9i0DhY13RWEu7t3W3l+2ATN9BGuRBwMlMinNV6nKAAX6llJ/ 9nkLM20r5lbOUhDvNxCVvnk3M/k42zzjDsurprcfawh6ZorJH7mfrSUzIJFPjwX5YfEd S3HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yqCM0Wb0t2StcquBIgrw3sRK3n/0j8QOWmWlqzdPso4=; b=v7Q7fSY3OuG0KhpxlBXBHvn1hgZR6tG/kG6OU9xvE+4w9/w+joqSnrAs1s1pBQ7QIo ruGVfWJgaw4olrP7mmqzloHHCOn93JLzey3GoWUtW4tCM5QMVWwwpcVcvgkK5rfvVc3d Oiw9U0yxal324Vj9eQ27P37BU/duMC6DK1zaIDzYG+QxqEwMlYJJjMTtb4N039lhiubC jPDUtFAKyzCI51NLJlKcunu+sT1FAiBQTWnE8yyQ4skKQ2sklshv2M/ujybr4SNkL6kj ZP/QcnIAReD2ntk/JLhDIf7aQ/naYX5M4rg/OsFLwHm6ggs1Iq36sB1Etp+tx/xM1OVi Y9eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pDnIpqhr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id la20si25202009ejc.685.2021.09.28.08.57.28; Tue, 28 Sep 2021 08:57:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pDnIpqhr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S241658AbhI1PzP (ORCPT + 99 others); Tue, 28 Sep 2021 11:55:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:39466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241523AbhI1PzO (ORCPT ); Tue, 28 Sep 2021 11:55:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7F6A860F0F; Tue, 28 Sep 2021 15:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632844415; bh=Y5e9CIreOMBgUX4oGIdc1T/T430Kpn66zsMnsKXSXeg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pDnIpqhr8CyZ1nLAsDCphZ5Xu9Z28BgKX+qEVht6neCzo6kjVmkjYHIXfABqwMw/x 5YJ2BV3BVBkrOmmtBVPsy3MnBhDT7/iJVULg2lY7ICk5+gG70IpcOueIzL1ssHD6Qw OTlSI97QGsJOyVyXMaimX2kiQgi7Uyj3EPCQkxiVyiNL4n91kQYe5Ltt0tWIxTRNWc xPftl/4Knqf3Ayhf0kB3o/OBqNviw8kbgSxRxV5rcGZZO2o2LNeyXvyygtcvfGC2QP zlwdHejxFlMNi9yfLm5/R86K4GXsrEDI2cNZ1gFIlt6Srg6U61CZCJQEaXD15iw25e jNh7Ao5GA1LzA== Date: Tue, 28 Sep 2021 21:22:05 +0530 From: Manivannan Sadhasivam To: Md Sadre Alam Cc: miquel.raynal@bootlin.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, sricharan@codeaurora.org Subject: Re: [PATCH 1/3] mtd: rawnand: qcom: Add support for status pipe Message-ID: <20210928155205.GB12183@thinkpad> References: <1631699851-12172-1-git-send-email-mdalam@codeaurora.org> <1631699851-12172-2-git-send-email-mdalam@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1631699851-12172-2-git-send-email-mdalam@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 15, 2021 at 03:27:29PM +0530, Md Sadre Alam wrote: > From QPIC V2.0 onwards there is a separate pipe > to read status of each code word, called "status" pipe. > > "status" pipe will use to read CW status in case of > enhanced read mode like page scope read, multi page read. > The pipe you are referring to is a DMA pipe (channel). So it should be mentioned here. > Signed-off-by: Md Sadre Alam > --- > drivers/mtd/nand/raw/qcom_nandc.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c > index 04e6f7b..42c6291 100644 > --- a/drivers/mtd/nand/raw/qcom_nandc.c > +++ b/drivers/mtd/nand/raw/qcom_nandc.c > @@ -389,6 +389,7 @@ struct qcom_nand_controller { > struct dma_chan *tx_chan; > struct dma_chan *rx_chan; > struct dma_chan *cmd_chan; > + struct dma_chan *sts_chan; > }; > > /* will be used only by EBI2 for ADM DMA */ > @@ -2737,6 +2738,11 @@ static void qcom_nandc_unalloc(struct qcom_nand_controller *nandc) > > if (nandc->cmd_chan) > dma_release_channel(nandc->cmd_chan); > + > + if (nandc->props->qpic_v2) { > + if (nandc->sts_chan) > + dma_release_channel(nandc->sts_chan); > + } > } else { > if (nandc->chan) > dma_release_channel(nandc->chan); > @@ -2815,6 +2821,14 @@ static int qcom_nandc_alloc(struct qcom_nand_controller *nandc) > goto unalloc; > } > > + if (nandc->props->qpic_v2) { > + nandc->sts_chan = dma_request_slave_channel(nandc->dev, "sts"); > + if (!nandc->sts_chan) { > + dev_err(nandc->dev, "failed to request sts channel\n"); > + return -ENODEV; > + } If you are forcing the need of status pipe, then you should also update the devicetree of relevant SoCs using the QPIC v2 controller. Else, they will fail to probe. Thanks, Mani > + } > + > /* > * Initially allocate BAM transaction to read ONFI param page. > * After detecting all the devices, this BAM transaction will > -- > 2.7.4 >