From: Vadym Kochan <vadym.kochan@plvision.eu>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Roger Quadros <rogerq@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Liang Yang <liang.yang@amlogic.com>,
Cai Huoqing <cai.huoqing@linux.dev>,
Vadym Kochan <vadym.kochan@plvision.eu>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Elad Nachman <enachman@marvell.com>,
Chris Packham <chris.packham@alliedtelesis.co.nz>
Subject: [PATCH 1/3] mtd: rawnand: Partially revert 4114f97c41cd ("mtd: rawnand: Get rid of a few unused definitions")
Date: Wed, 19 Oct 2022 11:20:38 +0300 [thread overview]
Message-ID: <20221019082046.30160-2-vadym.kochan@plvision.eu> (raw)
In-Reply-To: <20221019082046.30160-1-vadym.kochan@plvision.eu>
onfi_async_timing_mode_to_sdr_timings is required for ac5 support in marvell_nand.c
Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
---
drivers/mtd/nand/raw/nand_timings.c | 14 ++++++++++++++
include/linux/mtd/rawnand.h | 3 +++
2 files changed, 17 insertions(+)
diff --git a/drivers/mtd/nand/raw/nand_timings.c b/drivers/mtd/nand/raw/nand_timings.c
index 7b41afc372d2..5604e3dc632c 100644
--- a/drivers/mtd/nand/raw/nand_timings.c
+++ b/drivers/mtd/nand/raw/nand_timings.c
@@ -642,6 +642,20 @@ onfi_find_closest_nvddr_mode(const struct nand_nvddr_timings *spec_timings)
return 0;
}
+/**
+ * onfi_async_timing_mode_to_sdr_timings - [NAND Interface] Retrieve NAND
+ * timings according to the given ONFI timing mode
+ * @mode: ONFI timing mode
+ */
+const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode)
+{
+ if (mode < 0 || mode >= ARRAY_SIZE(onfi_sdr_timings))
+ return ERR_PTR(-EINVAL);
+
+ return &onfi_sdr_timings[mode].timings.sdr;
+}
+EXPORT_SYMBOL(onfi_async_timing_mode_to_sdr_timings);
+
/*
* onfi_fill_sdr_interface_config - Initialize a SDR interface config from a
* given ONFI mode
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index dcf90144d70b..7702abf9e1f0 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -1481,6 +1481,9 @@ int rawnand_sw_bch_correct(struct nand_chip *chip, unsigned char *buf,
unsigned char *read_ecc, unsigned char *calc_ecc);
void rawnand_sw_bch_cleanup(struct nand_chip *chip);
+/* get timing characteristics from ONFI timing mode. */
+const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode);
+
int nand_check_erased_ecc_chunk(void *data, int datalen,
void *ecc, int ecclen,
void *extraoob, int extraooblen,
--
2.17.1
next prev parent reply other threads:[~2022-10-19 8:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 8:20 [PATCH 0/3] mtd: rawnand: marvell: add support for AC5 SoC Vadym Kochan
2022-10-19 8:20 ` Vadym Kochan [this message]
2022-10-19 8:20 ` [PATCH 2/3] dt-bindings: mtd: Add AC5 specific binding Vadym Kochan
2022-10-19 8:46 ` Miquel Raynal
2022-10-20 13:14 ` Vadym Kochan
2022-10-20 23:13 ` Chris Packham
2022-10-21 19:56 ` Vadym Kochan
2022-10-19 8:20 ` [PATCH 3/3] mtd: rawnand: marvell: add support for AC5 SoC Vadym Kochan
2022-10-19 8:45 ` Miquel Raynal
2023-05-25 0:53 ` [PATCH 0/3] " Chris Packham
2023-05-26 12:01 ` Vadym Kochan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221019082046.30160-2-vadym.kochan@plvision.eu \
--to=vadym.kochan@plvision.eu \
--cc=cai.huoqing@linux.dev \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=devicetree@vger.kernel.org \
--cc=enachman@marvell.com \
--cc=f.fainelli@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=liang.yang@amlogic.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=rogerq@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®