Skip to contentSkip to conversation

OneNAND: Remove unused read_spareram

PATCH New Kyungmin Park 5 participants 7 messages Jul 21, 2009 – Sep 18, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OneNAND: Remove unused read_spareram

Remove unused read_spareram and add unlock_all as kernel does

---

drivers/mtd/onenand/onenand_base.c +1 -3
index d482437..368fa6e 100644
@@ -1010,7 +1010,7 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from,
 		if (ret)
 			break;
 
-		this->read_spareram(mtd, 0, ONENAND_SPARERAM, buf, column, thislen);
+		this->read_bufferram(mtd, 0, ONENAND_SPARERAM, buf, column, thislen);
 		read += thislen;
 		if (read == len)
 			break;
@@ -2104,8 +2104,6 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
 
 	if (!this->read_bufferram)
 		this->read_bufferram = onenand_read_bufferram;
-	if (!this->read_spareram)
-		this->read_spareram = onenand_read_bufferram;
 	if (!this->write_bufferram)
 		this->write_bufferram = onenand_write_bufferram;
 
include/linux/mtd/onenand.h +1 -2
index 2597e34..06f7baf 100644
@@ -83,10 +83,9 @@ struct onenand_chip {
 			size_t len);
 	int (*wait) (struct mtd_info *mtd, int state);
 	int (*bbt_wait) (struct mtd_info *mtd, int state);
+	void (*unlock_all)(struct mtd_info *mtd);
 	int (*read_bufferram) (struct mtd_info *mtd, loff_t addr, int area,
 			       unsigned char *buffer, int offset, size_t count);
-	int (*read_spareram) (struct mtd_info *mtd, loff_t addr, int area,
-			       unsigned char *buffer, int offset, size_t count);
 	int (*write_bufferram) (struct mtd_info *mtd, loff_t addr, int area,
 				const unsigned char *buffer, int offset,
 				size_t count);
#1 lore raw

PATCH 1/1 OneNAND: Remove unused read_spareram

Quoted 3 lines · Kyungmin Park

Remove unused read_spareram and add unlock_all as kernel does

Applied to u-boot-nand-flash/next

-Scott

#2 lore raw

PATCH 1/1 OneNAND: Remove unused read_spareram

In reply to Kyungmin Park

Dear Kyungmin Park,

Quoted 4 lines · In message <20090721025804.GA3722@july> you wrote:

Remove unused read_spareram and add unlock_all as kernel does

---

Applied to "next", thanks.

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
PUBLIC NOTICE AS REQUIRED BY LAW:  Any Use of This  Product,  in  Any
Manner  Whatsoever,  Will  Increase  the  Amount  of  Disorder in the
Universe. Although No Liability Is Implied Herein,  the  Consumer  Is
Warned  That  This  Process Will Ultimately Lead to the Heat Death of
the Universe.
#3 lore raw

PATCH 1/1 MIPS: VCT: Remove read_spareram reference

In reply to Kyungmin Park

The commit ecad289fc6bd9d89ef4d5093cc7b6fd712fd0d29 (OneNAND: Remove unused read_spareram and add unlock_all as kernel does) forgot to fixup a local reference to read_spareram in board/micronas/vct/ebi_onenand.c, which causes the following build failure when configured with OneNAND:

ebi_onenand.c: In function 'onenand_board_init':
ebi_onenand.c:196: error: 'struct onenand_chip' has no member named 'read_spareram' make[1]: *** [ebi_onenand.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [board/micronas/vct/libvct.a] Error 2

Cc Signed-off-by: Stefan Roese <[email protected]>
Cc Signed-off-by: Kyungmin Park <[email protected]>

---

Wolfgang, once approved by a board maintainer, please apply directly. Thanks in advance,

 board/micronas/vct/ebi_onenand.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
board/micronas/vct/ebi_onenand.c +0 -1
index 522b88f..1e8afa6 100644
@@ -193,6 +193,5 @@ void onenand_board_init(struct mtd_info *mtd)
 	chip->write_word = ebi_nand_write_word;
 
 	chip->read_bufferram = ebi_read_bufferram;
-	chip->read_spareram = ebi_read_bufferram;
 	chip->write_bufferram = ebi_write_bufferram;
 }
#4 lore raw

PATCH 1/1 MIPS: VCT: Remove read_spareram reference

Quoted 11 lines · On Saturday 12 September 2009 06:12:24 Shinya Kuribayashi wrote:

The commit ecad289fc6bd9d89ef4d5093cc7b6fd712fd0d29 (OneNAND: Remove unused read_spareram and add unlock_all as kernel does) forgot to fixup a local reference to read_spareram in board/micronas/vct/ebi_onenand.c, which causes the following build failure when configured with OneNAND:

ebi_onenand.c: In function 'onenand_board_init':
ebi_onenand.c:196: error: 'struct onenand_chip' has no member named
'read_spareram' make[1]: *** [ebi_onenand.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [board/micronas/vct/libvct.a] Error 2

Quoted 3 lines
Cc Signed-off-by: Stefan Roese <[email protected]>
Cc Signed-off-by: Kyungmin Park <[email protected]>

Thanks for spotting and fixing.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

#5 lore raw

PATCH v2 1/1 MIPS: VCT: Remove read_spareram reference

The commit ecad289fc6bd9d89ef4d5093cc7b6fd712fd0d29 (OneNAND: Remove unused read_spareram and add unlock_all as kernel does) forgot to remove a local reference to read_spareram in board/micronas/vct/ebi_onenand.c, which causes the following build failure when configured with OneNAND:

ebi_onenand.c: In function 'onenand_board_init':
ebi_onenand.c:196: error: 'struct onenand_chip' has no member named 'read_spareram' make[1]: *** [ebi_onenand.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [board/micronas/vct/libvct.a] Error 2

---

v2:
- Cc: lines are corrected!
- Add Acked-by: from Stefan.

 board/micronas/vct/ebi_onenand.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
board/micronas/vct/ebi_onenand.c +0 -1
index 522b88f..1e8afa6 100644
@@ -193,6 +193,5 @@ void onenand_board_init(struct mtd_info *mtd)
 	chip->write_word = ebi_nand_write_word;
 
 	chip->read_bufferram = ebi_read_bufferram;
-	chip->read_spareram = ebi_read_bufferram;
 	chip->write_bufferram = ebi_write_bufferram;
 }
#6 lore raw

PATCH v2 1/1 MIPS: VCT: Remove read_spareram reference

Quoted 11 lines · Shinya Kuribayashi

The commit ecad289fc6bd9d89ef4d5093cc7b6fd712fd0d29 (OneNAND: Remove unused read_spareram and add unlock_all as kernel does) forgot to remove a local reference to read_spareram in board/micronas/vct/ebi_onenand.c, which causes the following build failure when configured with OneNAND:

ebi_onenand.c: In function 'onenand_board_init':
ebi_onenand.c:196: error: 'struct onenand_chip' has no member named 'read_spareram' make[1]: *** [ebi_onenand.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [board/micronas/vct/libvct.a] Error 2

Quoted 3 lines

Applied to u-boot-nand-flash.

-Scott