Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp324131pxb; Wed, 15 Sep 2021 03:00:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkmTc7suaISo2prFrE2tiDp1raYuSJwOJ9T6OFO21IVOYyEtWFbK8cOZfQfbyT33UJiwk2 X-Received: by 2002:a05:651c:2ca:: with SMTP id f10mr18698878ljo.211.1631700027362; Wed, 15 Sep 2021 03:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631700027; cv=none; d=google.com; s=arc-20160816; b=PKBsi4smVcU5MlhX+F7wdGXqfsi87smRZ5MzN7VSkfLJspWbQkoc7moETlAoUgfPPr wjBPNKq0KEFJIAIWZaZWCEg42Ac5O91dNQATOQKXxIeIvkU4QAQjrzgorAlqCHwiC+15 1t3YanqNehMbjVpUIvdxMIwpmL62OnigW9zmEeBwc3ni0OjtIUPsiGs+nkQZsSmhor8S ZWcbaBr12Blz6+GyOxgc07YzzzMYMS3OEksBg+gXbAc2kpxp/V8Izs9QmbCpfuwC3/sd ndesrz/xZeZGGm+L1NDdbRwpZkpRvCOmnKaih6uJdF8B6vIvQXXYczxFjHQQKBPDzyQk IG2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=ycV5iCOyRMO9EBlSdTqkM+1iSpe6wSR17fX6Ulqo050=; b=iIADU6douZ7WF+1J3waw4WkOsQgPFTWmFd0QfXa5RVssgBIv12cmcEYQuiSIphfO7W rZbZOHu7d98dM7db5cuq89RLD33ciTVUILp4ie8TWV44BCK6HyMr0hgbi0jXeGVYBOKK VxQAwGf2Kle5iV/QZcEvTrCH83kLiqkeGBHflPD+qoZPMDY+mEU+/0hHhltkXEiIBBMB Frt9PkOnZ27CSX9GrqTqC+2dV81RPa74eHZ88oGNaflfJBMT4FQlJ/m3dXbLkeL81bOX AGqGr2pFdf0oZ9a01nQ7KFb7mDSKzC2urQcHOiTHjeiy6VXdIHGzufSHlWyIhI8TxFLy neZQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si17151105lfj.105.2021.09.15.02.59.58; Wed, 15 Sep 2021 03:00:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237388AbhIOJ7W (ORCPT + 99 others); Wed, 15 Sep 2021 05:59:22 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:64251 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232071AbhIOJ7G (ORCPT ); Wed, 15 Sep 2021 05:59:06 -0400 Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 15 Sep 2021 02:57:47 -0700 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 15 Sep 2021 02:57:45 -0700 X-QCInternal: smtphost Received: from mdalam-linux.qualcomm.com ([10.201.2.71]) by ironmsg02-blr.qualcomm.com with ESMTP; 15 Sep 2021 15:27:42 +0530 Received: by mdalam-linux.qualcomm.com (Postfix, from userid 466583) id 404DF22353; Wed, 15 Sep 2021 15:27:41 +0530 (IST) From: Md Sadre Alam To: miquel.raynal@bootlin.com, mani@kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: mdalam@codeaurora.org, sricharan@codeaurora.org Subject: [PATCH 1/3] mtd: rawnand: qcom: Add support for status pipe Date: Wed, 15 Sep 2021 15:27:29 +0530 Message-Id: <1631699851-12172-2-git-send-email-mdalam@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1631699851-12172-1-git-send-email-mdalam@codeaurora.org> References: <1631699851-12172-1-git-send-email-mdalam@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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; + } + } + /* * Initially allocate BAM transaction to read ONFI param page. * After detecting all the devices, this BAM transaction will -- 2.7.4