[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1631699851-12172-2-git-send-email-mdalam@codeaurora.org>
Date: Wed, 15 Sep 2021 15:27:29 +0530
From: Md Sadre Alam <mdalam@...eaurora.org>
To: miquel.raynal@...tlin.com, mani@...nel.org,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: mdalam@...eaurora.org, sricharan@...eaurora.org
Subject: [PATCH 1/3] mtd: rawnand: qcom: Add support for status pipe
>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 <mdalam@...eaurora.org>
---
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
Powered by blists - more mailing lists