[<prev] [next>] [day] [month] [year] [list]
Message-ID: <MN2PR08MB5951ABF020CC1DFD080A7A21B8140@MN2PR08MB5951.namprd08.prod.outlook.com>
Date: Mon, 3 Jun 2019 12:43:25 +0000
From: "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@...ron.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Marek Vasut <marek.vasut@...il.com>,
Vignesh Raghavendra <vigneshr@...com>,
Boris Brezillon <bbrezillon@...nel.org>,
Yixun Lan <yixun.lan@...ogic.com>,
Lucas Stach <dev@...xeye.de>,
Anders Roxell <anders.roxell@...aro.org>,
Stefan Agner <stefan@...er.ch>,
Marcel Ziswiler <marcel.ziswiler@...adex.com>,
"Bean Huo (beanhuo)" <beanhuo@...ron.com>,
Paul Cercueil <paul@...pouillou.net>,
Frieder Schrempf <frieder.schrempf@...tron.de>,
Chuanhong Guo <gch981213@...il.com>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH v3 02/12] mtd: rawnand: move ONFI related functions to nand.h
ONFI reated functions are used by nand_jedec.c and in next patch
nand_onfi.c will be moving to nand/ directory, it is necessary to move
these functions to nand.h.
Signed-off-by: Shivamurthy Shastri <sshivamurthy@...ron.com>
---
drivers/mtd/nand/raw/internals.h | 4 ----
drivers/mtd/nand/raw/nand_onfi.c | 8 ++++----
include/linux/mtd/nand.h | 9 +++++++++
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/nand/raw/internals.h b/drivers/mtd/nand/raw/internals.h
index 4dc9ae108fa1..c7c684f533fc 100644
--- a/drivers/mtd/nand/raw/internals.h
+++ b/drivers/mtd/nand/raw/internals.h
@@ -139,10 +139,6 @@ void nand_legacy_set_defaults(struct nand_chip *chip);
void nand_legacy_adjust_cmdfunc(struct nand_chip *chip);
int nand_legacy_check_hooks(struct nand_chip *chip);
-/* ONFI functions */
-u16 onfi_crc16(u16 crc, u8 const *p, size_t len);
-int nand_onfi_detect(struct nand_device *base);
-
/* JEDEC functions */
int nand_jedec_detect(struct nand_chip *chip);
diff --git a/drivers/mtd/nand/raw/nand_onfi.c b/drivers/mtd/nand/raw/nand_onfi.c
index e20b60b8dd93..939e2277830e 100644
--- a/drivers/mtd/nand/raw/nand_onfi.c
+++ b/drivers/mtd/nand/raw/nand_onfi.c
@@ -107,10 +107,10 @@ static int nand_flash_detect_ext_param_page(struct nand_chip *chip,
/*
* Recover data with bit-wise majority
*/
-static void nand_bit_wise_majority(const void **srcbufs,
- unsigned int nsrcbufs,
- void *dstbuf,
- unsigned int bufsize)
+void nand_bit_wise_majority(const void **srcbufs,
+ unsigned int nsrcbufs,
+ void *dstbuf,
+ unsigned int bufsize)
{
int i, j, k;
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index cebc38b6d6f5..3cdf06cae8b6 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -760,4 +760,13 @@ static inline bool nanddev_bbt_is_initialized(struct nand_device *nand)
int nanddev_mtd_erase(struct mtd_info *mtd, struct erase_info *einfo);
int nanddev_mtd_max_bad_blocks(struct mtd_info *mtd, loff_t offs, size_t len);
+/* ONFI functions */
+u16 onfi_crc16(u16 crc, u8 const *p, size_t len);
+void nand_bit_wise_majority(const void **srcbufs,
+ unsigned int nsrcbufs,
+ void *dstbuf,
+ unsigned int bufsize);
+void sanitize_string(u8 *s, size_t len);
+int nand_onfi_detect(struct nand_device *base);
+
#endif /* __LINUX_MTD_NAND_H */
--
2.17.1
Powered by blists - more mailing lists