[U-Boot] [PATCH] OneNAND: Destaticize largepage_memorybased

Marek Vasut marek.vasut at gmail.com
Sat Oct 2 16:26:07 CEST 2010


This moves "struct nand_bbt_descr largepage_memorybased" into .data.rel, which
allows it to be PIC with current U-Boot infrastructure for relocation.

Also, I squished the ff_patternt into the structure.

Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
---
 drivers/mtd/onenand/onenand_bbt.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c
index 1354877..c6d1dc9 100644
--- a/drivers/mtd/onenand/onenand_bbt.c
+++ b/drivers/mtd/onenand/onenand_bbt.c
@@ -231,13 +231,11 @@ int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
  * Define some generic bad / good block scan pattern which are used
  * while scanning a device for factory marked good / bad blocks.
  */
-static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
-
-static struct nand_bbt_descr largepage_memorybased = {
+struct nand_bbt_descr largepage_memorybased = {
 	.options = 0,
 	.offs = 0,
 	.len = 2,
-	.pattern = scan_ff_pattern,
+	.pattern = { 0xff, 0xff },
 };
 
 /**
-- 
1.7.1



More information about the U-Boot mailing list