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 X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F537C433FE for ; Wed, 15 Sep 2021 09:58:43 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3E45760F46 for ; Wed, 15 Sep 2021 09:58:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3E45760F46 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date: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=+9eczZ5jjBZz3OuTvjt0LYV0+4Q33W/BCNp18uSnxKs=; b=IS16hK2JF5muUo q+qszrJG9oYa37smb2Lj3ebW7pj1d1EVayUgwgqwLAAwLFjPL5Lv5rUeOz4qjl1g/ND5f98USWShC p3VfTgbdMMKsE7jl0Vr7XYTCStHryVtB2wyFydG5Ea2DixLdtXyumMu31QZYufRnsx7cZF7cSTJMu m028EAZ/l+VIBW7hjDe49WeR7EQ4C4NFo/36b75X5phb1hk8EW/zM+OrbbemPbo40qtcDvea8g6yQ mFQvrfV0OUIJ4L4/X2C0EuV5nfI7wUy3qH4eU59n+pJHZH1V5OZGbOrJ66EjgmtDevMsvKFMe3LQ6 6SpkzyoU0qyQKlhc+FJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQRg4-008kEf-8c; Wed, 15 Sep 2021 09:58:04 +0000 Received: from alexa-out.qualcomm.com ([129.46.98.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQRfq-008k9P-L2 for linux-mtd@lists.infradead.org; Wed, 15 Sep 2021 09:57:51 +0000 Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) 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 ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 15 Sep 2021 02:57:46 -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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210915_025750_769535_3BC6BD30 X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/