Patchwork [2/5] onenand: export onenand_command

login
register
mail settings
Submitter Haojian Zhuang
Date Sept. 25, 2009, 11:59 a.m.
Message ID <771cded00909250459v4ca7b890n796f55c65f023775@mail.gmail.com>
Download mbox | patch
Permalink /patch/34265/
State New
Headers show

Comments

Haojian Zhuang - Sept. 25, 2009, 11:59 a.m.
From f104c778c4f76ebe1b7d4b4575d7e9b0dffc6d69 Mon Sep 17 00:00:00 2001
From: Haojian Zhuang <haojian.zhuang@marvell.com>
Date: Fri, 25 Sep 2009 15:15:56 -0400
Subject: [PATCH] [MTD] [ONENAND] export onenand_command

Marvell PXA3xx bad block management will replaces the bad block with good
one.
The driver have to implement custom command function. Export
onenand_command()
in order to reuse the command function in onenand_base.c.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
---
 drivers/mtd/onenand/onenand_base.c |    3 ++-
 include/linux/mtd/onenand.h        |    2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)

Patch

From f104c778c4f76ebe1b7d4b4575d7e9b0dffc6d69 Mon Sep 17 00:00:00 2001
From: Haojian Zhuang <haojian.zhuang@marvell.com>
Date: Fri, 25 Sep 2009 15:15:56 -0400
Subject: [PATCH] [MTD] [ONENAND] export onenand_command

Marvell PXA3xx bad block management will replaces the bad block with good one.
The driver have to implement custom command function. Export onenand_command()
in order to reuse the command function in onenand_base.c.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
---
 drivers/mtd/onenand/onenand_base.c |    3 ++-
 include/linux/mtd/onenand.h        |    2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 6e82909..8f7c73a 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -317,7 +317,7 @@  EXPORT_SYMBOL(flexonenand_region);
  * Send command to OneNAND device. This function is used for middle/large page
  * devices (1KB/2KB Bytes per page)
  */
-static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t len)
+int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t len)
 {
 	struct onenand_chip *this = mtd->priv;
 	int value, block, page;
@@ -433,6 +433,7 @@  static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
 
 	return 0;
 }
+EXPORT_SYMBOL(onenand_command);
 
 /**
  * onenand_read_ecc - return ecc status
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 8ed8733..c99737f 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -24,6 +24,8 @@ 
 extern int onenand_scan(struct mtd_info *mtd, int max_chips);
 /* Free resources held by the OneNAND device */
 extern void onenand_release(struct mtd_info *mtd);
+extern int onenand_command(struct mtd_info *mtd, int cmd,
+			   loff_t addr, size_t len);
 
 /*
  * onenand_state_t - chip states
-- 
1.5.6.5